mIRC Homepage
Posted By: RusselB Away on text/action or status - 16/03/05 08:49 AM
I'm looking for a way to be able to remove a player from the game if they type brb,bbs,bbl,away, etc. (I think you get the idea) using either text or action. I'd also like to be able to do the same thing if they use /away. Currently players nicks are stored in %play.list and I use tokens to add/remove nicks from that list with $chr(44) as the separator.

I also need this to be able to work in conjunction with the other scripts I already have. Currently standing at 14 scripts for nearly 8000 lines of code. Due to the amount of code, I'm hesitant to post it all here, but if this can be done, and a location for the snippet be recommended, I can probably post the rest of the code for that particular script. Most of the scripts are between 50 & 200 lines. I have one at 500 and one at nearly 6000. Details, if necessary, can and will be provided.
Posted By: DaveC Re: Away on text/action or status - 16/03/05 10:55 AM
Code:
on   $*:text:/(,away|away,)/i:#yourchannel:{ set %play.list $remtok(%play.list,$nick,1,44) }
on $*:action:/(,away|away,)/i:#yourchannel:{ set %play.list $remtok(%play.list,$nick,1,44) }
raw 301:$($me *):{                           set %play.list $remtok(%play.list,$2,1,44) }

^
I assume you wasnted it if the away had a comma at the front or the back or both rather than just "away" in the text. If it was just "away" in the text then its the below...

Code:
on   *:text:*away*:#yourchannel:{ set %play.list $remtok(%play.list,$nick,1,44) }
on *:action:*away*:#yourchannel:{ set %play.list $remtok(%play.list,$nick,1,44) }
raw 301:$($me *):{                set %play.list $remtok(%play.list,$2,1,44) }


The raw 301 is just what i encountered when someone IS away, but only when you try and msg them, before that you cant tell there away, so there is no on the spot method of detecting someone going /away (that i know of)
Posted By: gemeau50 Re: Away on text/action or status - 16/03/05 11:56 AM
Quote:
... I'd also like to be able to do the same thing if they use /away.


You could detect who's away by doing "/who $chan" every x minutes.

raw 352:*: {
haltdef
if (G isin $7) echo 04 -at $6 IS AWAY
}
© mIRC Discussion Forums