Basic ChanInfo

By A Hylian Human on Oct 15, 2008

Just echoes some basic Channel Info, such as current modes, current topics, and users. Like I said, very basic.

alias ChanInfo {
  var %chan $iif($1 ischan,$1,$chan)
  echo -ta ----------
  echo -ta Channel Info for %chan at $asctime(hh:nn:ss tt) on $network $+ / $+ $server
  echo -ta Current Modes: $chan(%chan).mode - Current  Topic: $chan(%chan).topic
  echo -ta Total Users: $nick(%chan,0) - (&) Admins: $nick(%chan,0,a,ohvr) - (@) Ops: $nick(%chan,0,o) - (%) HalfOps: $nick(%chan,0,h) - (+) Voices: $nick(%chan,0,v) - Regulars: $nick(%chan,0,r)
  echo -ta ----------
}
Sign in to comment.
A Hylian Human   -  Oct 23, 2008

Heh, good ideas. Thanks! :)

 Respond  
napa182   -  Oct 19, 2008

eh either or

 Respond  
Gummo   -  Oct 19, 2008

I'd just set a %var to $iif($1,$1,$chan), then use %var.. Easy.

 Respond  
napa182   -  Oct 19, 2008

you can do the same thing with $iif so instead of having that elseif just do

alias ChanInfo {
  echo -ta ----------
  echo -ta Channel Info for $iif(!$1,$chan,$1) at $asctime(hh:nn:ss tt) on $network $+ / $+ $server
  echo -ta Current Modes: $chan($iif(!$1,$chan,$1)).mode - Current  Topic: $chan($iif(!$1,$chan,$1)).topic
  echo -ta Total Users: $nick($iif(!$1,$chan,$1),0) - (&) Admins: $nick($iif(!$1,$chan,$1),0,a,ohvr) - (@) Ops: $nick($iif(!$1,$chan,$1),0,o) - (%) HalfOps: $nick($iif(!$1,$chan,$1),0,h) - (+) Voices: $nick($iif(!$1,$chan,$1),0,v) - Regulars: $nick($iif(!$1,$chan,$1),0,r)
  echo -tsa ----------
}
 Respond  
A Hylian Human   -  Oct 19, 2008

@rhasttaff: I have taken your comment into consideration, and have modified my snippet. However, it has an elseif { statement because it will first check if you specified $1 and if it is a channel. If it isn't, it will check if the active window is a channel, and if it is a channel, it will display the channel info for the current channel. I hope this makes sense. :)

[The Hylian/Human Hybrid!]

 Respond  
rhasttaff   -  Oct 15, 2008

Hallo A Hylian Human wellcomo to hawkee.com :)

good idea this snipet ;)

i culd suggest you to short it from:

alias ChanInfo {
  if ($me ison $1) {
    echo -ta ----------
    echo -ta Channel Info for $1 at $asctime(hh:nn:ss tt)
    echo -ta Current Modes: $chan($1).mode - Current  Topic: $chan($1).topic
    echo -ta Total Users: $nick($1,0) - (&) Admins: $nick($1,0,a,ohvr) - (@) Ops: $nick($1,0,o) - (%) HalfOps: $nick($1,0,h) - (+) Voices: $nick($1,0,v) - Regulars: $nick($1,0,r)
    echo -ta ----------
  }
  else {
    echo -ta ----------
    echo -ta Channel Info for $chan at $asctime(hh:nn:ss tt)
    echo -ta Current Modes: $chan($chan).mode - Current  Topic: $chan($chan).topic
    echo -ta Total Users: $nick($chan,0) - (&) Admins: $nick($chan,0,a,ohvr) - (@) Ops: $nick($chan,0,o) - (%) HalfOps: $nick($chan,0,h) - (+) Voices: $nick($chan,0,v) - Regulars: $nick($chan,0,r)
    echo -ta ----------
  }
}

to

alias ChanInfo {
  if ($active ischan) {
    echo -ta ----------
    echo -ta Channel Info for $chan at $asctime(hh:nn:ss tt)
    echo -ta Current Modes: $chan($chan).mode - Current  Topic: $chan($chan).topic
    echo -ta Total Users: $nick($chan,0) - (&) Admins: $nick($chan,0,a,ohvr) - (@) Ops: $nick($chan,0,o) - (%) HalfOps: $nick($chan,0,h) - (+) Voices: $nick($chan,0,v) - Regulars: $nick($chan,0,r)
    echo -ta ----------
  }
}

this becouse you don't need the if ($me ison $1) becouse if you aren't in that chan its will not work. so now you just need type /chaninfo

try that ;)

Jah Bless´´´

 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.