mIRC Homepage
Posted By: Miguel_A Nick Changer Status Control - 07/09/03 04:14 PM
Hi ppl. Need help in a code please.
I want control the nick changes and for example:

The nick Miguel change to nick Miguel_A
here the bot will save that info and if the nick Miguel_A try to access the bot commands the bot say to Miguel_A that he can´t access to the comands with that nick and he have to change to the original nick.


on *:nick: {
if ( $newnick isin $var($eval(%change,0) $+ $nick,1).value ) {
Unset %change $+ $nick
; Here he returs to the original nick
halt
}
if ( $newnick !isin $var($eval(%change,0) $+ $nick,1).value ) {
if ( $newnick !isin $var($eval(%change,0) $+ $nick,1) ) {
; Here when he change 2 or more times off nick
set %change $+ $newnick $var($eval(%change,0) $+ $nick,1).value
unset %change $+ $nick
msg $chan(1) Voltou a mudar
halt
}
else {
set %change $+ $newnick $nick
; Here he change for the 1 time off nick
halt
}
}
}


if the nick try to change 2 off nick he will be create other %var and then the info it´s rong when backing to the original nick
Posted By: SladeKraven Re: Nick Changer Status Control - 07/09/03 05:12 PM
Why don't you do something like..
Code:
on 1:TEXT:login*:?: {  
  if ($2) && ($3) {    
    if ($readini(users.ini, NickNames, $2)) && ($3 == $gettok($readini(users.ini, NickNames, $2),-1,45)) {
      guser 10 $2 3
    }
  }
}

For users to access the bots commands, then something like...
on 10:TEXT:!op*:#: { commands }
Posted By: Miguel_A Re: Nick Changer Status Control - 07/09/03 06:13 PM
nooo , not that, becouse i want the bot say to the nick that he only can execut the bots commands with the origonal nick and the bot tell him to change to the original nick saying the original nickname...
Posted By: LocutusofBorg Re: Nick Changer Status Control - 07/09/03 07:51 PM
What does it matter what nick a user uses, as long as he is identified to the bot? If you are having to bot respond to certain nicks, then change it, it is extremely insecure as anyone can change to any nick that's not in use.
Posted By: Miguel_A Re: Nick Changer Status Control - 08/09/03 07:32 AM
frown
Posted By: Kancer Re: Nick Changer Status Control - 08/09/03 08:05 AM
hello $address(nick,#)
Posted By: Miguel_A Re: Nick Changer Status Control - 08/09/03 08:34 AM
frown frown
no no no is not that.
if the nick is the correct one the bot perform the comands
if the nick is not the correct one the bot will inform the incorrectnick to change to the corrdct nick but e send a msg saying the correct nick
© mIRC Discussion Forums