Prefix Script

By ThE ViPeR on Sep 26, 2010

Anyone know how to stop it from echoing in the active along with
messaging the channel?
Example:
12°15[141212:140112:141412pm15]12° 14,1<12,1ViPeR14,1> hm
12°15[141212:140112:141412pm15]12° hm

on *:INPUT:#:{
  if ($left($1,1) != /) {
    if ($left($nick(#,$me).pnick,1) == ~) { haltdef | echo -mt $chan 12,1<14,1~12,1 $+ $me $+ > $1- }
    if ($left($nick(#,$me).pnick,1) == &) { haltdef | echo -mt $chan 12,1<14,1&12,1 $+ $me $+ > $1- }
    if ($left($nick(#,$me).pnick,1) == @) { haltdef | echo -mt $chan 12,1<14,1@12,1 $+ $me $+ > $1- }
    if ($left($nick(#,$me).pnick,1) == %) { haltdef | echo -mt $chan 12,1<14,1%12,1 $+ $me $+ > $1- }
    if ($left($nick(#,$me).pnick,1) == +) { haltdef | echo -mt $chan 12,1<14,1+12,1 $+ $me $+ > $1- }
    if ($left($nick(#,$me).pnick,1) !isin ~&@%+) { haltdef | echo -mt $chan 14,1<12,1 $+ $me $+ 14,1> $1- 
      msg $active $1- 
    }
  }
}

Comments

Sign in to comment.
gooshie   -  Sep 26, 2010

You could
[Alt]+o => IRC => Show mode prefix
And [ALT]+b => Nick Colors => (add $me)
to get simular results.

on *:INPUT:#:{
  if ($left($1,1) != /) {
    if $left($nick(#,$me).pnick,1) isin ~&@%+ {
       echo -mt # 12,1<14,1 $+ $v1 $+ 12,1 $+ $me $+ > $1-
    }
    else { echo -mt # 14,1<12,1 $+ $me $+ 14,1> $1- }
    haltdef | .msg # $1- 
  }
}

Another method assuming you still want the prefix
colored different than your nickname is:

on *:INPUT:#:{
  if ($left($1,1) != /) {
    var %p $left($nick(#,$me).pnick,1)
    if %p isin ~&@%+ { %p = $+($chr(3),$color(other),$v1) } | else { %p = }
    echo -cmti2 own # $+(<,%p,$chr(3),$nick(#,$me).color,$me,$chr(3),$color(own),>) $1-
    haltdef | .msg # $1- 
  }
}
________________________________________________________________________________________
 Respond  
Jethro   -  Sep 26, 2010

ThE ViPeR wrote:> Anyone know how to stop it from echoing in the active along with messaging the channel?The issue at hand is a simple fix. All you have to do is place a dot in front of the /msg command to silence the ouput, so you'll only see the printout of echo:> .msg $active $1-

 Respond  
Sorasyn   -  Sep 26, 2010

For starters you might wanna post this in forums as opposed to a snippet, but heres a few solutions you might try.

  • Instead of all "if" statements change all but one to "elseif" reason being is that you could have op, halfop, and voice at the same time, echoing it 3 times on your end instead of once. (Can refine this method to function in one alias, but that is by far more complicated than changing a few statements)

  • Your not silencing the "msg $active $1-" so your script echoes your message with the proper symbol affixed to it, while messaging the active channel with the same thing -- Hence why you can see it twice.
    just append a period (.) to "msg $active $1-" and your echo should stop
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.