mIRC Homepage
Posted By: Dracoz Simple name change - 03/02/09 03:01 PM
Code:
  on *:TEXT:!nick*:#: {
    if ($address == Dracoz@Dracoz.users.omerta) {
      /nick $2
    }
  }


This does not work anyone knows the problem ?
Posted By: CtrlAltDel Re: Simple name change - 03/02/09 07:13 PM
try

if ($address($nick,5) == Dracoz@Dracoz.users.omerta)
Posted By: DJ_Sol Re: Simple name change - 03/02/09 08:02 PM
Or you can use the address in $rawmsg in case IAL isn't 100% solid.
Posted By: Collective Re: Simple name change - 03/02/09 09:55 PM
$address($nick,5) returns nick!user@host, so it will never be equal to Dracoz@Dracoz.users.omerta. $address ought to work as it returns just user@host.

Dracoz: Are you aware that on TEXT events do not trigger for messages you send?
Posted By: Tomao Re: Simple name change - 03/02/09 11:01 PM
What's the point of the OP's code?
Posted By: Collective Re: Simple name change - 03/02/09 11:35 PM
He wants an on TEXT trigger to change the nickname of whatever is running the script. Some people like to have such triggers work from the same client that the script is running on.

I should also have mentioned that the 'proper' way to restrict access to a trigger by host is using mIRC's access levels.
Posted By: Dracoz Re: Simple name change - 04/02/09 02:27 AM
Yes im aware of that. its another version of mirc that got that in remote.

Btw. Still aint working with the

Code:
if ($address($nick,5) == Dracoz@Dracoz.users.omerta)


I just want when I type !nick roflcopter
that the mirc with the script in it will change name.
Offcourse the mirc with the script in it is NOT authed as the if Dracoz@Dracoz.users.omerta

But when i`m typing it im authed as that. Still does not work though frown
Posted By: RusselB Re: Simple name change - 04/02/09 03:07 AM
As Collective already stated
Quote:
$address($nick,5) returns nick!user@host, so it will never be equal to Dracoz@Dracoz.users.omerta. $address ought to work as it returns just user@host.

Posted By: Dracoz Re: Simple name change - 04/02/09 03:53 AM
So what should work shocked

Just needs when I type !nick <nicknamehere>

the bot will change its name
Posted By: Collective Re: Simple name change - 04/02/09 03:58 AM
First check that your event is triggering at all, put an /echo or a /msg in the event (outside of the /if statement) and make sure that it appears when it should.
Posted By: Tomao Re: Simple name change - 04/02/09 04:50 AM
Code:
on *:TEXT:!nick*:#:if ($address == Dracoz@Dracoz.users.omerta) && ($2 isin $1-) nick $v1


Give it a shot; untested though.
Posted By: RusselB Re: Simple name change - 04/02/09 05:08 AM
Alternative suggestion, with some additional features.
Code:
on *:text:!nick*:*:{
  if $address == Dracoz@Dracoz.users.omerta {
    if !$2 {      .notice $nick Usage: !nick <my_new_nick>    }
    else {
      set $+(%,nick1,$network) $2
      set $+(%,nick2,$network) $nick
      .ison $2
    }
  }
}
on *:notice:ison*:*:{
  if !$2 {
    .nick $($+(%,nick1,$network),2)
  }
  else {
    .notice $($+(%,nick2,$network),2) Sorry, but the nick $2 is already in use
  }
  unset $+(%,nick,*,$network)
}

Posted By: Dracoz Re: Simple name change - 04/02/09 12:59 PM
Code:
on *:TEXT:!nick*:#:if ($address == Dracoz@Dracoz.users.omerta) && ($2 isin $1-) nick $v1


This one works laugh Super thank you !!!

The other one with additional feautures i get this "ison: no such user"

Thanks all smile
Posted By: CtrlAltDel Re: Simple name change - 04/02/09 07:41 PM
my bad! should have been
if Dracoz@Dracoz.users.omerta isin $address($nick,5)
© mIRC Discussion Forums