mIRC Home    About    Download    Register    News    Help

Print Thread
#152326 29/06/06 12:23 PM
Joined: May 2006
Posts: 25
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 25
That's the second time I post this question here, because the first time my post misteriously desappeared (don't know why, I looked at the rest of posts and didn't see a post like mine), so here it goes again...

I've programming an addon and I got a little problem: I have an On Nick event, and I would need the address of the user after nick changing; so I use $ial($newnick), but it doesn't seem to work (I think it returns $null). Also, if I try to do $address($newnick, 5), it still returns the previous mask.

I need something like that because some nicks have a virtual IP, so on a nick change I would need to detect it. Is there any way to 'refresh' the IAL in the same event, or something?

Thanx a lot smile


==================
Abstraction is art.
#152327 29/06/06 02:44 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
if you're in the same channel as them, you could always /whois $nick OR /who $nick for their info.


Those who fail history are doomed to repeat it
#152328 29/06/06 05:19 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
That's the second time I post this question here, because the first time my post misteriously desappeared (don't know why, I looked at the rest of posts and didn't see a post like mine), so here it goes again...

I've programming an addon and I got a little problem: I have an On Nick event, and I would need the address of the user after nick changing; so I use $ial($newnick), but it doesn't seem to work (I think it returns $null). Also, if I try to do $address($newnick, 5), it still returns the previous mask.

I need something like that because some nicks have a virtual IP, so on a nick change I would need to detect it. Is there any way to 'refresh' the IAL in the same event, or something?

Thanx a lot smile


?? $ial alone needs a mask to execute its command then you can find the parameters that match that host through a loop through the nick list however... should you want just a $newnick eval of the $ial command do this

Code:
on *:NICK:{
echo -a $nick has changed their nick too $newnick ADDR: $ialchan($newnick,#,1)
}


this would display the code as follows when someone changes there nick

bot has changed their nick too bot1 ADDR: bot1!~mieahfsaiuheu@blahblah.com

if you need to use this EVAL later on just put the EVAL in a variable like

%ial = $ialchan($newnick,#,1)

this way youll be able to call the results later via %ial

then when your last call ends just unset %ial


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#152329 29/06/06 08:29 PM
Joined: Nov 2005
Posts: 24
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Nov 2005
Posts: 24
/uptadenl may help.

#152330 29/06/06 09:43 PM
Joined: Jun 2006
Posts: 5
V
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
V
Joined: Jun 2006
Posts: 5
Try this:

Code:
on *:nick:{
  haltdef who $newnick
  set %a $gettok($ial($newnick),2,64)
}
  


I think 64 is the @ sign. Its sloppy, but it works. If you want to refresh the IAL of an entire channel, just do a /who #chan.

#152331 30/06/06 12:30 PM
Joined: May 2006
Posts: 25
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: May 2006
Posts: 25
In first place, I want to thank you for the replies smile

Unafortunately, I couldn't solve the problem with that ideas frown I tried all possible combinations of your ideas, but didn't work. I think the problem comes because what I'm doing is something like a Blacklist, so if I detect a user in it, I have to ban him; but it bans the old mask, not the new, and that's the problem I'm trying to solve.

I've tried:
  • /updatenl: Didn't work, still showing the old mask
    Who/whois the user and then proccess, neither worked.
    Using $ial/$address/$ialchan, all of them returned the old mask.


Hum, I think just got it :P

I set a timer to proccess after 250 ms., now it works, so it would be something like that:

Code:
alias ProcesaNuevaMask {
  echo -s New mask: $ial($1) :D
}

On *:NICK: {
  updatenl
  haltdef who $newnick
  .timercheck $+ $newnick -h 1 250 ProcesaNuevaMask $newnick
}


Thanx again laugh


==================
Abstraction is art.

Link Copied to Clipboard