mIRC Homepage
Posted By: MoneyGamer Need Help with Nick Detecting - 28/04/14 07:49 PM
Is there any way to make a script work only when a certain person triggers it, and ONLY for that person?
Posted By: Loki12583 Re: Need Help with Nick Detecting - 28/04/14 08:05 PM
/help Access Levels
/help User List
/help if then else
/help $nick
/help /return
Posted By: judge2020 Re: Need Help with Nick Detecting - 29/04/14 11:25 AM
Code:
on *:text:!command:#: {
  if ($nick == yourusername) { msg $chan message here }
}
Posted By: jaystew Re: Need Help with Nick Detecting - 29/04/14 07:25 PM
Originally Posted By: judge2020
Code:
on *:text:!command:#: {
  if ($nick == yourusername) { msg $chan message here }
}


Although using the above could allow others to use it. So if I set it to ($nick == JayStew) Then log off, someone else could join the server using my nickname and then use the command without any problems (That's if they know the commands of course)

So maybe something like this that reads the address of the person, If the address matches it will work and if it doesn't match it wont work for the person.Clearly this wont work if you have a hostmask that constantly changes though.

Code:
on *:TEXT:!hi:#: { 
  if (($readini(access.ini, $nick, Hostmask) == $address($nick,2),2)) { .msg # hello | halt }  
  else { 
    .msg # Sorry nick that Hostmask does that have permission to use this command. 
  }
}



If you want to use the code ive provided you will then need to make a ini file called access in you mIRC (or bots mIRC) with the following info in

[Your_Nickname]
Hostmask=*!*@My.Host.Here.co.uk



Posted By: judge2020 Re: Need Help with Nick Detecting - 30/04/14 12:07 AM
set a password for that account? :P
© mIRC Discussion Forums