mIRC Homepage
Posted By: EternalSage Elevated chat capture - 04/05/13 03:53 PM
In the raw mirc debug there is this for elevated chat:

timestamp <- :nick!ident@hotmask PRIVMSG @#channel :text
timestamp <- :nick!ident@hotmask PRIVMSG %#channel :text
timestamp <- :nick!ident@hotmask PRIVMSG +#channel :text

I want to make an echo with:

on ^*:text:*:#:{
haltdef
if (some elevated thing lets say op) { echo $chan $specialtimestamp @#channel $nick $1- }
if (some elevated halfop thing) { echo $chan $specialtimestamp %#channel $nick $1- }
if (some elevated voice thing) { echo $chan $specialtimestamp +#channel $nick $1- }
else { echo $chan $nick $1-}
}

How do I single out the @%+#chan stuff?

Thanks
Posted By: 5618 Re: Elevated chat capture - 04/05/13 05:38 PM
You can simply use the isop, ishop and isvoice operators for this (see the help file).

E.g.

if ($nick isop $chan) { }
elseif ($nick ishop $chan) { }
elseif ($nick isvoice $chan) { }
else { }

Alternatively you can do something with $nick($chan,$nick).pnick but that can show multiple mode prefixes when someone has both +o and +v in the channel.
Posted By: EternalSage Re: Elevated chat capture - 05/05/13 09:29 AM
I understand isop ishop isvoice n .pnick what I dont know is how to echo to the channel with messages sent and seen to only op's hop's and voice's.

When you message a channel with /msg +#channel message only voices and above see it. What I have an issue with is not using mirc's default output but using a personal echo to capture n relay it to the channel. Using my own personal timestamp that mirc cant parse in its options menu I have to use echo's with a custom identifier.

the raw sends this to the client:
<- :nick!ident@hotmask PRIVMSG +#channel :message

I can only seem to capture the $1- How do I pull the +#channel.
Posted By: asdfasdf Re: Elevated chat capture - 05/05/13 09:55 AM
In your on TEXT event, you can find the prefix in $rawmsg.

:nick!user@host PRIVMSG #chan :asdf
:nick!user@host PRIVMSG +#chan :asdf
:nick!user@host PRIVMSG @#chan :asdf

So something like $left($gettok($rawmsg,3,32),1) will return the prefix (or # if none was given in this example).
Posted By: EternalSage Re: Elevated chat capture - 05/05/13 03:17 PM
Originally Posted By: asdfasdf
In your on TEXT event, you can find the prefix in $rawmsg.

:nick!user@host PRIVMSG #chan :asdf
:nick!user@host PRIVMSG +#chan :asdf
:nick!user@host PRIVMSG @#chan :asdf

So something like $left($gettok($rawmsg,3,32),1) will return the prefix (or # if none was given in this example).


Tyvm asdfasdf
© mIRC Discussion Forums