mIRC Home    About    Download    Register    News    Help

Print Thread
Simple name change #209042 03/02/09 03:01 PM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
Code:
  on *:TEXT:!nick*:#: {
    if ($address == Dracoz@Dracoz.users.omerta) {
      /nick $2
    }
  }


This does not work anyone knows the problem ?

Re: Simple name change [Re: Dracoz] #209057 03/02/09 07:13 PM
Joined: Jun 2003
Posts: 994
C
CtrlAltDel Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
try

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


I refuse to engage in a battle of wits with an unarmed person. wink
Re: Simple name change [Re: Dracoz] #209061 03/02/09 08:02 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Or you can use the address in $rawmsg in case IAL isn't 100% solid.

Re: Simple name change [Re: CtrlAltDel] #209073 03/02/09 09:55 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$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?

Re: Simple name change [Re: Collective] #209081 03/02/09 11:01 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What's the point of the OP's code?

Re: Simple name change [Re: Tomao] #209087 03/02/09 11:35 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

Re: Simple name change [Re: Collective] #209100 04/02/09 02:27 AM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
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

Re: Simple name change [Re: Dracoz] #209101 04/02/09 03:07 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.


Re: Simple name change [Re: RusselB] #209103 04/02/09 03:53 AM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
So what should work shocked

Just needs when I type !nick <nicknamehere>

the bot will change its name

Re: Simple name change [Re: Dracoz] #209105 04/02/09 03:58 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

Re: Simple name change [Re: Dracoz] #209106 04/02/09 04:50 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:TEXT:!nick*:#:if ($address == Dracoz@Dracoz.users.omerta) && ($2 isin $1-) nick $v1


Give it a shot; untested though.

Re: Simple name change [Re: Dracoz] #209107 04/02/09 05:08 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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)
}


Re: Simple name change [Re: Tomao] #209114 04/02/09 12:59 PM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
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

Last edited by Dracoz; 04/02/09 12:59 PM.
Re: Simple name change [Re: Collective] #209127 04/02/09 07:41 PM
Joined: Jun 2003
Posts: 994
C
CtrlAltDel Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
my bad! should have been
if Dracoz@Dracoz.users.omerta isin $address($nick,5)


I refuse to engage in a battle of wits with an unarmed person. wink