mIRC Homepage

Refreshing the IAL

Posted By: Abstract

Refreshing the IAL - 29/06/06 12:23 PM

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
Posted By: landonsandor

Re: Refreshing the IAL - 29/06/06 02:44 PM

if you're in the same channel as them, you could always /whois $nick OR /who $nick for their info.
Posted By: Lpfix5

Re: Refreshing the IAL - 29/06/06 05:19 PM

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
Posted By: kamicollo

Re: Refreshing the IAL - 29/06/06 08:29 PM

/uptadenl may help.
Posted By: voipme

Re: Refreshing the IAL - 29/06/06 09:43 PM

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.
Posted By: Abstract

Re: Refreshing the IAL - 30/06/06 12:30 PM

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
© 2021 mIRC Discussion Forums