mIRC Home    About    Download    Register    News    Help

Print Thread
#47466 05/09/03 06:07 PM
Joined: Sep 2003
Posts: 19
V
vithos Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Sep 2003
Posts: 19
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) }

#47467 08/09/03 12:53 PM
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

#47468 08/09/03 03:42 PM
Joined: Dec 2002
Posts: 29
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 29
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.

#47469 08/09/03 04:47 PM
Joined: Sep 2003
Posts: 19
V
vithos Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Sep 2003
Posts: 19
$mask will truncated the address if it is too long

#47470 08/09/03 04:52 PM
Joined: Sep 2003
Posts: 19
V
vithos Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Sep 2003
Posts: 19
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 *!

#47471 12/09/03 05:16 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
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.

Last edited by cold; 12/09/03 06:09 AM.

* cold edits his posts 24/7

Link Copied to Clipboard