HELP, On part message - 29/03/09 04:56 AM
I need to create a script once user part the channel with bad message e.g, * Parts: tess (badword) , my script will auto ban.
any idea?
any idea?
on @*:part:#:{ if badword isin $1- { ban $chan $nick } }
on @*:part:#:{ if badword isin $1- { ban $chan $nick } }
on !*:part:#: { if ($istok($1-,%badwords,32)) { .ban $chan $nick } } alias rembadword { if ($1) { if (!$istok(%badwords,$1,32)) { .var %e $input(Can not remove this " $+ $1 $+ " badword is not in the badword list!,houd,Error) | .halt } .set %badwords $remtok(%badwords,$1,32) .var %k $input(Successfully removed " $+ $1 $+ " from the badword list,oid,Information) } else .var %e $input(Wrong syntax: try using /rembadword <badword>,houd,Error) } alias addbadword { if ($1) { if ($istok(%badwords,$1,32)) { .var %e $input(Can not add this " $+ $1 $+ " badword is allready in the badword list!,houd,Error) | .halt } .set %badwords $addtok(%badwords,$1,32) .var %k $input(Successfully added " $+ $1 $+ " into the badword list,oid,Information) } else .var %e $input(Wrong syntax: try using /addbadword <badword>,houd,Error) }
on !*:TEXT:*:?: { if ($istok($1-,%badwords,32)) { .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ ) .ignore -p $nick | .closemsg $nick .timer 1 0 .echo $color(info) -at 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user $+ $nick $+ with address ( $+ $address($nick,2) $+ ) just told you the badword ( $+ $1- $+ ) and ignored! } }
on !*:TEXT:*:?: { if ($istok($1-,%badwords,32)) { .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ ) .ignore -p $nick | .closemsg $nick .timer 1 0 .echo $color(info) -at 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user $+ $nick $+ with address ( $+ $address($nick,2) $+ ) just told you the badword ( $+ $1- $+ ) and ignored! } }
on !*:TEXT:*:?: { if ($istok($1-,%badwords,32)) { .enable #badword .whois $nick .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ ) .ignore -p $nick | .closemsg $nick | .set %badword-nick $nick | .set %badword-say $1- .timer 1 3 .badword_inform } } #badword off raw 311:*: { .set %badnick-host $3 $+ @ $+ $4 } #badword end alias badword_inform { .echo $color(info) -ast 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user $+ %badword-nick $+ with address ( $+ %badnick-host $+ ) just told you the badword ( $+ %badword-say $+ ) and ignored! .unset %badword-* .disable #badword }
on !*:TEXT:*:?: { if ($istok($1-,%badwords,32)) { .enable #badword .whois $nick .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ ) .ignore -p $nick | .closemsg $nick | .set %badword-nick $nick | .set %badword-say $1- .timer 1 3 .badword_inform } } #badword off raw 311:*: { .set %badnick-host $3 $+ @ $+ $4 } #badword end alias badword_inform { .echo $color(info) -ast 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user $+ %badword-nick $+ with address ( $+ %badnick-host $+ ) just told you the badword ( $+ %badword-say $+ ) and ignored! .unset %badword-* .disable #badword }
.set %badnick-host $address($2,2)
.set %badnick-host $address($2,2)
raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }
raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }
menu * { BadWords Dialog: { /BwdI } } alias BwdI { { .dialog -m Bwordignore Bwordignore | .splay zip.wav } } dialog Bwordignore { title "Bad Word Ignore" size -1 -1 244 104 option dbu list 1, 7 11 125 77, sort size vsbar box "", 2, 3 3 183 98 button "Add WORD", 3, 142 12 37 12 button "Delete WORD", 4, 142 28 37 12 button "Ok/Cancel", 5, 142 76 37 12, ok cancel button "Turn On", 6, 142 44 37 12 button "Turn Off", 7, 142 60 37 12 edit $group(#badwords), 10, 154 89 14 10 edit "Bad Word Kicker - [/BwdK]", 11, 31 89 70 10, center } on *:dialog:Bwordignore:init:*: { /loadbuf -ro Bwordignore 1 badwords.txt did -ra $dname 10 $group(#badwords) dll $mdx SetMircVersion $version dll $mdx MarkDialog $dname dll $mdx SetFont $dname dll $mdx SetColor $dname dll mdx.dll SetBorderStyle 10 14 50 Georgia Bold dll mdx.dll SetColor $dname 10 text $rgb(%list1colour,%list2colour,%list3colour) dll $mdx SetFont $dname 10 14 40 Georgia Bold dll $mdx SetColor 10 text $rgb(255,0,0) } alias badwords { set %badwords $$?="Add Kick Words Here" write badwords.txt %badwords loadbuf -ro Bwordignore 1 badwords.txt } on *:Dialog:Bwordignore:sclick:1: { set %sel.text $did(1).seltext } on *:Dialog:Bwordignore:sclick:3: { badwords } on *:Dialog:Bwordignore:sclick:4: { write -ds $+ %sel.text badwords.txt | loadbuf -ro Bwordignore 1 badwords.txt } on *:Dialog:Bwordignore:sclick:*:{ if ($did == 6) { if (False isin %badwords) { halt } if ($input(Are you sure you want to Enable Bad Words Kick?,y)) { .enable #badwords | did -ra $dname 10 $group(#badwords) | .echo $active 0,4Bad Words Kick 0,12Enabled } } } if ($did == 7) { if (False isin %badwords) { halt } if ($input(Are you sure you want to Disable Bad Words Kick?,y)) { .disable #badwords | did -ra $dname 10 $group(#badwords) | .echo $active 0,12Bad Words Kick 0,4Disabled | unset %badwords | unset %sel.text } } #badwords off on @*:TEXT:*:#:{ if ($nick isop $chan) { return } var %i = $lines(badwords.txt) while (%i) { if ($read(badwords.txt,%i) isin $1-) { set -u30 %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] $calc( %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] + 1) if (%rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] >= 1) { { .ignore -p $+(*!*, $Ial($nick).addr) | .closemsg $nick } unset %rl.* } } dec %i } } on *:ACTION:*:#: { if ($nick isop $chan) { return } var %i = $lines(badwords.txt) while (%i) { if ($read(badwords.txt,%i) isin $1-) { set -u30 %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] $calc( %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] + 1) if (%rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] >= 1) { { .ignore -p $+(*!*, $Ial($nick).addr) | .closemsg $nick } unset %rl.* } } dec %i } } on *:CTCPREPLY:*:#: { if ($nick isop $chan) { return } var %i = $lines(badwords.txt) while (%i) { if ($read(badwords.txt,%i) isin $1-) { set -u30 %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] $calc( %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] + 1) if (%rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] >= 1) { { .ignore -p $+(*!*, $Ial($nick).addr) | .closemsg $nick } unset %rl.* } } dec %i } } on !*:part:#: { if ($nick isop $chan) { return } var %i = $lines(badwords.txt) while (%i) { if ($read(badwords.txt,%i) isin $1-) { set -u30 %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] $calc( %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] + 1) if (%rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] >= 1) { { .access $chan add deny $+(*!*, $Ial($nick).addr) 0 : BadWords } unset %rl.* } } dec %i } } on !*:TEXT:*:?: { if ($nick isop $chan) { return } var %i = $lines(badwords.txt) while (%i) { if ($read(badwords.txt,%i) isin $1-) { set -u30 %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] $calc( %rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] + 1) if (%rl. [ $+ [ $+(*!*, $Ial($nick).addr) ] ] >= 1) { { .ignore -p $+(*!*, $Ial($nick).addr) | .closemsg $nick } unset %rl.* } } dec %i } } #badwords end