mIRC Homepage
Posted By: NightChillz $opnick was b4 mode change... - 26/05/03 01:17 AM
hey, is there a way to tell what $opnick's status was before a mode change?

like on *:deop:*:{ echo -a $opnick was $lastmode($opnick) }

NightChillz Was Participant

know what i mean?
Posted By: pheonix Re: $opnick was b4 mode change... - 26/05/03 01:21 AM
i know 1 way but im afraid it wud have to set a variable for every nickname in the channel blush
tell me if ya still want it coz i dont wanna wast ma time smirk
Posted By: NightChillz Re: $opnick was b4 mode change... - 26/05/03 01:25 AM
well, i know i can do it in a round about long way, like settings vars to all ops, and whatever, but i was looking for a command or something that returns the previous mode for the specified user, if there is one....
Posted By: KingTomato Re: $opnick was b4 mode change... - 26/05/03 03:40 AM
Can't you assume they have the same exact mode, just opless? If they had @%+ before, and they are deopped, now they should just be %+, right?
Posted By: Raccoon Re: $opnick was b4 mode change... - 26/05/03 06:01 AM
/updatenl
Usually the channel nicknames list and IAL in a kick/part/quit script event are updated after the script finishes, this command updates them immediately
</help>

Unless something recently changed, $opnick should still appear to be opped in a DEOP event.

Code:
On *:DEOP:#: {
  echo -a $opnick was $iif($opnick isop $chan,Opped,NOT Opped) before this event.
  updatenl
  echo -a $opnick is now $iif($opnick isop $chan,Opped,NOT Opped) after this event.
}

See Also this post where I also explained this effect just recently.

- Raccoon
Posted By: NightChillz Re: $opnick was b4 mode change... - 26/05/03 06:02 PM
yeah i thought something like that too, but for some reason it doesnt work, on *:op is only triggered during the mode change, so it returns whatever the made being set was

but the problem with that is on this server, you can set -o $nick, even if the $nick is already -o, so i was hoping there was another way(cause i already tried something like what u posted), but it doesnt look like it, so i'll have to store the ops onjoin, and do it that way...... thanks anyway(perhaps an idea for something to be added to the next version of mirc: $lmode($nick,$chan) to return the previous mode for that user befor the last mode change on that user)
Posted By: Raccoon Re: $opnick was b4 mode change... - 26/05/03 06:54 PM
Interesting, I just tested the example script I posted.. and it appears you're right. I guess the only events that show a user's status before the event actually occured; are Join, Part, Quit and Kick.

Khaled, it would really be nice if /updatenl were as useful more events that effect the IAL and Nicklist.

- Raccoon
© mIRC Discussion Forums