mIRC Home    About    Download    Register    News    Help

Print Thread
#241589 04/05/13 03:53 PM
Joined: May 2013
Posts: 3
E
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

Joined: Jun 2007
Posts: 933
5
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.

Joined: May 2013
Posts: 3
E
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.

Joined: Dec 2008
Posts: 95
A
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).

Joined: May 2013
Posts: 3
E
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


Link Copied to Clipboard