Blacklist Help - 12/09/06 03:22 PM
Everything in this works but the !add. I was wondering if any of you would be able to fix this for me.
Thank you.
Thank you.
Code:
on me:*:join:#:{ if $hget(Blacklist,$+($network,.,$chan)) == $null { .hadd -m Blacklist $+($network,.,$chan) 3 .hadd -m Blacklist $network $addtok($hget(Blacklist,$network),$chan,44) } elseif $hget(Blacklist,$+($network,.,$chan)) < 1 { .msg $chan 4This channel has been blacklisted. If you wish to get off the black list message 6Xtibian4. .part $chan } else { .msg $chan 6There are4 $hget(Blacklist,$+($network,.,$chan)) kicks 6of me left before this channel is 4blacklisted6. } } on *:kick:#:{ if $knick == $me { .hdec -m Blacklist $+($network,.,$chan) 1 if $hget(Blacklist,$+($network,.,$chan)) { .join $chan } } } on *:start:{ if !$hget(Blacklist) { .hmake Blacklist 10 } if $exists(Blacklist.hsh) { .hload Blacklist Blacklist.hsh } } on *:exit:{ .hsave -o Blacklist Blacklist.hsh } on *:disconnect:{ .hsave -o Blacklist Blacklist.hsh } on *:connect:{ if $hget(Blacklist,$network) { .join $hget(Blacklist,$network) } } on *:text:!remove*:*:{ if ($nick == Xtibian) { if !$2 { .notice $nick 6No network or channel specified. } elseif !$3 { if $hfind(Blacklist,$+($2,.,*),0,w) { .hdel +w Blacklist $+($2,.,*) .notice $nick 6Network4 $2 6removed from 4blacklist6. } elseif $hfind(Blacklist,$+(*,.,$2),0,w) { .hdel +w Blacklist $+(*,.,$2) .notice $nick 6Channel4 $2 6removed from all networks on 4blacklist6. } else { .notice $nick $2 not found in blacklist. } } elseif $hfind(Blacklist,$+($2,.,$3),0) { .hdel Blacklist $+($2,.,$3) .notice $nick Channel $3 on network $2 removed from blacklist. } else { .hsave -o Blacklist Blacklist.hsh | .hload Blacklist Blacklist.hsh .notice $nick Channel $3 on network $2 not found on blacklist. } } else { .notice $nick Channel $3 on network $2 not found on blacklist. } } on *:text:!add*:*:{ if ($nick == Xtibian) { if !$2 { .notice $nick 6No network or channel specified. } elseif !$3 { .hadd -m Blacklist $+($network,.,$2) .hadd -m Blacklist $network $addtok($hget(Blacklist,$network),$2,44) .notice $nick Channel $2 added for Network $network } else { .hadd -m Blacklist $+($2,.,$3) .hadd -m Blacklist $2 $addtok($hget(Blacklist,$2),$3,44) .notice $nick Channel $2 added for Network $3 } } .hsave -o Blacklist Blacklist.hsh | .hload Blacklist Blacklist.hsh }