mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 21
V
Vile Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 21
It seems that the ON TEXT event strips out the servername from $rawmsg and $rawbyte, while other events/raws are able to get the full raw message.

I'm making a znc bouncer compatibility script, and znc stores information in the server name when sending the old buffer log. example from /debug:

Quote:
<- @time=2014-06-25T16:02:24.782Z :Nick!Ident@Host PRIVMSG #chan :testing


When you access $rawmsg and $rawbyte within the on text remote event, those identifiers only return the text from :Nick!Ident@host onward.

To my knowledge there's no other way to receive the source server from these events, other than having to do annoying stuff with /debug parsing.


Replicating:

Quote:
raw *:*: echo -sg $rawmsg
; ^ has the server name
on *:TEXT:*:#:echo -sg $rawmsg
; ^ does not have the server name

Last edited by Vile; 26/06/14 01:54 AM.
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for your bug report. This is actually by design. mIRC now supports the CAP server-time @time prefix which is enabled automatically if the server lists it in CAP LS. If a server message has a @time prefix with a UTC timestamp, $msgstamp will return this value.

The reason @time is removed from $rawmsg is that as server-time is now enabled automatically by mIRC and as the @time prefix is not part of the original IRC protocol, leaving @time in $rawmsg would have broken all existing scripts that use $rawmsg.

Joined: Dec 2002
Posts: 21
V
Vile Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 21
I see. Actually this may not have even been my problem.

My script was redirecting the znc buffer log into an @window instead of sending it into the channel.

To determine that it was from the znc buffer log I had a simple:

Quote:
if ($nick == ***)


Which is how ZNC formats it. I noticed since upgrading to the latest mIRC it no longer worked.

Maybe there was code that changes how $nick is handled in situations where it is spoofed? Anyway, since that wasn't working anymore, I figured I could tell if it was an old buffer log by seeing if the @time= was being sent from irc.znc.in

Last edited by Vile; 29/06/14 09:09 AM.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
If that's now broken, what's the value of $nick?


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

Link Copied to Clipboard