mIRC Home    About    Download    Register    News    Help

Print Thread
#208304 18/01/09 12:28 PM
Joined: Dec 2008
Posts: 24
H
hCK Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Dec 2008
Posts: 24
Quote:
on *:TEXT:!ban*:#channel:{
if ($nick isprotect $chan) {
write bans.txt $2 $chan $nick $ctime $3 $4-
if ($read(mplist.txt,s,$nick) >= $3) {
write -l $+ $readn mplist.txt $nick $calc($v1 - $3)
.mode $chan +b $2 $chan $2 2 $iif($4,$4-,banned)
.timer 1 $calc($3 * 3600) /mode $chan -b $2
if ($read(mplist.txt,s,$nick) == 0) {
mode $chan -o $nick
.notice $nick You have 0 mps left. You cannot use the !chanban commands anymore.
}
}
else { .notice $nick Sorry, you do not have enough points. }
}
else { .notice $nick Sorry, only Kdnk Members have access to that command. }
}
}


Why is it the if i try !ban MrKHmER 10 Test.
the bot will say Sorry, only Kdnk Members have access to that command.

the if ($nick isprotect $chan) { is not working.

how to fix because in channel me is the Protect &

hCK #208306 18/01/09 01:07 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
From the help file...
Quote:
isprotect if v1 is a user in your protect list for channel v2 (v2 optional)

So you're incorrectly using this operator (see /help Protect List). If you want to check for channel mode +a/&, see what I posted in this other thread just now.


Link Copied to Clipboard