;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Anti Spam Bot 1.0 ----- August 3, 2001
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; INSTALLATION
;;;; Put antispambot.mrc in your mirc folder
;;;; In mIRC type /load -rs antispambot.mrc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; made by cow aka Ben_Dover
;;;; inspired by Carpe^Diem
;;;; website = [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
;;;; built on WebNet using mIRC 5.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
[asbhelp]
n0=Anti Spam Bot 1.0 - Built with mIRC 5.91 - July 29, 2001 $crlf $+ ------------------------------------ $crlf $+ INTRO $crlf $+ Anti Spam Bot is a good tool to use if you're an op in a large channel that has spam problems. Fill in the info in the spam dialog, such as nicknames, server, channels to join, and etc. Click the On/Off button to turn it on or off. You can also connect the bot to a network without you even being connected. The offender can't be kicked though if you're not there and an op. $crlf $+ ------------------------------------ $crlf
n1=KICKS AND BANS $crlf $+ (1.) DCC Sends - Any file sent to your bot will activate the kick ban. If you don't have it on though, nothing will happen to the sender. I made it kick for any file instead of your choice of files, cuz nobody should be sending files to the bot. That person most likely has a virus that autosends. $crlf
n2=(2.) Spam - All private messages and notices will be checked for spam with the words you plugged into the "Triggers" tab in the dialog. $crlf
n3=(3.) Bad Names - This will /whois everyone who joins, to check what they have in the name field. It compares it to the names in the "Triggers" tab and if there's a match, they are kicked/banned. Good for kicking known spam scripts $crlf $+ (4.) Bad Chans - Will check to see what channels they are in by donig a /whois on them when they join, and if one of them matches a channel in your Bad Chan Triggers, they will be kicked/banned. Good for known spammer hangout channels or just any channel you don't like. $crlf
n4=(5.) CTCP - Any private CTCP that the bot gets will activate the kick ban. Not really important. It could mean someone is sending CTCP's to your bot thinking that he can get access, which i think deserves a kick. Could also be good for catching CTCP flooders. Use this if you want! $crlf $+ ------------------------------------ $crlf
n5=SOME FEATURES $crlf $+ (1.) "Repeat messages to me" - This will open a window named @ASB with info about what messages the bot is receiving. It will show all private messages and notices, dcc sends, ctcp's, bad names, silenced masks, and messages the bot sends. $crlf
n6=(2.) "Repeat Spam/DCC Sends to" - This will relay spam and DCC Sends to the channel or nickname you provide. Usually to a spam help channel where IRCOP's hang out. $crlf
n7=(3.) "Kick/Ban" - You can turn kicks and bans off or on (checked for on, unchecked for off). Kick Message is the reason given for the kick. Secs is how long they are banned, and Mask is the ban mask number used. $crlf
n8=(4.) "Triggers" - This is where you put the Spam Words and Bad Names. Use * for wildcards. You can also include wildcards in the middle, ex: *abc*xyz*. Remember, this is for Names, not Nicks or Idents. Also here is Immune nicks and masks. They will not be kicked or banned and their message will not be sent to another channel or nick, if you have the "repeat spam to" option on. $crlf
n9=(5.) "Controls" - A few extra things added that could come in handy. Make your bot talk to a nick or channel, change it's nick, Part and Join Channels, Turn off timer so it stays parted or joined, click join or part to do so and restart that timer. Also, a button to Uninstall the Script and it's variables. $crlf $+ (6.) "Logging" - The Script can log all spams and dcc's, pretty self explanitory! $crlf $+ (7.) "Auto Hi" - This will say hi to peope who are in X channels. A good spam finder, cuz some spam bots, usually in a lot of channels, only spam when you say hi to them. $crlf $+ ------------------------------------ $crlf
n10=SOME IMPORTANT INFO $crlf $+ When a message is sent, if a channel that the spam bot is in is in the message, no action will be taken. This is so you don't end up reporting your own channels or kicking your channel welcome bot that you forgot to immunize. $crlf $+ The Bot comes with some flood protection. Too many private messages, and it'll /silence the abuser for 60 seconds. It will also only do a /whois every 3 seconds, so during high traffic, some people will slip though checking routines. $crlf $+ ------------------------------------ $crlf
n11=ABOUT AND CREDITS $crlf $+ I got the idea for this script from Carpe^Diem's spybot. After seeing it I wanted to make my own with even more features. The scripting is original with a little help from some scripting tutorials(this is my first usage of sockets). The Dialog was built with Dialog Studio (mircscripts.org/dstudio). So Thanks to Carpe^Diem and Dohcan. $crlf
n12=me = cow, ben_dover, etc. $crlf $+ network = webnet (irc.webchat.org) $crlf $+ site = zerogen.cjb.net $crlf $+ usage = You can add this bot to your script, use it however, just don't rip, change anything, or claim you made it!
Kod: Kodu kopyalamak için üzerine çift tıklayın!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; dialog, buttons, and variable manipulating
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias asb {
if ($dialog(asb) ) { dialog -o asb | dialog -n asb }
else { dialog -m asb asb }
}
menu menubar,status,channel {
Anti Spam Bot
.Open:asb
.-
.$iif(%asb.state == 1,Disconnect,Connect):if (%asb.state == 1) { asb.quit | if ($dialog(asb)) { did -ra asb 83 OFF | did -u asb 83 | did -ra asb 84 Disconnected } } | else { asb.start | if ($dialog(asb)) { set %asb.state 1 | did -ra asb 83 ON | did -c asb 83 } }
.$iif(%asb.jp == 1,Join Chans,Part Chans):if (%asb.jp == 1) { asb.joinchans } | else { asb.partchans }
.Stop Timer:.timerasbstayjoined off | .timerasbstayparted off | echo -a 4Anti Spam Bot timers stopped
.-
.Stats:asb.status -a
}
if ($did(83).state == 1) { set %asb.state 1 | did -ra asb 83 ON }
else { set %asb.state 0 | did -ra asb 83 OFF | did -ra asb 84 Disconnected }
if (%asb.state == 1) { asb.start }
else { asb.quit }
menu @ASB {
Clear Window:clear
}
; dialog table generated by Dialog Studio
dialog asb {
title "Anti Spam Bot"
size -1 -1 187 147
option dbu
tab "Setup", 1, 0 0 186 133
box "The Bot's Info", 6, 5 18 84 112, tab 1
text "------Primary------", 7, 29 27 35 8, tab 1
text "Nickname", 8, 10 37 24 8, tab 1
edit "", 9, 35 36 50 10, tab 1 autohs
text "Password", 10, 10 47 23 8, tab 1
edit "", 11, 35 45 50 10, tab 1 autohs
text "------Backup------", 12, 29 63 36 8, tab 1
text "Nickname", 13, 10 73 24 8, tab 1
edit "", 14, 35 72 50 10, tab 1 autohs
text "Password", 15, 10 83 23 8, tab 1
edit "", 16, 35 82 50 10, tab 1 autohs
text "------Name------", 17, 32 99 32 8, tab 1
text "Ident", 18, 10 109 12 8, tab 1
edit "", 19, 35 107 50 10, tab 1 autohs
text "Name", 20, 10 117 14 8, tab 1
edit "", 21, 35 117 50 10, tab 1 autohs
box "Channels to Join and Watch", 22, 92 18 91 62, tab 1
combo 23, 97 27 60 50, tab 1 size
button "Add", 24, 159 39 20 10, tab 1
button "Del", 25, 159 53 20 10, tab 1
box "Server to Join", 27, 92 83 91 47, tab 1
radio "Same as me", 28, 96 93 41 10, group tab 1
radio "", 29, 96 107 9 10, tab 1
edit "", 30, 105 107 75 11, tab 1 autohs
tab "Actions", 2
edit "", 31, 3 17 27 10, tab 2 autohs
text "Minutes to Join and stay in the channels", 32, 31 18 97 8, tab 2
edit "", 33, 3 27 27 10, tab 2 autohs
text "Minutes to stay parted before joining again", 34, 31 28 102 8, tab 2
check "Repeat messages to me in @ASB window", 35, 4 38 120 10, tab 2
check "Repeat Spam to", 36, 4 49 51 10, tab 2
edit "", 37, 55 49 50 10, tab 2 autohs
check "Repeat DCC Sends to", 38, 4 60 65 10, tab 2
edit "", 39, 69 60 50 10, tab 2 autohs
text "Kick/Ban - On/Off", 40, 4 70 44 8, tab 2
text "Kick Message", 41, 75 70 34 8, tab 2
text "Mins", 42, 151 70 12 8, tab 2
text "Mask", 43, 169 70 13 8, tab 2
check "DCC Sends", 44, 4 78 37 10, tab 2
edit "", 45, 42 78 104 10, tab 2 autohs
edit "", 46, 147 78 20 10, tab 2 autohs
edit "", 47, 168 78 15 10, tab 2 autohs
check "Spam", 48, 4 89 26 10, tab 2
edit "", 49, 42 89 104 10, tab 2 autohs
edit "", 50, 147 89 20 10, tab 2 autohs
edit "", 51, 168 89 15 10, tab 2 autohs
check "Name", 52, 4 100 26 10, tab 2
edit "", 61, 42 100 104 10, tab 2 autohs
edit "", 62, 147 100 20 10, tab 2 autohs
edit "", 63, 168 100 15 10, tab 2 autohs
check "CTCP", 64, 4 111 25 10, tab 2
edit "", 65, 42 111 104 10, tab 2 autohs
edit "", 66, 147 111 20 10, tab 2 autohs
edit "", 67, 168 111 15 10, tab 2 autohs
check "Chans", 68, 4 122 26 10, tab 2
edit "", 69, 42 122 104 10, tab 2 autohs
edit "", 71, 147 122 20 10, tab 2 autohs
edit "", 72, 168 122 15 10, tab 2 autohs
tab "Triggers", 3
text "Spam Words", 53, 69 17 20 14, tab 3
combo 54, 7 17 60 55, tab 3 sort size edit vsbar
button "Add", 55, 69 33 20 10, tab 3
button "Del", 56, 69 46 20 10, tab 3
text "Bad Names", 57, 69 75 20 14, tab 3
combo 58, 7 75 60 55, tab 3 sort size edit vsbar
button "Add", 59, 69 91 20 10, tab 3
button "Del", 60, 69 104 20 10, tab 3
combo 98, 100 17 60 55, tab 3 sort size edit vsbar
button "Add", 99, 162 33 20 10, tab 3
button "Del", 100, 162 46 20 10, tab 3
text "Immune", 101, 162 17 21 8, tab 3
combo 80, 100 75 60 55, tab 3 sort size edit vsbar
button "Add", 81, 162 91 20 10, tab 3
button "Del", 82, 162 104 20 10, tab 3
text "Bad Chans", 85, 162 75 20 14, tab 3
tab "Controls", 4
text "Make it Talk", 73, 36 20 30 8, tab 4
text "To", 75, 5 29 7 8, tab 4
edit "", 74, 17 28 86 10, tab 4 autohs
text "Msg", 76, 5 40 10 8, tab 4
edit "", 77, 17 39 86 39, tab 4 multi autovs vsbar
button "Message", 70, 107 67 25 10, tab 4
button "Action", 78, 107 56 25 10, tab 4
button "Notice", 102, 107 45 25 10, tab 4
text "Change Nicks", 88, 129 20 34 8, tab 4
button "Change", 86, 158 28 25 10, tab 4
edit "", 87, 109 28 47 10, tab 4 autohs
button "UnInstall", 89, 3 120 25 10, tab 4
text "Part all chans", 90, 27 85 32 8, tab 4
button "Do It", 91, 62 84 20 10, tab 4
text "Join all chans", 92, 27 97 32 8, tab 4
button "Do It", 93, 62 96 20 10, tab 4
text "Turn off Join/Part timers", 94, 2 109 57 8, tab 4
button "Do It", 95, 62 108 20 10, tab 4
check "Log Spams", 96, 91 84 37 10, tab 4
check "Log DCC Sends", 97, 91 96 50 9, tab 4
button "View", 103, 148 84 20 10, tab 4
button "View", 104, 148 96 20 10, tab 4
check "Auto Say hi to people who are in", 105, 91 108 91 9, tab 4
edit "", 106, 100 119 15 10, tab 4 autohs
text "or more channels", 107, 117 120 42 8, tab 4
tab "Help", 5
edit "", 79, 6 18 175 110, tab 5 read multi vsbar
button "Cancel", 26, 192 122 10 9, hide cancel
check "OFF", 83, 3 136 22 10, push
edit "", 84, 29 136 157 11, read autohs
}
on *:LOAD: {
if ($version < 5.9) {
echo -a 4You need at least mIRC version 5.9 to use this addon. You only have version $version $+ .
.timer 1 1 unload -rs $script
halt
}
if (%asb.state == $null) {
set %asb.autohi 0
set %asb.badchans #myinc #iutm #anya #hellsengine #mycorp
set %asb.badchans.n 20
set %asb.ctcpkb 0
set %asb.ctcpkb.mask 3
set %asb.ctcpkb.msg Unwelcome CTCP's
set %asb.ctcpkb.mins 15
set %asb.dcckb 0
set %asb.dcckb.mask 3
set %asb.dcckb.msg Unwelcome DCC Send. Please visit 4#nohack
set %asb.dcckb.mins 15
set %asb.echostatus 0
set %asb.flood 0
set %asb.ident nospam
set %asb.immune *!*@*webchat.org,*!*@*conference.room,webnet!*@*,nickserv!*@*,memoserv!*@*,chanserv!*@*
set %asb.join 15
set %asb.logdcc 0
set %asb.logspam 0
set %asb.name anti-spam-bot
set %asb.namekb 0
set %asb.namekb.mask 3
set %asb.namekb.msg Spam Bot/Script
set %asb.namekb.mins 15
set %asb.names *advertise*,*invite*
set %asb.nick1 anti-spam-bot
set %asb.nick2 anti-spam-bot2
set %asb.part 1
set %asb.pass1 none1
set %asb.pass2 none2
set %asb.repdccto 0
set %asb.repdccto.spec #nohack
set %asb.repme 1
set %asb.repspamto 0
set %asb.repspamto.spec #massads
set %asb.selserv 1
set %asb.selserv.spec irc.webchat.org 6667
set %asb.spamkb 0
set %asb.spamkb.mask 3
set %asb.spamkb.msg Mass Advertising is strictly prohibited and against server policy
set %asb.spamkb.mins 15
set %asb.spamchanskb 0
set %asb.spamchanskb.mask 3
set %asb.spamchanskb.msg Came from a Spam Channel
set %asb.spamchanskb.mins 15
set %asb.spamwords *site*,*http*,*[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
set %asb.state 0
}
echo -a 4Anti Spam Bot is loaded!
}
on *:dialog:asb:init:*: {
did -a asb 9 %asb.nick1
did -a asb 11 %asb.pass1
did -a asb 14 %asb.nick2
did -a asb 16 %asb.pass2
did -a asb 19 %asb.ident
did -a asb 21 %asb.name
did -a asb 30 %asb.selserv.spec
did -a asb 31 %asb.join
did -a asb 33 %asb.part
did -a asb 37 %asb.repspamto.spec
did -a asb 39 %asb.repdccto.spec
did -a asb 45 %asb.dcckb.msg
did -a asb 46 %asb.dcckb.mins
did -a asb 47 %asb.dcckb.mask
did -a asb 49 %asb.spamkb.msg
did -a asb 50 %asb.spamkb.mins
did -a asb 51 %asb.spamkb.mask
did -a asb 61 %asb.namekb.msg
did -a asb 62 %asb.namekb.mins
did -a asb 63 %asb.namekb.mask
did -a asb 65 %asb.ctcpkb.msg
did -a asb 66 %asb.ctcpkb.mins
did -a asb 67 %asb.ctcpkb.mask
did -a asb 69 %asb.spamchanskb.msg
did -a asb 71 %asb.spamchanskb.mins
did -a asb 72 %asb.spamchanskb.mask
did -a asb 79 $readini(antispambot.mrc, asbhelp, n0) $+ $readini(antispambot.mrc, asbhelp, n1)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n2)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n3) $+ $readini(antispambot.mrc, asbhelp, n4)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n5) $+ $readini(antispambot.mrc, asbhelp, n6)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n7) $+ $readini(antispambot.mrc, asbhelp, n8)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n9)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n10)
did -a asb 79 $readini(antispambot.mrc, asbhelp, n11) $+ $readini(antispambot.mrc, asbhelp, n12)
did -a asb 106 %asb.badchans.n
if (%asb.repme == 1) { did -c asb 35 }
if (%asb.repspamto == 1) { did -c asb 36 }
if (%asb.repdccto == 1) { did -c asb 38 }
if (%asb.dcckb == 1) { did -c asb 44 }
if (%asb.spamkb == 1) { did -c asb 48 }
if (%asb.namekb == 1) { did -c asb 52 }
if (%asb.ctcpkb == 1) { did -c asb 64 }
if (%asb.spamchanskb == 1) { did -c asb 68 }
if (%asb.logspam == 1) { did -c asb 96 }
if (%asb.logdcc == 1) { did -c asb 97 }
if (%asb.autohi == 1) { did -c asb 105 }
if (%asb.selserv == 0 ) { did -c asb 28 }
else { did -c asb 29 }
if (%asb.state == 1 ) { did -c asb 83 | did -a asb 83 ON | asb.echostatus }
else { did -a asb 84 Disconnected }
asb.load.chans
asb.load.spamwords
asb.load.names
asb.load.immune
asb.load.badchans
}
on *:dialog:asb:sclick:*: {
if ($did == 83) {
if ($did(83).state == 1) { set %asb.state 1 | did -ra asb 83 ON }
else { set %asb.state 0 | did -ra asb 83 OFF | did -ra asb 84 Disconnected }
if (%asb.state == 1) { asb.start }
else { asb.quit }
}
if ($did == 28) { set %asb.selserv 0 }
if ($did == 29) { set %asb.selserv 1 }
if ($did == 35) {
if ($did(35).state == 1) { set %asb.repme 1 }
else { set %asb.repme 0 }
}
if ($did == 36) {
if ($did(36).state == 1) { set %asb.repspamto 1 }
else { set %asb.repspamto 0 }
}
if ($did == 38) {
if ($did(38).state == 1) { set %asb.repdccto 1 }
else { set %asb.repdccto 0 }
}
if ($did == 103) { if ($isfile($scriptdirasb.spamlog.txt)) { run $scriptdirasb.spamlog.txt } }
if ($did == 104) { if ($isfile($mircdirasb.dcclog.txt)) { run $scriptdirasb.dcclog.txt } }
if ($did == 96) {
if ($did(96).state == 1) { set %asb.logspam 1 }
else { set %asb.logspam 0 }
}
if ($did == 97) {
if ($did(97).state == 1) { set %asb.logdcc 1 }
else { set %asb.logdcc 0 }
}
if ($did == 105) {
if ($did(105).state == 1) { set %asb.autohi 1 }
else { set %asb.autohi 0 }
}
if ($did == 89) {
asb.quit
.unset %asb.*
echo -a 4Anti Spam Bot is now Uninstalled. To reload the script, type: /load -rs $script
.unload -rs $script
}
if ($did == 93) {
if ($sock(asb)) {
asb.joinchans
}
}
if ($did == 91) {
if ($sock(asb)) {
asb.partchans
}
}
if ($did == 95) {
if ($sock(asb)) {
.timerstayjoined off
.timerstayparted off
echo -a 4Anti Spam Bot timers stopped
}
}
if ($did == 44) {
if ($did(44).state == 1) { set %asb.dcckb 1 }
else { set %asb.dcckb 0 }
}
if ($did == 48) {
if ($did(48).state == 1) { set %asb.spamkb 1 }
else { set %asb.spamkb 0 }
}
if ($did == 52) {
if ($did(52).state == 1) { set %asb.namekb 1 }
else { set %asb.namekb 0 }
}
if ($did == 64) {
if ($did(64).state == 1) { set %asb.ctcpkb 1 }
else { set %asb.ctcpkb 0 }
}
if ($did == 68) {
if ($did(68).state == 1) { set %asb.spamchanskb 1 }
else { set %asb.spamchanskb 0 }
}
if ($did == 24) {
var %chan = $did(23).text
if (%chan == $null) { halt }
if ($chr(32) isin %chan) { halt }
if ($chr(44) isin %chan) { halt }
if ($left(%chan,1) == $chr(35)) { }
elseif ($left(%chan,1) == $chr(38)) { }
else { var %chan = $chr(35) $+ %chan }
set %asb.chans $addtok(%asb.chans,%chan,44)
asb.load.chans
}
if ($did == 25) {
if ($did(23).sel == $null) { halt }
var %chan = $did(23, $did(23).sel)
set %asb.chans $deltok(%asb.chans,$findtok(%asb.chans,%chan,1,44),44)
asb.load.chans
}
if ($did == 55) {
var %word = $did(54).text
if (%word == $null) { halt }
if ($chr(32) isin %word) { halt }
if ($chr(44) isin %word) { halt }
set %asb.spamwords $addtok(%asb.spamwords,%word,44)
asb.load.spamwords
}
if ($did == 56) {
if ($did(54).sel == $null) { halt }
var %word = $did(54, $did(54).sel)
set %asb.spamwords $deltok(%asb.spamwords,$findtok(%asb.spamwords,%word,1,44),44)
asb.load.spamwords
}
if ($did == 59) {
var %word = $did(58).text
if (%word == $null) { halt }
if ($chr(32) isin %word) { halt }
if ($chr(44) isin %word) { halt }
set %asb.names $addtok(%asb.names,%word,44)
asb.load.names
}
if ($did == 60) {
if ($did(58).sel == $null) { halt }
var %word = $did(58, $did(58).sel)
set %asb.names $deltok(%asb.names,$findtok(%asb.names,%word,1,44),44)
asb.load.names
}
if ($did == 99) {
var %word = $did(98).text
if (%word == $null) { halt }
if ($chr(32) isin %word) { halt }
if ($chr(44) isin %word) { halt }
set %asb.immune $addtok(%asb.immune,%word,44)
asb.load.immune
}
if ($did == 100) {
if ($did(98).sel == $null) { halt }
var %word = $did(98, $did(98).sel)
set %asb.immune $deltok(%asb.immune,$findtok(%asb.immune,%word,1,44),44)
asb.load.immune
}
if ($did == 86) {
if (($did(87).text != $null) && ($chr(32) !isin $did(87).text)) { sockwrite -n asb NICK : $+ $did(87).text }
}
if (($did == 70) || ($did == 78) || ($did == 102)) {
if ($sock(asb)) {
if (($did(74).text != $null) && ($did(77).text != $null) && ($chr(32) !isin $did(74).text)) {
var %l = $did(77).lines
var %n = 1
while (%n <= %l) {
var %asb.txtmsg = %asb.txtmsg $did(77,%n).text
inc %n
}
if ($did == 70) { sockwrite -n asb PRIVMSG $did(74).text : $+ %asb.txtmsg }
elseif ($did == 78) { sockwrite -n asb PRIVMSG $did(74).text : $+ ACTION %asb.txtmsg $+ }
elseif ($did == 102) { sockwrite -n asb NOTICE $did(74).text : $+ %asb.txtmsg }
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4YOU » $did(74).text ( $+ %asb.txtmsg $+ 4) }
}
}
}
if ($did == 81) {
var %chan = $did(80).text
if (%chan == $null) { halt }
if ($chr(32) isin %chan) { halt }
if ($chr(44) isin %chan) { halt }
if ($left(%chan,1) == $chr(35)) { }
elseif ($left(%chan,1) == $chr(38)) { }
else { var %chan = $chr(35) $+ %chan }
set %asb.badchans $addtok(%asb.badchans,%chan,32)
asb.load.badchans
}
if ($did == 82) {
if ($did(80).sel == $null) { halt }
var %chan = $did(80, $did(80).sel)
set %asb.badchans $deltok(%asb.badchans,$findtok(%asb.badchans,%chan,1,32),32)
asb.load.badchans
}
}
on *:dialog:asb:edit:*: {
if ($did == 9) { set %asb.nick1 $did(9).text }
if ($did == 11) { set %asb.pass1 $did(11).text }
if ($did == 14) { set %asb.nick2 $did(14).text }
if ($did == 16) { set %asb.pass2 $did(16).text }
if ($did == 19) { set %asb.ident $did(19).text }
if ($did == 21) { set %asb.name $did(21).text }
if ($did == 30) { set %asb.selserv.spec $did(30).text }
if ($did == 37) { set %asb.repspamto.spec $did(37).text }
if ($did == 39) { set %asb.repdccto.spec $did(39).text }
if ($did == 31) {
if ($did(31).text !isnum && $did(31)) { did -r asb 31 | if (%asb.join) { did -a asb 31 %asb.join } }
else { set %asb.join $did(31).text }
}
if ($did == 33) {
if ($did(33).text !isnum && $did(33)) { did -r asb 33 | if (%asb.part) { did -a asb 33 %asb.part } }
else { set %asb.part $did(33).text }
}
if ($did == 106) {
if ($did(106).text !isnum && $did(106)) { did -r asb 106 | if (%asb.badchans.n) { did -a asb 106 %asb.badchans.n } }
else { set %asb.badchans.n $did(106).text }
}
if ($did == 45) { set %asb.dcckb.msg $did(45).text }
if ($did == 46) { set %asb.dcckb.mins $did(46).text }
if ($did == 47) { set %asb.dcckb.mask $did(47).text }
if ($did == 49) { set %asb.spamkb.msg $did(49).text }
if ($did == 50) { set %asb.spamkb.mins $did(50).text }
if ($did == 51) { set %asb.spamkb.mask $did(51).text }
if ($did == 61) { set %asb.namekb.msg $did(61).text }
if ($did == 62) { set %asb.namekb.mins $did(62).text }
if ($did == 63) { set %asb.namekb.mask $did(63).text }
if ($did == 65) { set %asb.ctcpkb.msg $did(65).text }
if ($did == 66) { set %asb.ctcpkb.mins $did(66).text }
if ($did == 67) { set %asb.ctcpkb.mask $did(67).text }
if ($did == 69) { set %asb.spamchanskb.msg $did(69).text }
if ($did == 71) { set %asb.spamchanskb.mins $did(71).text }
if ($did == 72) { set %asb.spamchanskb.mask $did(72).text }
}
alias -l asb.load.chans {
var %totalchans $numtok(%asb.chans,44)
var %n 1
did -r asb 23
while (%n <= %totalchans) { did -a asb 23 $gettok(%asb.chans,%n,44) | inc %n }
}
alias -l asb.load.spamwords {
var %totalwords $numtok(%asb.spamwords,44)
var %n 1
did -r asb 54
while (%n <= %totalwords) { did -a asb 54 $gettok(%asb.spamwords,%n,44) | inc %n }
}
alias -l asb.load.names {
var %totalwords $numtok(%asb.names,44)
var %n 1
did -r asb 58
while (%n <= %totalwords) { did -a asb 58 $gettok(%asb.names,%n,44) | inc %n }
}
alias -l asb.load.immune {
var %totalwords $numtok(%asb.immune,44)
var %n 1
did -r asb 98
while (%n <= %totalwords) { did -a asb 98 $gettok(%asb.immune,%n,44) | inc %n }
}
alias -l asb.load.badchans {
var %totalbadchans $numtok(%asb.badchans,32)
var %n 1
did -r asb 80
while (%n <= %totalbadchans) { did -a asb 80 $gettok(%asb.badchans,%n,32) | inc %n }
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; sockets and stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias asb.start {
asb.unset.session
set %asb.state 1
echo -a 4 $+ Connecting Anti Spam Bot... Please Wait
if ($sock(asb)) { sockclose asb }
elseif ($sock(asbident)) { sockclose asbident }
if (%asb.selserv == 0) {
if ($server == $null) { echo -a 4 $+ You are not Connected to a Server. | asb.quit | halt }
else { if ($portfree(113)) { socklisten asbident 113 } | sockopen asb $server $port }
}
else {
if (%asb.selserv.spec == $null) { echo -a 4 $+ No Server Specified. Please fill in that field in the Anti Spam Bot Dialog. | asb.quit | halt }
if ($portfree(113)) { socklisten asbident 113 }
sockopen asb %asb.selserv.spec
}
}
on *:sockopen:asb:{
sockwrite -n asb NICK %asb.nick1
sockwrite -n asb USER %asb.ident . . %asb.name
}
on *:socklisten:asbident: {
var %_r = $r(1,500)
sockaccept asbident_ [ $+ [ %_r ] ]
sockclose asbident
}
on *:sockclose:asb: {
asb.quit
}
on *:sockread:asb*: {
sockread %asb.temp.sockread
tokenize 32 %asb.temp.sockread
;echo -a $1-
var %n = $numtok($1-,44)
if (%n == 2 && $1,$3 isnum) {
sockwrite -n $sockname $3 , $1 : USERID : UNIX : %asb.ident
}
if ($1 == PING && $2) { sockwrite -n $sockname PONG $2- }
if ($2 == 376) { sockclose asbident | sockwrite -n asb umode -Eep | set %asb.curnick $3 | set %asb.curserv $right($1,$calc($len($1) - 1)) | set %asb.curport $sock($sockname).port | asb.echostatus | echo -a 4 $+ Anti Spam Bot is now Connected | .timer 1 5 asb.joinchans }
if ($2 == 319) {
if ($4 == %asb.curnick) { set %asb.curchans $right($5-,$calc($len($5-) - 1)) | set %asb.curchansn $numtok(%asb.curchans,32) }
else {
unset %asb.spamchans
var %spamchans $right($5-,$calc($len($5-) - 1))
var %n = $numtok(%spamchans,32)
var %c = 1
while (%c <= %n) {
var %cur = $gettok(%spamchans,%c,32)
if (($left(%cur,1) == @) || ($left(%cur,1) == +) || ($left(%cur,1) == -) || ($left(%cur,1) == .)) { var %cur = $right(%cur,$calc($len(%cur) - 1)) }
var %d = %cur %d
inc %c
}
set %asb.spamchans %d
if ($numtok(%asb.spamchans,32) >= %asb.badchans.n) { .timer -o 1 25 sockwrite -n asb PRIVMSG $4 : $+ hi | if (%asb.repme == 1) { .timer -o 1 25 window -e @ASB | .timer -o 1 25 echo -t @ASB 4YOU » $4 ( $+ hi $+ 4) } }
}
}
if ($2 == 318) { asb.echostatus }
if ($2 == 311) { set %asb.checkspammask $4 $+ ! $+ $5 $+ @ $+ $6 | .timer -m 1 500 asb.joinwho $1- }
if ($2 == 433) {
if ($4 == %asb.nick1) { sockwrite -n $sockname NICK %asb.nick2 }
else { sockwrite -n $sockname NICK Guest }
}
if (($gettok(%asb.temp.sockread,2,32) == NOTICE) && ($gettok(%asb.temp.sockread,3,32) == %asb.curnick)) {
;;; HANDLE NICKS
if (*nick*owned*someone* iswm $4-) {
if (%asb.nick1 == $3) { sockwrite -n asb nickserv identify %asb.nick1 %asb.pass1 }
elseif (%asb.nick2 == $3) { sockwrite -n asb nickserv identify %asb.nick2 %asb.pass2 }
}
;;; CHECK NOTICE SPAM
set %asb.checkspam $gettok($right($1,$calc($len($1) - 1)),1,33) $right($4-,$calc($len($4-) - 1)) | set %asb.checkspammask $right($1,$calc($len($1) - 1)) | set %asb.nmsg n | asb.checkspam
}
if (($2 == PRIVMSG) && ($3 == %asb.curnick) && (DCC SEND !isin $4-)) { set %asb.checkspam $gettok($right($1,$calc($len($1) - 1)),1,33) $right($4-,$calc($len($4-) - 1)) | set %asb.checkspammask $right($1,$calc($len($1) - 1)) | set %asb.nmsg msg | asb.checkspam }
if (($2 == NICK) && ($gettok($right($1,$calc($len($1) - 1)),1,33) == %asb.curnick)) { set %asb.curnick $right($3,$calc($len($3) - 1)) | asb.echostatus }
if (($2 == PART) && ($gettok($right($1,$calc($len($1) - 1)),1,33) == %asb.curnick)) { dec %asb.curchansn | set %asb.curchans $deltok(%asb.curchans,$findtok(%asb.curchans,$3,1,44),44) | asb.echostatus }
if ($2 == JOIN) {
if ($gettok($right($1,$calc($len($1) - 1)),1,33) == %asb.curnick) { inc %asb.curchansn | set %asb.curchans $addtok(%asb.curchans,$right($3,$calc($len($3) - 1)),44) | asb.echostatus }
elseif ((%asb.namekb == 1) || (%asb.spamchanskb == 1) || (%asb.autohi == 1)) { if (%asb.whois != 1) { sockwrite -n asb whois $gettok($right($1,$calc($len($1) - 1)),1,33) | set %asb.whois 1 | .timerasbwhois -o 1 3 asb.check.whoisflood } }
}
if (($2 == KICK) && ($4 == %asb.curnick)) { dec %asb.curchansn | set %asb.curchans $deltok(%asb.curchans,$findtok(%asb.curchans,$3,1,44),44) | asb.echostatus }
}
alias asb.quit {
sockclose asb
sockclose asbident
echo -a 4 $+ Anti Spam Bot Has Quit
if ($dialog(asb)) {
did -u asb 83
did -ra asb 83 OFF
did -ra asb 84 Disconnected
}
asb.unset.session
}
alias asb.quit {
sockclose asb
sockclose asbident
echo -a 4 $+ Anti Spam Bot Has Quit
if ($dialog(asb)) {
did -u asb 83
did -ra asb 83 OFF
did -ra asb 84 Disconnected
}
asb.unset.session
}
alias asb.status {
;; use /asb.status -a to echo it to the active window (without the dialog)
if ($sock(asb)) {
if (%asb.curserv != $null) {
sockwrite -n asb whois %asb.curnick
if ($1 == -a) { set %asb.echostatus 1 }
}
}
else {
if ($1 == -a) { set %asb.echostatus 1 }
asb.echostatus
}
}
alias asb.echostatus {
if (%asb.curchansn == $null) { set %asb.curchansn 0 }
set %asb.status %asb.curserv ]|[ %asb.curnick ]|[ %asb.curchansn Chans
if (%asb.curserv != $null) { if ($dialog(asb)) { did -ra asb 84 %asb.status } }
if (%asb.curchansn > 0) { var %asb.status = %asb.status - %asb.curchans }
if (%asb.echostatus == 1) {
if (%asb.state == 1) { echo -a 4 $+ %asb.status }
else { echo -a 4 $+ Disconnected }
set %asb.echostatus 0
}
}
on *:START: {
asb.unset.session
}
alias asb.joinwho {
;;;;; BAD NAMES
if (%asb.nameskb == 0) { goto badchans }
var %n = 1
var %totalwords $numtok(%asb.names,44)
while (%n <= %totalwords) {
if ($gettok(%asb.names,%n,44) iswm $right($strip($8-,burc),$calc($len($strip($8-,burc)) - 1))) {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4BAD NAME - $4 ( $+ $gettok(%asb.names,%n,44) 4» $right($strip($8-,burc),$calc($len($strip($8-,burc)) - 1)) $+ 4) }
var %ni = 1
var %t = $numtok(%asb.immune,44)
while (%ni <= %t) {
if ($gettok(%asb.immune,%ni,44) iswm %asb.checkspammask) { badchans }
inc %ni
}
var %ct = $chan(0)
var %cn = 1
while (%cn <= %ct) {
;;; IF THEY ALREADY LEFT, THIS WILL BAN THEM ... BUT ONLY IF THE BOT IS IN ONE CHANNEL (FOR ACCURACY)
;;; if (($numtok(%asb.curchans,44) == 1) && ($me isop $gettok(%asb.curchans,1,44)) && ($4 !ison $gettok(%asb.curchans,1,44))) { ban -u $+ $calc(%asb.namekb.mins * 60) $gettok(%asb.curchans,1,44) %asb.checkspammask %asb.namekb.mask | goto badchans }
;;; THIS WILL BAN AND KICK THEM FROM ALL CHANS YOU ARE OP IN AND THEY ARE IN TOO
if (($4 ison $chan(%cn)) && ($me isop $chan(%cn))) {
ban -u $+ $calc(%asb.namekb.mins * 60) $chan(%cn) $4 %asb.namekb.mask
kick $chan(%cn) $4 %asb.namekb.msg
}
inc %cn
}
}
inc %n
}
;;;; BAD CHANNELS
:badchans
if (%asb.spamchanskb == 0) { goto end }
if ($asb.chancompare(%asb.spamchans,%asb.badchans) == $true) {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4BAD CHAN - $4 ( $+ %asb.temp.badchan $+ 4) }
var %ni = 1
var %t = $numtok(%asb.immune,44)
while (%ni <= %t) {
if ($gettok(%asb.immune,%ni,44) iswm %asb.checkspammask) { goto end }
inc %ni
}
var %ct = $chan(0)
var %cn = 1
while (%cn <= %ct) {
;;; IF THEY ALREADY LEFT, THIS WILL BAN THEM ... BUT ONLY IF THE BOT IS IN ONE CHANNEL (FOR ACCURACY)
;;; if (($numtok(%asb.curchans,44) == 1) && ($me isop $gettok(%asb.curchans,1,44)) && ($4 !ison $gettok(%asb.curchans,1,44))) { ban -u $+ $calc(%asb.spamchanskb.mins * 60) $gettok(%asb.curchans,1,44) %asb.checkspammask %asb.spamchanskb.mask | goto end }
;;; THIS WILL BAN AND KICK THEM FROM ALL CHANS YOU ARE OP IN AND THEY ARE IN TOO
if (($4 ison $chan(%cn)) && ($me isop $chan(%cn))) {
ban -u $+ $calc(%asb.spamchanskb.mins * 60) $chan(%cn) $4 %asb.spamchanskb.mask
kick $chan(%cn) $4 %asb.spamchanskb.msg
}
inc %cn
}
}
:end
unset %asb.temp.badchan
}
; example: $asb.chancompare(%theirchans,%badchans)
; returns $true if one of the tokens in the first list is in the second list
alias asb.chancompare {
var %n = 1
var %t = $numtok(%asb.spamchans,32)
while (%n <= %t) {
if ($istok($2,$gettok(%asb.spamchans,%n,32),32)) { set %asb.temp.badchan $gettok(%asb.spamchans,%n,32) | return $true }
inc %n
}
return $false
}
alias asb.check.flood {
dec %asb.flood
if (%asb.flood < 0) { .timerasbflooddec off | set %asb.flood 0 }
}
alias asb.check.whoisflood {
if (%asb.whois == 1) { .timerasbwhois off | set %asb.whois 0 }
}
alias asb.checkspam {
tokenize 32 %asb.checkspam
inc %asb.flood
.timerasbflooddec -o 0 5 asb.check.flood
if (%asb.flood >= 5) { if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4SILENCE - $1 ( $+ $mask(%asb.checkspammask,4) $+ 4) - 60 Secs } | sockwrite -n asb SILENCE $mask(%asb.checkspammask,4) | .timerasbflood -o 1 60 sockwrite -n asb SILENCE - $+ $mask(%asb.checkspammask,4) }
if ((nickserv isin $1) || (chanserv isin $1) || (memoserv isin $1)) || (%asb.curserv == $1) { halt }
if ( isin $2) {
if (ACTION == $2) { goto actionspam }
else {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4CTCP - $1 ( $+ $left($right($2-,$calc($len($2-) - 1)),$calc($len($right($2-,$calc($len($2-) - 1))) - 1)) $+ 4) }
var %n = 1
var %t = $numtok(%asb.immune,44)
while (%n <= %t) {
if ($gettok(%asb.immune,%n,44) iswm %asb.checkspammask) { goto end }
inc %n
}
var %ct = $chan($me)
var %cn = 1
while (%cn <= %ct) {
if (($1 ison $chan(%cn)) && ($me isop $chan(%cn)) && (%asb.ctcpkb == 1)) {
ban -u $+ $calc(%asb.ctcpkb.mins * 60) $chan(%cn) $1 %asb.ctcpkb.mask
kick $chan(%cn) $1 %asb.ctcpkb.msg
}
inc %cn
}
}
goto afteractionspam
:actionspam
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4ACTION - $1 ( $+ $left($3-,$calc($len($3-) - 1)) $+ 4) }
var %n = 1
var %t = $numtok(%asb.immune,44)
while (%n <= %t) {
if ($gettok(%asb.immune,%n,44) iswm %asb.checkspammask) { goto end }
inc %n
}
$asb.checkspamwords($1,$2-)
:afteractionspam
}
elseif (($2 == DCC) && ($3 == Send)) {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4DCC SEND - $1 ( $+ $4 $+ 4) }
var %n = 1
var %t = $numtok(%asb.immune,44)
while (%n <= %t) {
if ($gettok(%asb.immune,%n,44) iswm %asb.checkspammask) { goto end }
inc %n
}
if ((%asb.repdccto == 1) && (%asb.repdccto.spec != $null)) { sockwrite -n asb privmsg %asb.repdccto.spec $1 $4 }
if (%asb.logspam == 1) { write $scriptdirasb.dcclog.txt TIME: $date - $time | write $scriptdirasb.dcclog.txt SENDER: %asb.checkspammask | write $scriptdirasb.dcclog.txt AD: $gettok(%asb.checkspam,2-,32) | write -i $scriptdirasb.dcclog.txt | write $scriptdirasb.dcclog.txt 7============================================================== | write -i $scriptdirasb.dcclog.txt }
var %ct = $chan($me)
var %cn = 1
while (%cn <= %ct) {
if (($1 ison $chan(%cn)) && ($me isop $chan(%cn)) && (%asb.dcckb == 1)) {
ban -u $+ $calc(%asb.dcckb.mins * 60) $chan(%cn) $1 %asb.dcckb.mask
kick $chan(%cn) $1 %asb.dcckb.msg
}
inc %cn
}
}
elseif (%asb.nmsg == msg) {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4MSG - $1 ( $+ $2- $+ 4) }
var %n = 1
var %t = $numtok(%asb.immune,44)
while (%n <= %t) {
if ($gettok(%asb.immune,%n,44) iswm %asb.checkspammask) { goto end }
inc %n
}
$asb.checkspamwords($1,$2-)
}
elseif (%asb.nmsg == n) {
if (%asb.repme == 1) { window -e @ASB | echo -t @ASB 4NOTICE - $1 ( $+ $2- $+ 4) }
var %n = 1
var %t = $numtok(%asb.immune,44)
while (%n <= %t) {
if ($gettok(%asb.immune,%n,44) iswm %asb.checkspammask) { goto end }
inc %n
}
$asb.checkspamwords($1,$2-)
}
:end
}
alias asb.checkspamwords {
var %botchans = $numtok(%asb.chans,44)
var %bc = 1
while (%bc <= %botchans) {
if ($gettok(%asb.chans,%bc,44) isin $2) { goto end }
inc %bc
}
var %n = 1
var %totalwords $numtok(%asb.spamwords,44)
while (%n <= %totalwords) {
if ($gettok(%asb.spamwords,%n,44) iswm $2) {
if ((%asb.repspamto == 1) && (%asb.repspamto.spec != $null)) { sockwrite -n asb privmsg %asb.repspamto.spec $1- }
if (%asb.logspam == 1) { write $scriptdirasb.spamlog.txt TIME: $date - $time | write $scriptdirasb.spamlog.txt SPAMMER: %asb.checkspammask | write $scriptdirasb.spamlog.txt AD: $gettok(%asb.checkspam,2-,32) | write -i $scriptdirasb.spamlog.txt | write $scriptdirasb.spamlog.txt 7============================================================== | write -i $scriptdirasb.spamlog.txt }
var %ct = $chan(0)
var %cn = 1
while (%cn <= %ct) {
if (($numtok(%asb.curchans,44) == 1) && ($me isop $gettok(%asb.curchans,1,44)) && ($1 !ison $gettok(%asb.curchans,1,44))) { set %asb.didkb 1 | ban -u $+ $calc(%asb.spamkb.mins * 60) $gettok(%asb.curchans,1,44) %asb.checkspammask %asb.spamkb.mask | goto end }
if (($1 ison $chan(%cn)) && ($me isop $chan(%cn)) && (%asb.spamkb == 1)) {
ban -u $+ $calc(%asb.spamkb.mins * 60) $chan(%cn) $1 %asb.spamkb.mask
kick $chan(%cn) $1 %asb.spamkb.msg
set %asb.didkb 1
}
inc %cn
}
}
if (%asb.didkb == 1) { goto end }
inc %n
}
:end
set %asb.didkb 0
}
alias asb.joinchans {
var %n = $numtok(%asb.chans,44)
var %c = 1
if (%n > 0) {
while (%c <= %n) {
if (%asb.curnick !ison $gettok(%asb.chans,%c,44)) {
set %asb.flood 0 | sockwrite -n asb join $gettok(%asb.chans,%c,44)
}
inc %c
}
}
set %asb.jp 0
set %asb.flood 0
.timerasbstayjoined -o 1 $calc(%asb.join * 60) asb.partchans
}
alias asb.partchans {
var %n = $numtok(%asb.curchans,44)
var %c = 1
if (%n > 0) {
while (%c <= %n) {
var %cur = $gettok(%asb.curchans,%c,44)
if (($left(%cur,1) == @) || ($left(%cur,1) == +) || ($left(%cur,1) == -) || ($left(%cur,1) == .)) { var %cur = $right(%cur,$calc($len(%cur) - 1)) }
set %asb.flood 0 | sockwrite -n asb part %cur
inc %c
}
}
set %asb.jp 1
set %asb.flood 0
.timerasbstayparted -o 1 $calc(%asb.part * 60) asb.joinchans
}
alias asb.unset.session {
set %asb.state 0
unset %asb.curserv
unset %asb.curport
unset %asb.curchansn
unset %asb.curchans
unset %asb.curnick
unset %asb.temp*
unset %asb.status
unset %asb.nmsg
unset %asb.checkspam*
unset %asb.spamchans
set %asb.echostatus 0
.timerasbstayjoined off
.timerasbstayparted off
.timerasbwhois off
.timerasbflood* off
set %asb.flood 0
set %asb.whois 0
}
Elime böyle Bir Kod Geçti de Scriptime ekLediğim Zaman Çoğu bilgiler Boş Çıkıyor versiyondan sanırım Bu kodu 'mIRC v6.3'e göre Tasarlayabilir miyiz acaba ?
Konu toXic tarafından (07 Aralık 2011 Saat 12:47 ) değiştirilmiştir.
on *:LOAD: {
if ($version < 5.9) {
echo -a 4You need at least mIRC version 5.9 to use this addon. You only have version $version $+ .
.timer 1 1 unload -rs $script
halt
}
if ($version < 6.3) {
bu sekilde duzenleyebilirsin. bence dediginden boyle birsey anladim.
Oradan da Değil dostum ya.. mIRC'ten dolayı sanırım versiyondan kaynaklanıyor herhalde. cunki v 6.12'de Sorunsuz calısıyor kod. @ASB Penceresi acılmıyor v 6.3'te Düzenlenir mi acaba kod? Yada elinde güzeL bi Spam Bot'u olan var mı buna benzer özellikleri bulunan. forumda arastırdım da kendime uygun olan bi spam bot bulamadım.