I've look at the code and it seems that it work intermittently. Don't know if its and issue with TVRage.com or not. But i have another script written in TCL and it is basically the same thing and it seems to be working perfectly. Not sure what is wrong with this one. When i get a chance I'll go through the code entirely and see whats going on.
You could also use hash tables to make it keep more than just 3 messages. You can also combine all of your on Text events to make sure there are no errors.
on *:TEXT:*:#: {
var %Nick = $+($Nick,.Memo)
CheckMessages $Nick
if ($1 = !Read) {
if ($Hget(%Nick,Total) > 0) {
.msg $nick You have $v1 Messages.
var %a = 0
While (%a != $Hget(%Nick,Total)) {
inc %a
.msg $Nick $HGet(%Nick,%a)
}
}
}
elseif ($1 = !msg) { .notice $nick To send a message to someone, type !send name message you want to send! }
elseif ($1 = !Send) {
if (!$HGet(%Nick)) { .hmake $Nick }
if (!$Hget(%Nick,Total)) { .hadd -m %Nick Total 0 }
.hinc %Nick Total 1
.hadd %Nick $HGet(%Nick,Total) $3- -From $Nick @ $Time in $Chan
.notice $nick Your message to $2 has been sent! When they get back, they will receive the message!
}
if ($1 = !Clear) { .hdel %Nick }
}
on *:JOIN:#:CheckMessages $Nick
alias CheckMessages {
if ($Hget($+($2,.Memo),Total)) > 0) {
.notice $2 You have unread messages! To read them type !read or you can type !msg to send a message!
}
}
no problem, it uses a while loop to search through the ban list, entry by entry.
if ($Ibl($3,%a) iswm $address($2,5)) { mode $3 -b $IfMatch }
that checks each entry in the ban list against the nicks address using a wildcard match since most bans have some sort of wildcard string in them. if it matches in unbans the user.
if you got any other questions or need help just let me know.
gecko