I have been writing this script for about a week.. I have found my first problem.[12:52pm] <Asustek> [asus] Administrator Op (Kissmine)
[12:52pm] -Asustek- You have been Oped in #helpline
[12:52pm] <Kissmine> `op Moust\gone
[12:52pm] -Asustek- Moustgone is not in #helpline
Code: Select all
set asus_who [lindex $vasus 0]
if {[onchan $asus_who $chan] == "0"} {
puthelp "NOTICE $nick :$asus_who is not in \002$chan\002"
return 0
}
puthelp "PRIVMSG $asus(home) :$asus(logo) Oped \037(\037\002$nick!$uhost\002\037)\037 $chan \037\[\037\002Oped $asus_who\037\002]\037"
puthelp "NOTICE $nick :Given ops to \002$asus_who\002 in \002$chan\002"
puthelp "NOTICE $asus_who :You have been Oped in \002$chan\002 by \002$nick\002"
pushmode $chan +o $asus_who
return 0
}
}
Now I looked into using strings (but I am still learning them) I came up with something like this.. But it dont work!
Code: Select all
set asus_who [lindex $vasus 0]
if {[string match [lrange $asus_who 1 end] "\"]} {[string replace "\" "$char(141)}
if {[onchan $asus_who $chan] == "0"} {
puthelp "NOTICE $nick :$asus_who is not in \002$chan\002"
return 0
}
puthelp "PRIVMSG $asus(home) :$asus(logo) Oped \037(\037\002$nick!$uhost\002\037)\037 $chan \037\[\037\002Oped $asus_who\037\002]\037"
puthelp "NOTICE $nick :Given ops to \002$asus_who\002 in \002$chan\002"
puthelp "NOTICE $asus_who :You have been Oped in \002$chan\002 by \002$nick\002"
pushmode $chan +o $asus_who
return 0
}
}