mIRC Home    About    Download    Register    News    Help

Print Thread
#116007 01/04/05 06:38 AM
Joined: Apr 2005
Posts: 9
A
Alex01 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Apr 2005
Posts: 9
I wanted to know what the private messages look like, made a /debug:
<- :z!alex1990@xxx.xxx.xxx.xxx PRIVMSG alex01 :text!!!!

It's PRIVMSG, right? I wrote a small script, just to test it:
raw PRIVMSG:*: { echo -s I got some text. }

I send a message to myself from another nickname. The debug-window shows the text, but echo doesn't seem to work.
Why is that?

P.S.: If I replace the PRIVMSG with, e.g., ACTION - it still won't work. But it does work when I replace it with a numeric (on other events, of course).
But, as far as I've figured out, the PRIVMSG doesn't have its own numeric...

#116008 01/04/05 09:15 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I used Raw *:*: { echo -s $rawmsg } and it didn't echo anything at all.

I do however have this crappy code I'vejust whipped up. I think it works, from what I triedit seems to, but if it don't I'm sure someone can patch it up. I've not been to sleep yet, I'm dropping at the keyboard. grin

Code:
on *:Connect: {
  .timer 0 1 privmsg 
}

alias privmsg {
  if (!$isfile($debug)) { return }
  var %x = $lines($debug)
  while (%x) {
    if ($numtok($read($debug,%x),32) == 5) {
      if ($gettok($gettok($gettok($read($debug,%x),2,58),1,64),1,33) != $me)  &amp;&amp; ($gettok($read($debug,%x),3,32) == PRIVMSG) &amp;&amp; ($gettok($read($debug,%x),4,32) == $me) echo -a I got some text.
    }
    dec %x
  }
}


It may turn out there's a more simpler way and wont need this. Set your debug output to a log file and not window. I used /debug debug.log.

You might even be able to sort the code out if it don't work sufficiently, what it does is reads from the the log file to see if your nickname isn't the bart in blue, it also checks if the raw event was PRIVMSG in red. And will then echo I got some text. If your nickname matches the nickname the PRIVMSG was sent to.

<- :SladeKraven!Andy@=XDkswc54-437-735-342.range81-154.btcentralplus.com PRIVMSG Andy :...

I hope this helps, even a little bit. But my example should show you how to do it if mine don't work sufficiently hehehe.

All the best,

-Andy.

#116009 01/04/05 09:38 AM
Joined: Apr 2005
Posts: 9
A
Alex01 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Apr 2005
Posts: 9
Hmm, yeah, this should work (although I haven't tried yet, I got the idea).
But the code I was trying to get working IS supposed to work, and it's much better, too. I don't adore timers that work all the time, really. smile
Maybe this thread is for the "mIRC Bugs" board?

#116010 01/04/05 09:44 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Most probably is better that was just a rough etch up and plus I'm pretty tired.

As for bugs, I wouldn't call it a bug I'm not sure what to make of it IMO.

-Andy

Last edited by SladeKraven; 01/04/05 09:45 AM.
#116011 01/04/05 10:06 AM
Joined: May 2004
Posts: 95
W
Babel fish
Offline
Babel fish
W
Joined: May 2004
Posts: 95
"The raw event allows you to process numeric server messages that are identified only by a number, and non-numeric server messages which mIRC doesn't recognize internally."

taken from /help raw events, pay special attention to the last part. so for messages, you have to work with the on text event.

as side note, you can make /debug send everything to an alias, see /help /debug

wiebe

#116012 01/04/05 10:14 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yeah. smile

I guess I just wanted to see if there was any other way without On Text handling. As for the alias, I did something similar in my first post.

-Andy

#116013 01/04/05 12:27 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
another way is using

/debug -i on $debugger

Code:
alias debugger {
  ; $1 contains debug line so do what ya want with it
  ;example
  tokenize 32 $1
  if     ($1 $3 == -&gt; PRIVMSG) { echo -st YOU JUST SAID TEXT SAID IN A PRIVMSG TO $4 IT WAS $mid($5-,2) }
  elseif ($1 $3 == &lt;- PRIVMSG) { echo -st YOU JUST RECIEVED A PRIVMSG FROM $4 IT WAS $mid($5-,2) }
  ;
  return $1-
}

#116014 01/04/05 01:16 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Ah yes, I read about that earlier when looking for the $debug identifier. Good point. smile

#116015 01/04/05 01:18 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What Dave showed, is what wiebe tried to point out to you, if you read his last line carefully :tongue:


Gone.
#116016 01/04/05 01:36 PM
Joined: Apr 2005
Posts: 9
A
Alex01 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Apr 2005
Posts: 9
Quote:
another way is using
/debug -i on $debugger ...


Thank you very much! Works perfectly.

#116017 01/04/05 10:12 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
just a side note If your not keeping a debug.log, you might want to do something like

/debug -i null $debugger
^ null isnt nul device but just a file called null, see below i keep clearing the first thing in the alias

Code:
alias debugger {
  write -c null
[/quote]


* I tried sending output to nul and nul: but mirc didnt like it frown Anyone know how to set that?

#116018 01/04/05 11:10 PM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Another (not necessarily better) way of saving some resources, is by sending the debug output to a (hidden) window and simply having the debugger alias not /return anything; that way, that window will always remain empty, and no debug.log file will be created either. That's the method I use, anyway.


Quote:
* I tried sending output to nul and nul: but mirc didnt like it

As far as I know, mIRC blocks such device names because of the old /con/con (etc) DoS problems..


Saturn, QuakeNet staff
#116019 02/04/05 08:31 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The nul device is accepted by mirc in some occasions, like /debug and /filter. Are you sure
/debug -i nul somealias
doesn't work? As far as I know, it also works on 9x systems (I'm on XP).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#116020 11/04/05 10:37 AM
Joined: Apr 2005
Posts: 5
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Apr 2005
Posts: 5
I always cheated didnt actually know about using debuger but good info. Whenever i needed to know the raw data sent and recieved,i ussually used a script similar to this.

Code:
 
on *:sockwrite:ircserver: { echo @irc SENT: $1- }
on *:sockread:ircserver:{
  if ($sockerr &gt; 0) { return }
  :nextread
  sockread -f %ircServer
  if (%ircserver != $null) {
    echo @irc RECVD: %ircServer
  }
  if ($sockbr == 0) return
  goto nextread
}
on 1:input:@irc: { if ( $left($1,1) != / ) { sockwrite -n ircserver $1- } }
 


just need to do /window -e @irc and finish up with a /sockopen irc.somenetwork.net 6667
never failed when i needed to know raw data sent from ircd to client and back that code will probably ping out tho was a 2 sec write real fast

#116021 12/04/05 02:03 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
The nul device is accepted by mirc in some occasions, like /debug and /filter. Are you sure
/debug -i nul somealias
doesn't work? As far as I know, it also works on 9x systems (I'm on XP).


Grrrrr i had tried to use /write nul before and it failed, so i assumed it was blocked outright, thanks for the tip

#116022 12/04/05 09:43 AM
Joined: Apr 2005
Posts: 1
C
Mostly harmless
Offline
Mostly harmless
C
Joined: Apr 2005
Posts: 1
i would like to know if i can get credit cards number and their information,checks,moneyr orders and bank accounts loggin,i hope to hear from you soon,if u dont have any info,u can ask around,i would pay for it

#116023 12/04/05 11:36 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
This has nothing to do with this thread, and we do not help with those activities here. Please do not make any further attempts at this, it's bad, you wouldn't like it done to you, and it's highly illegal.

mad

Regards,


Mentality/Chris
#116024 12/04/05 10:11 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Where on earth did that come from?

#116025 30/04/05 01:25 AM
Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
spammer, he was on the scripting board before.
anyways this board has helped me archieve somthing i tried with raw privmsg:*: and didnt work
so thx peeps cool


Link Copied to Clipboard