mIRC Home    About    Download    Register    News    Help

Print Thread
#131534 01/10/05 09:57 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline OP
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Alright, I've done a few searches, trying to see if someone has asked this question before or not. And didn't see any that actually answered my question. So I've decided to make a post, and hopefully someone here can help me out with this.

Is there a way to deal with raw messages? I mean, say you want to grab a "notice" (ie: DCC Send?), how do you go about doing that with a raw event?

I have no problems doing the normal raw events (ie: raw 001:*:{ haltdef }) and such..

The mIRC Help File shows: Raw PROP:*word*:{ }, and I can't seem to figure out how this works..

Sorry if this has been asked before, I have searched, there was 500 posts for "Raw Events" and I didn't really want to go through each one as I'm on 56k.

Thanks again, in advanced.

#131535 01/10/05 10:36 AM
O
Om3n
Om3n
O
Not all raws are numbered, some have names. Such as PRIVMSG, NOTICE, JOIN etc. If you want to find the prop name of a raw, use /debug @window and watch for it.

For example the raw recieved for an incoming dcc send looks something like this
<- :nick!~ident@host PRIVMSG yournick :DCC SEND filename.ext ip port filesize
You can reference this raw message with $rawmsg if $N does not give you all the information you need.

#131536 01/10/05 10:50 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline OP
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Would you mind showing me the proper raw format?

Code:
 raw PRIVMSG:*: /echo -stg $rawmsg ..... $1- 


doesn't seem to work for me.

#131537 01/10/05 11:12 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
You can just use on TEXT for PRIVMSG. mIRC supports a lot of standard irc commands and messages with own event handlers. For those, the raw message isn't triggered afaik.
CTCP stuff also has it's own event handler, see /help CTCP Events
ctcp <level>:<matchtext>:<*|#|?>:<commands>

#131538 01/10/05 12:05 PM
Joined: Feb 2005
Posts: 342
R
Rand Offline OP
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Alright, see.. the problem here is.. I'd like to be able to handle raw events.. on text, and on notice, really don't seem to capture DCC Send events.

(@debug):
Code:
&lt;- :rand!rand@qwest.net NOTICE r[a]nd :DCC Send #test.log (67.1.101.180)
&lt;- :rand!rand@qwest.net PRIVMSG r[a]nd :DCC SEND #test.log 1124165044 1028 755258


I'm not sure *how* I'm supposed to read those. It shouldn't be impossible to do.. I just can't seem to figure out how


Edit:

Nevermind, apparently it *is* the CTCP event. I had never noticed that before. Thanks again for the suggestions and help.

Last edited by Rand; 01/10/05 12:40 PM.
#131539 01/10/05 01:09 PM
O
Om3n
Om3n
O
Indeed, afaik, if an on event exists then the raw prop does not respond since its not needed. And yes, dcc is part of the ctcp protocol.

#131540 02/10/05 12:11 AM
D
DaveC
DaveC
D
<- :rand!rand@qwest.net NOTICE r[a]nd laughCC Send #test.log (67.1.101.180)

^ that is irrelevant and can also have a incorrect IP in it, because of how some peoples systems work.

<- :rand!rand@qwest.net PRIVMSG r[a]nd :DCC SEND #test.log 1124165044 1028 755258

^capture with ...
Code:
CTCP ^*:DCC SEND *:?:{ 
  tokenize 62 $1 $+ &gt; $+ $2 $+ &gt; $+ $nopath($filename) $+ &gt; $+ $gettok($1-,-3,32) $+ &gt; $+ $gettok($1-,-2,32) $+ &gt; $+ $gettok($1-,-1,32)
  ;$1 = DCC
  ;$2 = SEND
  ;$3 = filename
  ;$4 = longIP (see $longip)
  ;$5 = port
  ;$6 = filesize
}


The tokenize well fix any problem with files with spaces in it groups the whole filename spaces an all into $3 (and removes any surrounding " ")


Link Copied to Clipboard