Advertisement
HeilTec

Channels Info

Jan 25th, 2012
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.43 KB | None | 0 0
  1. ; The Identifier $submenu calls; generates a list of channels.
  2. alias _infochan {
  3.   var %ch $chan($1)
  4.   if ($1 == begin) return -
  5.   ; Grey all channels with no ChanServ
  6.   if (%ch ischan) return $iif(!$ChanInfoBot(%ch),$style(2)) %ch : .chaninfo %ch
  7.   if ($1 == end) return -
  8. }
  9.  
  10. ; Check to see if ChanServ exists on the network you are on.
  11. alias _cschk {
  12.   return 1
  13.   .notify ChanServ $network
  14.   if ($notify(ChanServ) > 0) { var %csison = 1 }
  15.   elseif ($notify(ChanServ) < 1) { var %csison = 0 }
  16.   .timer 1 1 .notify -r ChanServ
  17.   return %csison
  18. }
  19. alias chanInfoBot {
  20.   var %ch $iif($1,$1,$active)
  21.   if (ChanServ ison %ch) $&
  22.     || (Centravi ison %ch) $&
  23.     || (NeonServ ison %ch) {
  24.     var %bot $v1
  25.   }
  26.   if ($cmdbox) echo -a chanbot on %ch $+ : $iif(%bot,%bot,(none))
  27.   else return %bot
  28. }
  29. alias chanInfo {
  30.   var %ch $iif($1,$1,$active)
  31.   if (ChanServ ison %ch) $&
  32.     || (Centravi ison %ch) $&
  33.     || (NeonServ ison %ch) {
  34.     .msg $v1 info %ch
  35.   }
  36. }
  37. menu status,channel {
  38.   ; If there is no Chanserv, hide the menu.
  39.   $iif($_cschk < 1,$style(2)) Get Channel Info
  40.   ; Else, list the channels.
  41.   .$submenu($_infochan($1))
  42. }
  43.  
  44.  
  45. ; If you put the script in your remote section of your mIRC an extra menu appears when right-clicking in the status-window or a channel window.
  46. ; The 'Get Channel info' menu then shows all channels opened and each one that has an info command chan-bot can be clicked to show the info.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement