|
Joined: Apr 2005
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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...
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
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. 
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) && ($gettok($read($debug,%x),3,32) == PRIVMSG) && ($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.
|
|
|
|
Joined: Apr 2005
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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.  Maybe this thread is for the "mIRC Bugs" board?
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
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.
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
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
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Yeah.  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
|
|
|
|
Joined: Sep 2003
Posts: 4,214
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,214 |
another way is using /debug -i on $debugger
alias debugger {
; $1 contains debug line so do what ya want with it
;example
tokenize 32 $1
if ($1 $3 == -> PRIVMSG) { echo -st YOU JUST SAID TEXT SAID IN A PRIVMSG TO $4 IT WAS $mid($5-,2) }
elseif ($1 $3 == <- PRIVMSG) { echo -st YOU JUST RECIEVED A PRIVMSG FROM $4 IT WAS $mid($5-,2) }
;
return $1-
}
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Ah yes, I read about that earlier when looking for the $debug identifier. Good point. 
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
What Dave showed, is what wiebe tried to point out to you, if you read his last line carefully :tongue:
|
|
|
|
Joined: Apr 2005
Posts: 9
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Apr 2005
Posts: 9 |
another way is using /debug -i on $debugger ... Thank you very much! Works perfectly.
|
|
|
|
Joined: Sep 2003
Posts: 4,214
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,214 |
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
alias debugger {
write -c null
[/quote] * I tried sending output to nul and nul: but mirc didnt like it  Anyone know how to set that?
|
|
|
|
Joined: Apr 2004
Posts: 700
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 700 |
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. * 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
|
|
|
|
Joined: Jan 2003
Posts: 2,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
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).
|
|
|
|
Joined: Apr 2005
Posts: 5
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
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.
on *:sockwrite:ircserver: { echo @irc SENT: $1- }
on *:sockread:ircserver:{
if ($sockerr > 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
|
|
|
|
Joined: Sep 2003
Posts: 4,214
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,214 |
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
|
|
|
|
Joined: Apr 2005
Posts: 1
Mostly harmless
|
Mostly harmless
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
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
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.  Regards,
|
|
|
|
Joined: Sep 2003
Posts: 4,214
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,214 |
Where on earth did that come from?
|
|
|
|
Joined: Sep 2004
Posts: 200
Fjord artisan
|
Fjord artisan
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 
|
|
|
|
|