mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
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?

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
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....

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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?


-KingTomato
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
/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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
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)

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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

Last edited by Raccoon; 26/05/03 07:04 PM.

Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard