mIRC Home    About    Download    Register    News    Help

Print Thread
#78851 11/04/04 11:44 AM
Joined: Oct 2003
Posts: 8
R
Rothgar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Oct 2003
Posts: 8
I am looking to echo prefixes on an on TEXT event:
However we run unrealircd with the new mode prefixes for +q as ~ and +a as &
How do I print the prefix in my echo?
I know for op voice and reg I can use the checks but what about owner/protected users? I can't seem to find a way to grab the information, I thought maybe I could grab the data from userlist maybe.

#78852 11/04/04 12:49 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Not sure if it would work with the lesser used mode prefixes but you could try:

$nick(#,$nick,~)
$nick(#,$nick,&)

Usage:

Code:
if $nick(#,$nick,~) {
  echo -t # 7<12~ $+ $nick $+ 7> $1-
}

#78853 11/04/04 04:29 PM
Joined: Oct 2003
Posts: 8
R
Rothgar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Oct 2003
Posts: 8
Ah wasn't sure about that thanks, seems to work great:
Code:
on ^*:TEXT:*:*:{
  if ($me isin $1-) {
    if ($readini(" $+ $script $+ ",n,settings,STATUS) == ON) {
      if ($readini(" $+ $script $+ ",n,settings,SOUND) == ON) {
        $iif($isfile(" $+ $scriptdirpage.wav $+ "),splay -cw " $+ $scriptdirpage.wav $+ ",beep 10 1)
      }
      echo -tlbfmrc normal $iif($target == $me, $nick, $target) < $+ $iif( $nick($chan,$nick,~), ~, $iif( $nick($chan,$nick,&), &, $iif( $nick($chan,$nick,@), @, $iif( $nick($chan,$nick,%), %, $iif( $nick($chan,$nick,+), +, $null) ) ) ) ) $+ $nick $+ > $replace( $1-,$me,$chr(3) $+ 4 $+ $me $+ $chr(3) )
      haltdef
    }
  }
}

Done smile

#78854 11/04/04 04:33 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
$iif($left($nick(#,$nick).pnick,1) isin ~ . & ! * @ % +,$left($nick(#,$nick).pnick,1)) $+ $nick is the same wink
but it supports all prefixes.


New username: hixxy
#78855 11/04/04 04:58 PM
Joined: Dec 2002
Posts: 230
G
Fjord artisan
Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
What about
Code:
$iif($nick !isreg $chan,$left($nick($chan,$nick).pnick,1)) $+ $nick

? smile

#78856 11/04/04 05:27 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
yep, i just prefer doing it with the prefixes, don't know why wink


New username: hixxy

Link Copied to Clipboard