mIRC Home    About    Download    Register    News    Help

Print Thread
Elevated chat capture #241589 04/05/13 03:53 PM
Joined: May 2013
Posts: 3
E
EternalSage Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: May 2013
Posts: 3
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

Re: Elevated chat capture [Re: EternalSage] #241590 04/05/13 05:38 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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.

Re: Elevated chat capture [Re: EternalSage] #241598 05/05/13 09:29 AM
Joined: May 2013
Posts: 3
E
EternalSage Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: May 2013
Posts: 3
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.

Re: Elevated chat capture [Re: EternalSage] #241599 05/05/13 09:55 AM
Joined: Dec 2008
Posts: 95
A
asdfasdf Offline
Babel fish
Offline
Babel fish
A
Joined: Dec 2008
Posts: 95
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).

Re: Elevated chat capture [Re: asdfasdf] #241604 05/05/13 03:17 PM
Joined: May 2013
Posts: 3
E
EternalSage Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: May 2013
Posts: 3
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