mIRC Home    About    Download    Register    News    Help

Print Thread
#209042 03/02/09 03:01 PM
D
Dracoz
Dracoz
D
Code:
  on *:TEXT:!nick*:#: {
    if ($address == Dracoz@Dracoz.users.omerta) {
      /nick $2
    }
  }


This does not work anyone knows the problem ?

#209057 03/02/09 07:13 PM
C
CtrlAltDel
CtrlAltDel
C
try

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

#209061 03/02/09 08:02 PM
Joined: Jan 2007
Posts: 1,155
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,155
Or you can use the address in $rawmsg in case IAL isn't 100% solid.

#209073 03/02/09 09:55 PM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
$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,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
What's the point of the OP's code?

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
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.

D
Dracoz
Dracoz
D
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

#209101 04/02/09 03:07 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.


D
Dracoz
Dracoz
D
So what should work shocked

Just needs when I type !nick <nicknamehere>

the bot will change its name

#209105 04/02/09 03:58 AM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
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.

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


Give it a shot; untested though.

#209107 04/02/09 05:08 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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)
}


D
Dracoz
Dracoz
D
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.
C
CtrlAltDel
CtrlAltDel
C
my bad! should have been
if Dracoz@Dracoz.users.omerta isin $address($nick,5)


Link Copied to Clipboard