mIRC Home    About    Download    Register    News    Help

Print Thread
#47862 07/09/03 04:14 PM
Joined: Aug 2003
Posts: 144
M
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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 }

Joined: Aug 2003
Posts: 144
M
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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...

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Aug 2003
Posts: 144
M
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
frown

Joined: Sep 2003
Posts: 4
K
Self-satisified door
Offline
Self-satisified door
K
Joined: Sep 2003
Posts: 4
hello $address(nick,#)

Joined: Aug 2003
Posts: 144
M
Vogon poet
OP Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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


Link Copied to Clipboard