mIRC Home    About    Download    Register    News    Help

Print Thread
Away on text/action or status #114645 16/03/05 08:49 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: Away on text/action or status #114646 16/03/05 10:55 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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)

Re: Away on text/action or status #114647 16/03/05 11:56 AM
Joined: Dec 2002
Posts: 145
G
gemeau50 Offline
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
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
}