;Creates a menu in our new List window (@List).
menu @List {
;In a normal Raw event $2 would be the channel but in our window it shows as: 10 users in #Channel.
;So we know we want the 4th token/word.
Join Channel: join $gettok($sline(@List,1),4,32)
Show Users:names $gettok($sline(@List,1),4,32)
-
More Stuff:here
-
And more: stuff
}
;This stores the size of our List window in vars so we don't have one long line.
alias list {
var %x = $window(Channels List).x
var %y = $window(Channels List).y
var %w = $window(Channels List).w
var %h = $window(Channels List).h
window -lk0C @List %x %y %w %h
;The ! before list means we want to use the default /LIST command and not our own.
!list
}
;Raw 322 is the channel trapping Raw event, $2 is the channel, $3 is the users, and $4- is the channels topic.
Raw 322:*: {
;This hides the default channel list.
window -h "Channels List"
;If our @List window is opened show results otherwise do nothing.
if ($window(@List)) {
;Increases the number of chans there is for titlebar later on.
inc %chans
;Appears like List 100/100 on jingo.ix.us.dal.net Sun Jul 24 10:37:07 2005
titlebar @List $+(%chans,/,%chans) on $server $asctime
;Adds our results in our window.
aline @List $3 users in $2 - $4-
}
}
;When channels are done listing we unset the number of channels found.
Raw 323:*: { unset %chans }