Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Channel modes, simple away system and ignore popup snippet

Recommended Posts

  • Administrators

Channel modes, simple away system and ignore popup snippet

 

Snippet which helps you access channel modes , sets away/back and ignore through popups using $style

 

>;here the channel modes menu begins:menu channel {  ;this creates a line break  -  ;this creates a submenu called Channel Modes and also show the currently active modes:  Channel Modes $+ $chr(58) $+ $chr(9) $+ $chan(#).mode  ;these are the most common channel modes, i use case sensitive isin operator, cause you can see there is an "m" and an "M" mode. Else you may get an error.  ;also i use $gettok to only use the first word for the $chan(#).mode identifier cause the second and third could be the key and or userlimit.  ;the $if is as following, if channelmode "+c" is active, it returns a checked item, this is done by $style(1), else it returns no style.  ;this way you can see what modes are on (checked) and what modes are off (unchecked).  .$iif(c isincs $gettok($chan(#).mode,1,32),$style(1)) No Colors:{ if (c isincs $gettok($chan(#).mode,1,32)) { mode # -c } | else { mode # +c } }  .$iif(i isincs $gettok($chan(#).mode,1,32),$style(1)) Invite Only:{ if (i isincs $gettok($chan(#).mode,1,32)) { mode # -i } | else { mode # +i } }  .$iif(M isincs $gettok($chan(#).mode,1,32),$style(1)) Only Registered nicks can speak:{ if (M isincs $gettok($chan(#).mode,1,32)) { mode # -M } | else { mode # +M } }  .$iif(m isincs $gettok($chan(#).mode,1,32),$style(1)) Moderated:{ if (m isincs $gettok($chan(#).mode,1,32)) { mode # -m } | else { mode # +m } }  .$iif(n isincs $gettok($chan(#).mode,1,32),$style(1)) No External Messages:{ if (n isincs $gettok($chan(#).mode,1,32)) { mode # -n } | else { mode # +n } }  .$iif(p isincs $gettok($chan(#).mode,1,32),$style(1)) Private:{ if (p isincs $gettok($chan(#).mode,1,32)) { mode # -p } | else { mode # +p } }  .$iif(R isincs $gettok($chan(#).mode,1,32),$style(1)) Registered Nicks Only:{ if (R isincs $gettok($chan(#).mode,1,32)) { mode # -R } | else { mode # +R } }  .$iif(s isincs $gettok($chan(#).mode,1,32),$style(1)) Secret:{ if (s isincs $gettok($chan(#).mode,1,32)) { mode # -s } | else { mode # +s } }  .$iif(t isincs $gettok($chan(#).mode,1,32),$style(1)) Only Ops Set Topic:{ if (t isincs $gettok($chan(#).mode,1,32)) { mode # -t } | else { mode # +t } }  ;for the user limit the same thing shows, but when a user limit is set (checked) it shows the limit  .$iif(l isincs $gettok($chan(#).mode,1,32),$style(1) User Limit $+ $chr(58) $chan(#).limit,User Limit):{ if (l isincs $gettok($chan(#).mode,1,32)) { mode # -l } | else { mode # +l $$?"Maximum number of users allowed in # $+ :" } }  ;same thing goes for channelkey, if it is set, you will see it in the popups  .$iif(k isincs $gettok($chan(#).mode,1,32),$style(1) Key $+ $chr(58) $chan(#).key,Key):{ if (k isincs $gettok($chan(#).mode,1,32)) { mode # -k $chan(#).key } | else { mode # +k $$?"Enter key for # $+ :" } }  -};here the simple away system menu beginsmenu status,channel,menubar {  -  ;this makes a submenu called away system, if you are set to away, it will be checked  $iif($away,$style(1)) Away System  ;if you are away this item is called "Set Back". if not its called "Set Away"  ;it will also msg the chan when you're leaving or return while showing the reason and the duration  .$iif($away,Set Back,Set Away):{ if ($away) { ame is back from:  $+ $awaymsg $+ . I was gone for:  $+ $duration($awaytime) $+  | away } | else { away $$?"Away reason:" | ame is leaving. reason:  $+ $awaymsg $+  } }  .-  ;these items will only show when you are set to away, you can view you're current awaytime here and your away reason  ;when clicking them nothing will happen  .$iif($away,Reason $+ $chr(58) $+ $chr(9) $+ $awaymsg):{ }  .$iif($away,Time $+ $chr(58) $+ $chr(9) $+ $duration($awaytime)):{ }  -};this is a really simple menu item for your nicklist popupmenu nicklist {  -  ;this will show a checked ignore when a user is on your ignore list and an unchecked ignore when the user isnt  ;offcourse it allowes you to remove the ignore or add one to a user  $iif($ignore($address($$1,1)),$style(1)) Ignore:{ if ($ignore($address($$1,1))) { ignore -r $$1 1 } | else { ignore $$1 1 } }  -};Channel modes, simple away system and ignore popup menu snippet by airliner @ DALnet;you may use this for everything you want... if you wanna add me to the credits (which i think is not necessary), contact me first

Link to comment
Share on other sites



×
×
  • Create New...