I can remove $chan and add $owner right , to dedan's code? with no change to the entire script, that means i just change $chan with $owner? just for testing and to understand whats going on? and i still get errors "args" ?
dedan change your code so the msg could PRIVMSG the $owner , then i can see what's going on? remember the offnick is a var not a nick?
if {$botnick == $newnick && $botnick == "offnick"} {
has to work. guess the problem were the missing ""s.
@dedan: [] are used in tcl to execute commands. means, using it the way you do will cause errors. the normal syntax is [command arguments], so your script will see $botnick (here "offnick") as a command. i don't know where you learned using []s, but i'd suggest to get some good tutorial.
# set bot's off nick #
set offnick "botoff"
# set owner's nick #
set owner "mimic"
bind nick - * BOTNEW
proc BOTNEW {nick uhost handle channel newnick} {
global botnick offnick owner
if {$botnick == $newnick && $botnick == $offnick} {
putserv "PRIVMSG $owner :ITS NOT WORKING :("
}
}
Sir_Fz your code doesn't return errors? but at the same time it doesn't PRIVMSG the owner? so no effect?
let me make it simple here i hope everyone understand mirc commands cause what i'm going to post is the same what i want in eggdrop
on 1:nick:{
if (%offnick isin $newnick) {
.msg mimic hi there?
.timer1 1 120 /msg Owner I'm using $offnick . and i'm off now.
}
}
the timer will trigger once after 2mins from the first msg and will stop exactly after that.
I saw in tcl doc that thereis a "isbotnick" maybe this will help to find out whats the problem?
did u try using the if {[string equal $newnick $botnick] && [string equal $offnick $botnick]} { ? or the if {[string match -nocase $newnick $botnick] && [string match -nocase $offnick $botnick]} { ??
please try them instead of if {$newnick == $botnick && ....} {
else I don't see any mistakes in the code.
I dunno whats wrong with it ? i really dont know but as long as i really need it i will not give up, but the errors keeps buggin me . I appreciate what you did Sir_Fz i really do you and the others but with the codes you and other have wrote here. some with errors and some wasn't really work .
my last post as you can see i wrote an mIRC code which i need to convert to tcl to make it work exactly like i want with the timer and killtimer after excuting the needed cmd ..
dunno what you mean dedan ? but if youre tryin to write the code i want with utimer and killutimer . like the mIRC code i post above . please do now . Thanks