set chans "#chan"
set authppl {"fido" "noob"}
set nynewtext2 "some text"
proc pub_staff {nick uhost hand chan text} {
global mynewtext2
if {[lsearch $::authppl [string tolower $nick]]} {
putserv "PRIVMSG $chan :$nick $mynewtext2"
} else { putserv "PRIVMSG $chan :$nick is not authorized to use this" }
}
set chans "#chan"
set authppl {"fido" "noob"}
set nynewtext2 "some text"
proc pub_staff {nick uhost hand chan text} {
global mynewtext2
if {[lsearch $::authppl [string tolower $nick]]} {
putserv "PRIVMSG $chan :$nick $mynewtext2"
} else { putserv "PRIVMSG $chan :$nick is not authorized to use this" }
}
set chans "#chan"
set authppl {"fido" "noob"}
set nynewtext2 "some text"
proc pub_staff {nick uhost hand chan text} {
global mynewtext2
if {[lsearch $::authppl [string tolower $nick]]} {
putserv "PRIVMSG $chan :$nick $mynewtext2"
} else { putserv "PRIVMSG $chan :$nick is not authorized to use this" }
}
Thanks i'll try it
set authppl {"name"}
set mynewtext6 "access"
proc pub_admin {nick uhost and chan text} {
global mynewtext6
if {[lsearch [string tolower $::authppl] [string tolower $nick]]} {
putserv "PRIVMSG $chan :$nick $mynewtext6"
} else {
putserv "PRIVMSG $chan :$nick is not authorized to use this"
}
}
This does not work all can access the command... even with the set authppl is filled
CrazyCat wrote:Just put lowercase entries in you list: YOU manage it, so YOU can choose if it muste be lowercase or case sensitive.
Im n00b to the tcl world so please help to write the script
Then become "un-n00b" and at least make some effort on your own behalf; these forums are full of hints/tips (apart from what you have been told already).
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM