mIRC Homepage
Posted By: Confuzzled On Nick event problem - 20/11/05 05:24 AM
i made this,

on *:nick:{
if ($newnick == MyNick) { unload -rs $mircdirRemotes\IsLndBot1.mrc | unload -rs $mircdirRemotes\IsLndBot2.mrc | unload -rs $mircdirRemotes\IsLndBot3.mrc | unload -rs $mircdirRemotes\IsLndBot4.mrc | unload -rs $mircdirRemotes\IsLndBot5.mrc }
if ($newnick == MyBotNick) { load -rs $mircdirRemotes\IsLndBot1.mrc | load -rs $mircdirRemotes\IsLndBot2.mrc | load -rs $mircdirremotes\IsLndBot3.mrc | load -rs $mircdirremotes\IsLndBot4.mrc | load -rs $mircdirremotes\IsLndBot5.mrc }
{ else notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11. }
}

it works fine with me but when i try to change my nick to different nick other than those other two it gives me the else line too notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11.

how can i make that line triggered only for others but not for me and those other two nick i put in there?
Posted By: RusselB Re: On Nick event problem - 20/11/05 06:09 AM
Code:
 on *:nick:{
if ($newnick == MyNick) {
 unload -rs $mircdirRemotes\IsLndBot1.mrc
 unload -rs $mircdirRemotes\IsLndBot2.mrc
 unload -rs $mircdirRemotes\IsLndBot3.mrc
 unload -rs $mircdirRemotes\IsLndBot4.mrc
 unload -rs $mircdirRemotes\IsLndBot5.mrc
 }
elseif ($newnick == MyBotNick) {
 load -rs $mircdirRemotes\IsLndBot1.mrc
 load -rs $mircdirRemotes\IsLndBot2.mrc
 load -rs $mircdirremotes\IsLndBot3.mrc
 load -rs $mircdirremotes\IsLndBot4.mrc
 load -rs $mircdirremotes\IsLndBot5.mrc
 }
elseif ($newnick != $me) {
 notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11. 
}
}
 


I removed the | from your code, simply because I find codes easier to read without them, and in the format that I have above, they aren't needed.

Posted By: Confuzzled Re: On Nick event problem - 20/11/05 06:19 AM
ok it looks neater now thank you but still works the same,

i want to have this line,

notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11.

work for others only, cause if i change to different nick from those two i have it does that line to me too. i want to know if it can only work for others except me
Posted By: RusselB Re: On Nick event problem - 20/11/05 06:22 AM
Try the edited version
Posted By: Confuzzled Re: On Nick event problem - 20/11/05 06:29 AM
i changed else alone to one you just edited

elseif ($newnick != $me) {
notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11.
}
}

but still work the same, the msg keep on coming to me too
Posted By: RusselB Re: On Nick event problem - 20/11/05 06:37 AM
Code:
 on me:*:nick:{
if ($newnick == MyNick) {
 unload -rs $mircdirRemotes\IsLndBot1.mrc
 unload -rs $mircdirRemotes\IsLndBot2.mrc
 unload -rs $mircdirRemotes\IsLndBot3.mrc
 unload -rs $mircdirRemotes\IsLndBot4.mrc
 unload -rs $mircdirRemotes\IsLndBot5.mrc
 }
elseif ($newnick == MyBotNick) {
 load -rs $mircdirRemotes\IsLndBot1.mrc
 load -rs $mircdirRemotes\IsLndBot2.mrc
 load -rs $mircdirremotes\IsLndBot3.mrc
 load -rs $mircdirremotes\IsLndBot4.mrc
 load -rs $mircdirremotes\IsLndBot5.mrc
 }
}
on !*:nick:{
 notice $newnick 4I see you change from 11.:11.:12 $nick :11.:11. 4to 11.:11.:12 $newnick :11.:11. 
}
 


Sorry, wasn't thinking straight when I did it the first time. Try that instead
Posted By: Confuzzled Re: On Nick event problem - 20/11/05 06:42 AM
oh ok,
so all i need is another newline with that ! then sorry for the trouble, my mistake

huge thanks by the way
Posted By: RusselB Re: On Nick event problem - 20/11/05 06:46 AM
Please note that you now have two ON NICK events in the same script. The first one, will ONLY activate for you, the second one will activate for anyone EXCEPT you.
Posted By: Confuzzled Re: On Nick event problem - 20/11/05 06:50 AM
yes thank you again it works now thank you much
Posted By: benjy355 Re: On Nick event problem - 20/11/05 07:27 AM
...mmkay stupid question
what are all the squares for?
Posted By: SladeKraven Re: On Nick event problem - 20/11/05 07:33 AM
What squares are we looking at?

-Andy
Posted By: RusselB Re: On Nick event problem - 20/11/05 07:37 AM
That's what you get when using CTRL+K to start/end a coloring process around text. they also show up for CTRL+B (Bold) & Ctrl+U (Underline)
© mIRC Discussion Forums