ServerUsers for mIRC v6.16By: [Talon]
Last Modified: Feb 07 1:24pm

What this script does is watch SNotices and keeps an active list of all users connected to the given server.
It can probably easily be made to show all users globaly, but I havnt bothered with that yet.
To Do:
*Rather than INIT on connect, init when user opers up
*Make it actually halt the SNotices and /who results properly
*Color clones
*User control through menu?
Change Log:
R1: Release
It can probably easily be made to show all users globaly, but I havnt bothered with that yet.
To Do:
*Rather than INIT on connect, init when user opers up
*Make it actually halt the SNotices and /who results properly
*Color clones
*User control through menu?
Change Log:
R1: Release

;this alias is only to set up the variables for this script
;THIS SHOULD BE THE ONLY THING YOU NEED TO EDIT
alias suInitVars {
;network to use
%su.network = Jaundies
;server to get /who list from
%su.server = clodhopper.jaundies.com
;window name
%su.window = @ServerUsers
}
on *:CONNECT:{
suInitVars
mode $me +s +nc
if ( $network == %su.network ) {
suInit
}
}
alias suInit {
if ($window(%su.window)) {
window -c %su.window
}
suInitWindow
.enable #suWhoScrape
who +Rs %su.server
}
alias -l suInitWindow {
if (!$window(%su.window)) {
window -Bkl35nv %su.window
}
}
;$1 Nickname
;$2 Host
;$3- Type
alias -l suAddUser {
suEcho %su.window 5-> $+ $1 $+ ||| $2 ||| $3- |||
var %lineid $fline(%su.window,$1 $+ ! $+ $2,1,1)
if ( %lineid == $null ) {
aline -l %su.window $1 $+ ! $+ $2
}
suSort
}
;$1 Nickname
;$2 Host
;$3- Reason
alias -l suRemoveUser {
suEcho %su.window 5<- $+ $1 $+ ||| $2 ||| $3- |||
var %lineid $fline(%su.window,$1 $+ ! $+ $2,1,1)
if ( %lineid != $null ) {
dline -l %su.window %lineid
}
}
;$1 Old Nick
;$2 Host
;$3 New Nick
alias -l suNickChange {
suEcho %su.window 5== $+ $1 $+ is now $+ $3 $+ ||| $2 |||
var %lineid $fline(%su.window,$1 $+ ! $+ $2,1,1)
if ( %lineid != $null ) {
rline -l %su.window %lineid $3 $+ ! $+ $2
suSort
}
}
alias -l suEcho {
suInitWindow
echo $color(NOTICE) -tgm $$1 $$2-
}
alias -l suSort {
window -lS %su.window
}
on ^*:SNOTICE:*:{
if ($target == AUTH) {
; Don't do anything anymore
}
elseif ($network == %su.network ) {
if ($regex(suregex, $1-,\*\*\* Notice -- Client connecting on port [0-9]*?: (.*?) \((.*?)\) \[(.*)\])) {
suAddUser $regml(suregex, 1) $regml(suregex, 2) $regml(suregex, 3)
haltdef
}
elseif ($regex(suregex, $1-,\*\*\* Notice -- Client exiting: (.*?) \((.*?)\) \[(.*)\])) {
suRemoveUser $regml(suregex, 1) $regml(suregex, 2) $regml(suregex, 3)
haltdef
}
elseif ($regex(suregex, $1-,\*\*\* Notice -- (.*?) \((.*?)\) has changed his/her nickname to (.*))) {
suNickChange $regml(suregex, 1) $regml(suregex, 2) $regml(suregex, 3)
haltdef
}
}
}
#suWhoScrape off
raw 352:*: {
if ($regex(suregex, $1-,(.*?) (.*?) (.*?) (.*?) (.*?) (.*?) .*)) {
;[talon] #thenest Someone Jaundies-C3E5E8D6.vs.shawcable.net clodhopper.jaundies.com tigglyruff G*~ 0 Evil Incarnate
suAddUser $regml(suregex, 6) $regml(suregex, 3) $+ @ $+ $regml(suregex, 4) Script Init
}
halt
}
raw 315:*: {
suSort
.disable #suWhoScrape
halt
}
#suWhoScrape end |

Comments