mIRC Home    About    Download    Register    News    Help

Print Thread
Away system #23274 08/05/03 09:28 PM
Joined: Mar 2003
Posts: 63
N
NiCk2 Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 63
Hi, I'm doing an away system and I wanted to know how I could record what is said in private messages without having the window opened. If I ignore private messages, I can't seem to retrieve them. Should I close the window each time someone says something to me and record what is said each time with the on open event ?
If you know another easyer way, thank you in advance for your help smile

Re: Away system #23275 08/05/03 09:32 PM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
Code:
on *:TEXT:*:?:if ($away) { write messages.txt From: $nick - $1- | close -m $nick } 

Re: Away system #23276 08/05/03 09:34 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Code:
ON ^*:OPEN:?:*:{
   if ($away) {
      .write_to_my_log $+([,$time,]) $+(<,$nick,>) $1-
      .msg $nick your message has been logged
      halt
   }
}


Something along those lines should do what you want.

Re: Away system #23277 08/05/03 09:35 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
yeah, ignore works like with an on open and /halt it so u could do that:
Don't ignore him, use this
on ^*:open:?:{ command | halt }
the command can be /write or something depends on where u want to save it ($1- is the text he wrote, use it inside the event)


Re: Away system #23278 08/05/03 10:26 PM
Joined: Mar 2003
Posts: 63
N
NiCk2 Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 63
Thank you all for your help, I much appreciate it smile

Re: Away system #23279 09/05/03 12:39 AM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
codemastr:

That would work, but what if the user already had an open private message window? Then your code wouldn't log new incoming messages of an already open PM window. That's why ON TEXT is better.

Re: Away system #23280 09/05/03 01:09 AM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
But an "on text event" requires the window to be open, the question was.

Quote:
how I could record what is said in private messages without having the window opened.

Re: Away system #23281 09/05/03 02:31 AM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
Yeah that's true. But you might have another PM window open, and, ahhh forget it.

Re: Away system #23282 09/05/03 02:36 AM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well I would assume even if, he wouldn't want windows that he "accidentily" left open to be automatically closed by the away script.

Re: Away system #23283 09/05/03 11:54 AM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
Quote:
But an "on text event" requires the window to be open


That's not true, on *:TEXT:*:?: triggers whether there's an open query window for $nick or not.

Edit: Deleted incorrect code

Last edited by RoCk; 09/05/03 01:53 PM.
Re: Away system #23284 09/05/03 01:44 PM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Think you will find the on open event triggers before the on text event, try this.

Code:

on ^*:open:?:test*: { echo -ag open event $1- | haltdef }
on ^*:text:test*:?: { echo -ag on text event $1- | haltdef }


then from the status type "//msg $me test to see which event triggers first." then open a query window to yourself and send the message again.

Re: Away system #23285 09/05/03 01:51 PM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
You're absolutely right .. I should have tested that first.
I just assumed ON TEXT would have higher priority
than ON OPEN making me think it would trigger first.