mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2017
Posts: 1
X
Xaifas2 Offline OP
Mostly harmless
OP Offline
Mostly harmless
X
Joined: Feb 2017
Posts: 1
I was trying to halt the opening of a query window when a certain nick sent a message but I also had an ON TEXT event that had to do certain stuff with the message that he was sending.
Issue is that if I halt the query from opening the ON TEXT event doesnt work anymore which is peculiar to me because I still get the PRIVMSG raws.

(7.43 version)

Test case:

Code:
ON ^*:OPEN:?:*:{
 if ($nick == testnick) {
  haltdef
 }
}

ON ^*:TEXT:*:?:{
 if ($nick == testnick) {
  do stuff
  haltdef
 }
}


Thanks

Last edited by Xaifas2; 23/02/17 02:07 PM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This seems intentional to me. ON OPEN triggers before ON TEXT, so if you halt the opening of the window, the ON TEXT will not fire.

This makes sense: ON TEXT is not a direct representation of raw packets from your TCP connection, it is an event that fires when a line of text has been (or is being) added to a window buffer. If the window is not opening, there is no line of text being added to any buffer, so no event should fire.

If you want to handle the raw messages, you will want to look at ON PARSELINE.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,146
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,146
I may be missing something but he doesn't need on parseline there, he should just "do stuff" from the on open event confused


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard