mIRC Homepage
Posted By: Vile No access to server w/ $rawmsg on:text events - 26/06/14 01:30 AM
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
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.
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
If that's now broken, what's the value of $nick?
© mIRC Discussion Forums