mIRC Homepage
Posted By: vithos userlevel 0 disappearing - 05/09/03 06:07 PM
every few days my userlevel list will be mysteriously cleared. I only use these events to control userlevels automatically:

on +@1:join:#somewhere:if ($network == MSN) { mode # +v $nick }
on 1:devoice:#somewhere:if ($network == MSN) { .auser 0 *! $+ $gettok($ial($vnick), 2, 33) $vnick }
on *:voice:#somewhere:if ($network == MSN) { .ruser 0 *! $+ $gettok($ial($vnick), 2, 33) }
Posted By: Khaled Re: userlevel 0 disappearing - 08/09/03 12:53 PM
The IAL is not guaranteed to contain the addresses of all users on a channel (see IAL section in help file). So in the examples you've shown, $ial() may return a $null value.
Posted By: Nem3sis Re: userlevel 0 disappearing - 08/09/03 03:42 PM
slight useless point to make but also instead of using
*! $+ $gettok($ial($vnick), 2, 33)
why not use
$mask($ial($vnick),0)
will achieve the same effect.
Posted By: vithos Re: userlevel 0 disappearing - 08/09/03 04:47 PM
$mask will truncated the address if it is too long
Posted By: vithos Re: userlevel 0 disappearing - 08/09/03 04:52 PM
that is true, but the IAL should contain information about the user who just caused an event. The problem is that the list containing userlevels (the fourth tab in the mIRC Scripts Editor) empties itself without notice, not that the IAL is empty or lacks information about a user. the help entry for /ruser says that it removes the specified user from the user list, not all matching users, if the case is that due to the lack of IAL information the command processed is /ruser 0 *!
Posted By: cold Re: userlevel 0 disappearing - 12/09/03 05:16 AM
Quote:
that is true, but the IAL should contain information about the user who just caused an event.


Just to clarify:

IRC line: :op!ident@address.com MODE #channel +v nick
$address = ident@address.com, $chan = channel, $1- (on RAWMODE) = +v nick.

mIRC display: * op sets mode +v nick
$nick = op, $vnick = nick.

As you see above, events fill IAL with the address of who performs a command (the op, $nick), not anyone else whose status is altered by him/her (the voiced/devoiced one, $vnick), simply because the server doesn't pass this info. So, you may not always have $vnick's address unless you did proper checking for it before.

P.S.: Sorry, I misread the post (it seems I should sleep) and realized that the code you've shown couldn't clear the whole userlist, but decided to leave the explanation above anyway.
© mIRC Discussion Forums