bind pub o|o !control control
bind pub o|o .control control
proc control {nick host hand chan text} {
global flagaccess
if {(![matchattr $hand $flagaccess $chan]) && ([onchan $nick $chan])} {putquick "PRIVMSG $chan :\2sorry $nick :/\2 I feel it you have no privileges. =)" ; return 0}
puthelp "NOTICE $chan :$nick all the commands are in wwww.tets1."
}
good I wait for all that he learns more on tcl thanks for shaping a solid group of help
#### tcl ####
set flagaccess "mnofb"
bind pub - !control control
bind pub - .control control
proc control {nick host hand chan text} {
global flagaccess
if {(![matchattr $hand $flagaccess $chan]) && ([onchan $nick $chan])} {
putquick "PRIVMSG $chan :\2sorry $nick :/\2 I feel it you have no privileges. =)" ; return 0
}
puthelp "NOTICE $chan :$nick all the commands are in wwww.tets1."
}
good I wait for all that he learns more on tcl thanks for shaping a solid group of help
set flagaccess "mnofb"
bind pub - !control control
bind pub - .control control
proc control {nick host hand chan text} {
global flagaccess
if {(![matchattr $hand $flagaccess $chan]) && ([onchan $nick $chan])} {
puthelp "PRIVMSG $chan :\2sorry $nick :/\2 I feel it you have no privileges. =)" ; return 0
}
puthelp "NOTICE $chan :$nick all the commands are in wwww.tets1."
}
is correct caesar ?
good I wait for all that he learns more on tcl thanks for shaping a solid group of help
Apart from changing from putquick to puthelp according to my recommendation, I still see the onchan and that you didn't use the if .. else .. syntax.
Anyway, just to be on the safe side I've added user's throttle proc to limit the non registered users from flooding the bot to one command every 5 seconds, or how many you wish.
set flagaccess "mnofb"
bind pub - !control control
bind pub - .control control
proc control {nick uhost hand chan text} {
global flagaccess
if {![matchattr $hand $flagaccess $chan]} {
if {![throttled $chan 5]} {
puthelp "PRIVMSG $chan :\2sorry $nick :/\2 I feel it you have no privileges. =)"
}
} else {
puthelp "NOTICE $chan :$nick all the commands are in wwww.tets1."
}
}
# user's throttled
proc throttled {id seconds} {
global throttle
if {[info exists throttle($id)]&&$throttle($id)>[clock sec]} {
set id 1
} {
set throttle($id) [expr {[clock sec]+$seconds}]
set id 0
}
}
bind time - ?0* throttledCleanup
proc throttledCleanup args {
global throttle
set now [clock sec]
foreach {id time} [array get throttle] {
if {$time<=$now} {unset throttle($id)}
}
}
Once the game is over, the king and the pawn go back in the same box.