/pnick

By FLCL on Oct 25, 2007

Returns the nicks in the channel with their modes in character format. /pnick (#channel)

/*
/pnick by FLCL

This snippet echos the nicks in a channel (manually specified) with their proper modes in pnick format. Syntax: /pnick (#channel)

Updates: 
Fixed a bug where it repeated the first letter of a nick with no status.
Added a bit more error checking. 
Shoutouts:
Scakk - Recognized first bug, provided error checking. 
xDaeMoN - provided support on shortening the code. 

This snippet is NOT to be redistributed/edited. 
*/

alias pnick { 
  if ($1 && $regex($1,/^(#)/i) && $me ison $1) { 
    var %x = 1 
    while ($nick($1, %x)) {  
      var %w = $v1, %n = $addtok(%n,$+($iif($left($remove($nick(#,%w).pnick,%w),1),$v1),%w),32)
      inc %x
    }
    echo $colour(info) -a %n
  }
  elseif (!$1) { echo $colour(info) -a Invalid syntax. }
  elseif (!$regex($1,/^(#)/i)) { echo $colour(info) -a Invalid format in channel name. Must include the 35th character (#). }
}

Comments

Sign in to comment.
Lindrian   -  Oct 28, 2007

Regex overkill...
Also; you will encounter line too long errors buddy.

 Respond  
co2h   -  Oct 28, 2007

This could be quite useful. Using $regex is kind of pointless. Just $left($1,1) = # should work fine, and, there is no need of two separate elseif events. Just something along the lines of: else { echo $colour(info) -a Invalid syntax. $iif(!$1, Missing channel name,Missing # before channel name.) }

 Respond  
FLCL   -  Oct 26, 2007

Thanks xDaeMoN. :)

 Respond  
xDaeMoN   -  Oct 26, 2007

You can shorten the line after the /while with this:

var %w = $v1, %n = $addtok(%n,$+($iif($left($remove($nick(#,%w).pnick,%w),1),$v1),%w),32)

Just a suggestion. =)

 Respond  
FLCL   -  Oct 26, 2007

Odd. That shouldn\'t happen. I tested it and it worked perfectly fine.

 Respond  
humming_hi   -  Oct 26, 2007

hi, i noticed another error, it will remove letters in nicknames if they are the same as the start (Echlon, gre, Ni, and Syru should be Echelon, greg, Nin, and Syrus)

 Respond  
FLCL   -  Oct 26, 2007

I, because I am pretty lazy, use this to check users in my channel from the active browser. I use this in an on join event so it will tell me the current list of users in the channel It doesn\'t have to serve any particular use. I really don\'t understand the second half of your comment, but yeah. Whatever it serves the user for I guess.

 Respond  
Zsadist   -  Oct 26, 2007

Exactly what is the point of this script? Why not just make a simple alias and text script to have the people show their status next to their names :(

 Respond  
FLCL   -  Oct 25, 2007

Thanks Scakk, much appreciated. :P

 Respond  
Scakk   -  Oct 25, 2007

Very nice it is. Rated it too ^_^

 Respond  
FLCL   -  Oct 25, 2007

Done.

 Respond  
Scakk   -  Oct 25, 2007

No double first letters now.


Perhaps add a part in there about you have to be in the channel for it to work. Trying it on you are not it in returns an error

* /echo: insufficient parameters (line 10, waiterjohn)
 Respond  
FLCL   -  Oct 25, 2007

Should work now.

 Respond  
FLCL   -  Oct 25, 2007

Didn\'t recognize that. I\'ll fix that right now Scakk, thanks for pointing that out.

 Respond  
Scakk   -  Oct 25, 2007

If a person has no ops in the channel it put the first letter of their nick twice.

Ex: ~Goofy|Around &WaiterJohn bblues|away VVaseline

 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.