mIRC Home    About    Download    Register    News    Help

Print Thread
$opnick was b4 mode change... #26016 26/05/03 01:17 AM
Joined: Dec 2002
Posts: 271
N
NightChillz Offline OP
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?

Re: $opnick was b4 mode change... #26017 26/05/03 01:21 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
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
Re: $opnick was b4 mode change... #26018 26/05/03 01:25 AM
Joined: Dec 2002
Posts: 271
N
NightChillz Offline OP
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....

Re: $opnick was b4 mode change... #26019 26/05/03 03:40 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
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
Re: $opnick was b4 mode change... #26020 26/05/03 06:01 AM
Joined: Feb 2003
Posts: 2,669
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,669
/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!
Re: $opnick was b4 mode change... #26021 26/05/03 06:02 PM
Joined: Dec 2002
Posts: 271
N
NightChillz Offline OP
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)

Re: $opnick was b4 mode change... #26022 26/05/03 06:54 PM
Joined: Feb 2003
Posts: 2,669
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,669
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!