mIRC Home    About    Download    Register    News    Help

Print Thread
#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 ?

Joined: Jun 2003
Posts: 994
C
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
Joined: Jan 2007
Posts: 1,156
D
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.

Joined: Dec 2002
Posts: 3,138
C
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?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What's the point of the OP's code?

Joined: Dec 2002
Posts: 3,138
C
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.

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

Joined: Aug 2004
Posts: 7,252
R
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.


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

Joined: Dec 2002
Posts: 3,138
C
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.

Joined: Jul 2007
Posts: 1,129
T
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.

Joined: Aug 2004
Posts: 7,252
R
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)
}


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.
Joined: Jun 2003
Posts: 994
C
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

Link Copied to Clipboard