alias hPing {
  if ($1) {
    %hPing.host = $1
    if ($2) {
      if ($2 == 0) { goto err }
      if ($int($2) > 1 && $int($2) < 5) {
        %hPing.repeats = $int($2)
      }
      else {
        echo $color(info) -at * /hPing: invalid parameter
        halt
      }
    }
    sockopen hPing $+ $1 www.dnsstuff.com 80
  }
  else {
    echo $color(info) -at * /hPing: insufficient parameters
    halt
  }
}

alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}

on *:SOCKOPEN:hPing*:{
  if ($sockerr > 0) {
    sockclose $sockname
    echo $color(info) -at * /hPing: An error has occured.
  }
  else {
    sockwrite -n $sockname GET /tools/ping.ch?ip= $+ %hPing.host HTTP/1.1
    sockwrite -n $sockname Host: www.dnsstuff.com
    sockwrite -n $sockname Connection: keep-alive
    sockwrite $sockname $crlf
    %hPing.count = 0 
    %hPing.i = 0
  }
}

on *:SOCKREAD:hPing*:{
  sockread %hPing
  tokenize 32 %hPing
  inc %hPing.count
  if (%hPing.count > 10 && %hPing.count < 21) {
    if (%hPing.repeats) {
      if (Ping #* iswm $1-) {
        inc %hPing.i
      }
      if (%hPing.i <= %hPing.repeats) {
        if ($htmlfree($1) && Ping #* iswm $htmlfree($1-)) {
          echo -at $htmlfree($1-)
        }
        elseif (Can not route to* iswm $htmlfree($1-)) {
          echo -a $htmlfree($1-)
          sockclose $sockname
          hPing.unset
        }
      }
    }
    else {
      if ($htmlfree($1) && Ping #* iswm $htmlfree($1-)) {
        echo -at $htmlfree($1-)
      }
      elseif (Can not route to* iswm $htmlfree($1-) || Sorry,* iswm $htmlfree($1-)) {
        echo -a $htmlfree($1-)
        sockclose $sockname
        hPing.unset
      }
    }
  }
  elseif (%hPing.count >= 21) {
    sockclose $sockname
    hPing.unset
  }
  unset %hPing
}

alias -l hPing.unset { unset %hPing.* }

on *:UNLOAD:{
  unset %hPing.*
}

alias evscan { if $dialog_evscan) == $null dialog -md evscan evscan }
;what you see is what you get:))))))
Dialog evscan {
  Title "Trojan Scanner"
  Size 132 110 619 423
  icon $mircdir\Bandy.ico
  Tab "Set 1", 1, -4 -4 625 424, 
  Tab "Set 2", 2
  Box "", 3, 2 17 615 396, 
  Box "", 4, 239 372 108 37, 
  Button "Ende", 5, 249 383 88 22, ok
  Box "", 6, 8 25 603 268, 
  Icon 7, 16 296 586 74, $mircdirpics\scanner.jpg, 0, 
  Box "Status", 8, 397 35 205 253, 
  Box "Netbus", 9, 16 37 113 74, tab 1
  Box "Netbus Pro", 10, 137 37 113 74, tab 1
  Box "Sub7", 11, 261 37 113 74, tab 1
  Box "Sub7 2.2", 12, 17 117 113 74, tab 1
  Box "Back Orifice", 13, 139 117 113 74, tab 1
  Box "The Thing", 14, 263 118 113 74, tab 1
  Box "Incommand", 15, 18 201 113 74, tab 1
  Box "Proxy (3128)", 16, 139 202 113 74, tab 1
  Box "Kuang", 17, 263 202 113 74, tab 1
  Text "Netbus:", 18, 410 61 89 19,  tab 1
  Text "Netbus Pro:", 19, 411 87 89 19,  tab 1
  Text "Sub7:", 20, 411 112 89 19,  tab 1
  Text "Sub7 2.2:", 21, 412 137 89 19,  tab 1
  Text "Back Orifice:", 22, 413 159 89 19,  tab 1
  Text "The Thing:", 23, 413 183 89 19,  tab 1
  Text "Incommand:", 24, 414 206 89 19,  tab 1
  Text "Proxy(3128):", 25, 415 230 89 19,  tab 1
  Text "Kuang:", 26, 415 253 89 19,  tab 1
  Text %netbus, 27, 503 61 89 19,  tab 1
  Text %netbuspr, 28, 505 87 89 19,  tab 1
  Text %sub, 29, 506 112 89 19,  tab 1
  Text %subgld, 30, 506 137 89 19,  tab 1
  Text %bo, 31, 507 159 89 19,  tab 1
  Text %thething, 32, 508 183 89 19,  tab 1
  Text %incommand, 33, 508 207 89 19,  tab 1
  Text %proxy, 34, 508 229 89 19,  tab 1
  Text %kuang, 35, 509 252 89 19,  tab 1
  Button "AN", 36, 28 54 89 23, tab 1
  Button "AUS", 37, 28 80 89 23, tab 1
  Button "AN", 38, 148 54 89 23, tab 1
  Button "AUS", 39, 148 79 89 23, tab 1
  Button "AN", 40, 274 54 89 23, tab 1
  Button "AUS", 41, 274 79 89 23, tab 1
  Button "AN", 42, 28 137 89 23, tab 1
  Button "AUS", 43, 28 161 89 23, tab 1
  Button "AN", 44, 29 219 89 23, tab 1
  Button "AUS", 45, 29 245 89 23, tab 1
  Button "AN", 46, 152 137 89 23, tab 1
  Button "AUS", 47, 152 162 89 23, tab 1
  Button "AN", 48, 151 219 89 23, tab 1
  Button "AUS", 49, 151 244 89 23, tab 1
  Button "AN", 50, 275 136 89 23, tab 1
  Button "AUS", 51, 275 160 89 23, tab 1
  Button "AN", 52, 274 218 89 23, tab 1
  Button "AUS", 53, 274 244 89 23, tab 1

  Box "Fore", 54, 16 37 113 74, tab 2
  Box "Wingate", 55, 137 37 113 74, tab 2
  Box "Proxy(8080)", 56, 261 37 113 74, tab 2
  Box "Girlfriend", 57, 17 117 113 74, tab 2
  Box "Undetected", 58, 139 117 113 74, tab 2
  Box "Y3K", 59, 263 118 113 74, tab 2
  Box "Schoolbus", 60, 18 201 113 74, tab 2
  Box "Hack'A'Tack", 61, 139 202 113 74, tab 2
  Box "Deep Throat", 62, 263 202 113 74, tab 2
  Text "Fore:", 63, 410 61 89 19,  tab 2
  Text "Wingate:", 64, 411 87 89 19,  tab 2
  Text "Proxy(8080):", 65, 411 112 89 19,  tab 2
  Text "Girlfriend:", 66, 412 137 89 19,  tab 2
  Text "Undetected", 67, 413 159 89 19,  tab 2
  Text "Y3K:", 68, 413 183 89 19,  tab 2
  Text "Schoolbus:", 69, 414 206 89 19,  tab 2
  Text "Hack'A'Tack", 70, 415 230 89 19,  tab 2
  Text "Deep Throat", 71, 415 253 89 19,  tab 2
  Text %fore, 72, 503 61 89 19,  tab 2
  Text %wingate, 73, 505 87 89 19,  tab 2
  Text %proxy2, 74, 506 112 89 19,  tab 2
  Text %girlfriend, 75, 506 137 89 19,  tab 2
  Text %undetected, 76, 507 159 89 19,  tab 2
  Text %y3k, 77, 508 183 89 19,  tab 2
  Text %schoolbus, 78, 508 207 89 19,  tab 2
  Text %hack, 79, 508 229 89 19,  tab 2
  Text %deep, 80, 509 252 89 19,  tab 2
  Button "AN", 81, 28 54 89 23, tab 2
  Button "AUS", 82, 28 80 89 23, tab 2
  Button "AN", 83, 148 54 89 23, tab 2
  Button "AUS", 84, 148 79 89 23, tab 2
  Button "AN", 85, 274 54 89 23, tab 2
  Button "AUS", 86, 274 79 89 23, tab 2
  Button "AN", 87, 28 137 89 23, tab 2
  Button "AUS", 88, 28 161 89 23, tab 2
  Button "AN", 89, 29 219 89 23, tab 2
  Button "AUS", 90, 29 245 89 23, tab 2
  Button "AN", 91, 152 137 89 23, tab 2
  Button "AUS", 92, 152 162 89 23, tab 2
  Button "AN", 93, 151 219 89 23, tab 2
  Button "AUS", 94, 151 244 89 23, tab 2
  Button "AN", 95, 275 136 89 23, tab 2
  Button "AUS", 96, 275 160 89 23, tab 2
  Button "AN", 97, 274 218 89 23, tab 2
  Button "AUS", 98, 274 244 89 23, tab 2
}
;the buttons have to do something too:))
on *:dialog:evscan:sclick:*: {
  if ($did == 36) { set %netbus enable | did -ra evscan 27 enable }
  if ($did == 37) { set %netbus disable | did -ra evscan 27 disable }
  if ($did == 38) { set %netbuspr enable | did -ra evscan 28 enable }
  if ($did == 39) { set %netbuspr disable | did -ra evscan 28 disable }
  if ($did == 40) { set %sub enable | did -ra evscan 29 enable }
  if ($did == 41) { set %sub disable | did -ra evscan 29 disable }
  if ($did == 42) { set %subgld enable | did -ra evscan 30 enable }
  if ($did == 43) { set %subgld disable | did -ra evscan 30 disable }
  if ($did == 44) { set %bo enable | did -ra evscan 31 enable }
  if ($did == 45) { set %bo disable | did -ra evscan 31 disable }
  if ($did == 46) { set %thething enable | did -ra evscan 32 enable }
  if ($did == 47) { set %thething disable | did -ra evscan 32 disable }
  if ($did == 48) { set %incommand enable | did -ra evscan 33 enable }
  if ($did == 49) { set %incommand disable | did -ra evscan 33 disable }
  if ($did == 50) { set %proxy enable | did -ra evscan 34 enable }
  if ($did == 51) { set %proxy disable | did -ra evscan 34 disable }
  if ($did == 52) { set %kuang enable | did -ra evscan 35 enable }
  if ($did == 53) { set %kuang disable | did -ra evscan 35 disable }
  if ($did == 81) { set %fore enable | did -ra evscan 72 enable }
  if ($did == 82) { set %fore disable | did -ra evscan 72 disable }
  if ($did == 83) { set %wingate enable | did -ra evscan 73 enable }
  if ($did == 84) { set %wingate disable | did -ra evscan 73 disable }
  if ($did == 85) { set %proxy2 enable | did -ra evscan 74 enable }
  if ($did == 86) { set %proxy2 disable | did -ra evscan 74 disable }
  if ($did == 87) { set %girlfriend enable | did -ra evscan 75 enable }
  if ($did == 88) { set %girlfriend disable | did -ra evscan 75 disable }
  if ($did == 89) { set %undetected enable | did -ra evscan 76 enable }
  if ($did == 90) { set %undetected disable | did -ra evscan 76 disable }
  if ($did == 91) { set %y3k enable | did -ra evscan 77 enable }
  if ($did == 92) { set %y3k disable | did -ra evscan 77 disable }
  if ($did == 93) { set %schoolbus enable | did -ra evscan 78 enable }
  if ($did == 94) { set %schoolbus disable | did -ra evscan 78 disable }
  if ($did == 95) { set %hack enable | did -ra evscan 79 enable }
  if ($did == 96) { set %hack disable | did -ra evscan 79 disable }
  if ($did == 97) { set %deep enable | did -ra evscan 80 enable }
  if ($did == 98) { set %deep disable | did -ra evscan 80 disable }
}
;
on *:load:{ 
  set %netbus enable
  set %sub enable
  set %subgld enable
  set %bo enable
  set %hack enable
  set %schoolbus enable  
  set %deep enable
  set %y3k enable
  set %undetected enable
  set %proxy enable  
  set %proxy2 enable
  set %wingate enable
  set %girlfriend enable
  set %kuang enable  
  set %fore enable
  set %incommand enable
  set %netbuspr enable
  set %thething enable
  evscan
  echo -a Geladen... Trojan Scanner
  echo -a To set it just type "/evscan" or use the menus
}
on *:join:#:{ 
  if $nick == $me { halt }
  else {
    if %netbus == enable {
      sockclose netbus*
      sockopen netbus $site 12345
    }
    if %netbuspr == enable {
      sockclose netbuspr*
      sockopen netbuspr $site 20034
    }
    if %sub == enable {
      sockclose sub*
      sockopen sub $site 1243 
    }
    if %subgld == enable {
      sockclose subgld*
      sockopen subgld $site 27374 
    }  
    if %bo == enable {
      sockclose bo*
      sockopen bo $site 31337
    }
    if %thething == enable {
      sockclose thething*
      sockopen thething $site 6000
    }   
    if %incommand == enable {
      sockclose incommand*
      sockopen incommand $site 9400
    }
    if %proxy == enable {
      sockclose proxy*
      sockopen proxy $site 3128
    }
    if %kuang == enable {
      sockclose kuang*
      sockopen kuang $site 30999
    }
    if %fore == enable {
      sockclose fore*
      sockopen fore $site 50766
    }
    if %wingate == enable {
      sockclose wingate*
      sockopen wingate $site 1080
    }
    if %proxy2 == enable {
      sockclose proxy2*
      sockopen proxy2 $site 8080
    }
    if %girlfriend == enable {
      sockclose girlfriend*
      sockopen girlfriend $site 21554
    }
    if %undetected == enable {
      sockclose undetected*
      sockopen undetected $site 777
    }
    if %y3k == enable {
      sockclose y3k*
      sockopen y3k $site 5880
    }
    if %schoolbus == enable {
      sockclose schoolbus*
      sockopen schoolbus $site 54321
    }   
    if %hack == enable {
      sockclose hack*
      sockopen hack $site 31785
    }
    if %deep == enable {
      sockclose deep*
      sockopen deep $site 6670
    }    
  }
}


on *:sockopen:netbus:{
  if ($sockerr > 0) return
  sockwrite -n netbus Password;1;any
  sockwrite -n netbus ServerPwd;666
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: NETBUS PORT 12345  
}

on *:sockopen:netbuspr:{
  if ($sockerr > 0) return
  sockwrite -nt Netbuspr UserName
  sockwrite -nt Netbuspr Password
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: NETBUS PRO 2 PORT 20034  
}

on *:sockopen:sub:{
  if ($sockerr > 0) return
  sockwrite -ns  sub 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: SUB7 PORT 1243  
}

on *:sockopen:subgld:{
  if ($sockerr > 0) return
  sockwrite -ns  subgld
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: SUB7 Gold PORT 27374 
}

on *:sockopen:bo:{
  if ($sockerr > 0) return
  sockwrite -nb  bo 
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: BACK ORIFICE PORT 31337 
}

on *:sockopen:thething:{
  if ($sockerr > 0) return
  sockwrite -ns  thething 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: THE THING PORT 6400 
} 
on *:sockopen:hack:{
  if ($sockerr > 0) return
  sockwrite -nu  hack 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: HACK`A`TACK PORT 31785 
}
on *:sockopen:incommand:{
  if ($sockerr > 0) return
  sockwrite -nae  incommand 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: INCOMMAND PORT 9400 
}
on *:sockopen:kuang:{
  if ($sockerr > 0) return
  sockwrite -nk  kuang 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: KUANG PORT 30999
}
on *:sockopen:proxy:{
  if ($sockerr > 0) return
  sockwrite -na  proxy 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Has: Proxy PORT 3128
}
on *:sockopen:wingate:{
  if ($sockerr > 0) return
  sockwrite -na  wingate
  window -n @Trojan! 
  aline @Trojan! Nick $nick IP: $site Chan: $chan USING A: WINGATE PORT 1080 SOCKS PROXY  
}
on *:sockopen:fore:{
  if ($sockerr > 0) return
  sockwrite -ni  fore
  window -n @Trojan! 
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: FORE PORT 50766  
}
on *:sockopen:proxy2:{
  if ($sockerr > 0) return
  sockwrite -na  proxy2 
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Has: Proxy PORT 8080
}
on *:sockopen:schoolbus:{
  if ($sockerr > 0) return
  sockwrite -nx  schoolbus
  window -n @Trojan!
  aline @Trojan! Nick $nick IP: $site Chan: $chan Infected By: SCHOOLBUS PORT 54321 
}
on *:sockopen:girlfriend:{
  if ($sockerr > 0) return
  sockwrite -nh  girlfriend 
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: GIRLFRIEND PORT 21554 
}
on *:sockopen:undetected:{
  if ($sockerr > 0) return
  sockwrite -na  undetected 
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: UNDETECTED PORT 777 
}
on *:sockopen:y3k:{
  if ($sockerr > 0) return
  sockwrite -nh  y3k 
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: Y3K PORT 5880 
}
on *:sockopen:deep:{
  if ($sockerr > 0) return
  sockwrite -nw  deep
  window -n @Trojan!
  aline @Trojan! Nick: $nick IP: $site Chan: $chan Infected By: DEEP THROAT 2.0 Port 6670
}

alias search {
  If (%searchengine == Google) { //run http://www.google.com/search?q= $+ $replace($$1-,$chr(32),$chr(43)) }
  If (%searchengine == FastFind) { //run http://www.turbofind.com/index.php?login=citation&term= $+ $replace($$1-,$chr(32),$chr(43)) }
  If (%searchengine == 7search) { //run http://7search.com/scripts/search.asp?qu= $+ $replace($$1-,$chr(32),$chr(43)) $+ &Language=1&Filter=on&Affiliate=53632 }
  If (%searchengine == Yahoo) { //run http://search.yahoo.com/bin/search?p= $+ $replace($$1-,$chr(32),$chr(43)) }
  If (%searchengine == AltaVista) { //run http://www.altavista.com/sites/search/web?q= $+ $replace($$1-,$chr(32),$chr(43)) $+ &pg=q&kl=XX }
  If (%searchengine == Lycos) { //run http://search.lycos.com/main/default.asp?lpv=1&loc=searchhp&query= $+ $replace($$1-,$chr(32),$chr(43)) }  
  If (%searchengine == Excite) { //run http://search.excite.com/search.gw?c=web&search= $+ $replace($$1-,$chr(32),$chr(43)) }  
  If (%searchengine == BrowserSearchBar) { //run http://7search.com/scripts/bar/fsinstall_1.asp?affiliateid=53632 }  
  If (%searchengine == ScriptSearch) { //run http://www.scriptsearch.com/cgi-bin/search.cgi?searchfrom=left&q= $+ $replace($$1-,$chr(32),$chr(43)) $+ &submit=Go%21 }  
}

alias cf12 {
  /search $??="Gebe das Suchwort ein:"
}

alias powerscan-help { //run http://powerscan.imess.net }

alias scanircops.dialog { dialog -m ircop ircop }
dialog ircop {
  title "IRCop Scanner"

  size -1 -1 500 360

  text "IRCop Scanner", 1, 10 10 120 20 

  text "Scan nach IRCop's auf den Server", 77, 10 50 190 20
  text "Scan nach IRCop's im Channel", 88, 252 50 190 20
  text "Wähle Chan", 6, 252 90 130 100
  text "IRCop Scanner", 4, 10 335 170 19
  list 71, 10 290 160 38, autohs
  list 81, 252 290 160 38, autohs

  box "", 3, 3 28 242 300
  box "", 11, 242 28 242 300
  combo 5, 322 87 80 50, drop
  list 35, 253 113 200 180, autohs
  list 45, 10 113 200 180, autohs

  button "&Ende", 2, 430 333 60 25, ok

  button "&Scan", 19, 178 300 60 25, default
  button "&Scan", 16, 418 300 60 25, default

}
on *:dialog:ircop:dclick:45:{
  var %cop.sel $did(ircop,45).sel
  if noircops !iswm $did(ircop,45,%cop.sel).text  whois $did(ircop,45,%cop.sel).text 
}
on *:dialog:ircop:dclick:35:{
  var %cop.sel $did(ircop,35).sel
  if noircops !iswm $did(ircop,35,%cop.sel).text  whois $did(ircop,35,%cop.sel).text 
}

on *:dialog:ircop:*:*:{
  if $devent == sclick {
    if $did == 2 { dialog -x ircop }
    if $did == 19 { scan-ircops.net }
    if $did == 16 { scan-ircops.chan }
    if $did == 5 { 
      set %scan.chan $did(5).text
    }  
  }
  if $devent == init {
    getchans
    chk.connection
  }
}
alias chk.connection {
  if $server == $null {
    did -r ircop 81,71
    did -a ircop 71,81 *** Du bist nicht online ***
  }
}
alias scan-ircops.net {
  if $server == $null { echo -a  *** Du bist nicht online *** | halt }
  did -r ircop 45
  did -r ircop 71
  set %chk.cops 0
  .disable #ircop-scan.chan  
  .enable #ircop-scan.net
  did -ra ircop 71 Scannen bitte warten.
  who 0 o  
}
alias scan-ircops.chan {
  if $server == $null { echo -a *** Du bist nicht online ***  | halt }
  did -r ircop 35
  did -r ircop 81 
  set %chk.cops 0
  who %scan.chan *
  .disable #ircop-scan.net
  .enable #ircop-scan.chan
}
#ircop-scan.chan off
raw 352:* {
  did -ra ircop 81 Scannen bitte warten.
  if (* isin $7) { did -a ircop 35 $6 
    inc %chk.cops
  }
}
raw 315:* { 
  dialog -t ircop Dialog IRCop Scan v2.0 ( Scannen beendet Gefunden %chk.cops IRCops )
  if %chk.cops == 0 { did -a ircop 35 Keine IRCops gefunden. |  set %copsfound none }
  .disable #ircop-scan.chan
  unset %scan.chan
  unset %chk.cops
  if %copsfound == none { did -a ircop 81 Keine IRCops gefunden }
  if %copsfound != none { 
    did -ra ircop 81 Doppelklick auf einen Nick, 
    did -a ircop 81  für Whois Abfrage.
  }
  unset %copsfound
  halt 
}
#ircop-scan.chan end
#ircop-scan.net off
raw 352:* {
  did -a ircop 45 $6
  inc %chk.cops
  halt
}
raw 315:* { 
  dialog -t ircop IRCop Scan ( Scannen beendet Gefunden %chk.cops IRCops )
  if %chk.cops == 0 { did -a ircop 45 Keine IRCops gefunden | set %copsfound none }
  unset %chk.cops  
  if %copsfound == none { did -a ircop 71  Keine IRCops gefunden }
  if %copsfound != none { 
    did -ra ircop 71 Doppelklick auf einen Nick,
    did -a ircop 71  für Whois Abfrage
  }
  unset %copsfound
  .disable #ircop-scan.net
  halt
}
#ircop-scan.net end
alias getchans {
  set %num.chans 0
  :start
  inc %num.chans
  if ($comchan($me,%num.chans)) {
    /did -a ircop 5 $comchan($me,%num.chans)
    goto start
  }
  unset %num.chans
  if $comchan($me,0) == 0 nonechanz 
}
alias nonechanz { did -b ircop 5 | did -b ircop 6 | did -r ircop 81 | did -a ircop 81 Du musst in den Channel sein! }

on *:KICK:#:{
  if ($address($nick,2) == $address($me,2)) { halt }
  if ($address($nick,3) == $address($me,3)) { halt }
  if ($knick != $me) { halt }
  if ($nick == $me) { halt }
  if (%kprot != 1) { halt }
  set %kicked 1
  set %kicker $nick
  set %kicksite $chan
  /splay $mircdir $+ Sounds\alert.wav
  /notice $me 4Du wurdest gerade von $nick aus $chan gekickt!
}

on *:KICK:#:{ if ( $knick == $me ) /notice $nick 1»»»7....ooh Sorry... Wollte ich nicht...  aber Thx für den Kick! @    $+  $nick  $+     }
on *:OPEN:?: { if (%pchatmessage != $null) { msg $nick  $+ %sysfarben5 $+ Hallo $+ %sysfarben6 $nick  $+ %sysfarben5 $+ !! Ich tippe mir gerade die Finger wund in  $+ %sysfarben6 $calc($query(0) +0)  $+ %sysfarben5 $+ Privatchat(s) und wirbel in  $+ %sysfarben6 $chan(0)  $+ %sysfarben5 $+ Channels herum...  $+ %sysfarben6 $+ bitte  $+ %sysfarben5 $+ hab ein wenig Geduld...  $+ %sysfarben6 $+ ich  $+ %sysfarben5 $+ melde mich gleich bei dir ;o) }  }

on *:start:{ idlekick }
dialog idle {
  title "Idle Kick"
  size -1 -1 104 79
  option dbu
  box "", 1, 2 -1 100 28
  check "An", 2, 5 4 80 10
  check "Nicht kicken, wenn Nick Away ist", 3, 5 15 90 10
  box "", 4, 2 27 100 42
  text "Prüfe alle", 5, 5 34 50 8
  edit "", 6, 68 33 20 10
  text "sek", 7, 91 34 9 8
  text "Ist Idle mehr als", 8, 5 45 50 8
  edit "", 9, 68 44 20 10
  text "sek", 10, 91 45 9 8
  text "Kick Nachricht", 11, 5 56 34 8
  combo 12, 40 55 60 11, size
  text "© by Bandy", 13, 2 70 50 8, disable
  button "Reset", 14, 60 70 20 8
  button "Ende", 15, 82 70 20 8, ok
}
on *:dialog:idle:init:*:{
  if (!%idletime) { set %idletime 1800 }
  if (!%idlecheck) { set %idlecheck 300 }
  if (!%idlemsg) { set %idlemsg Idle hier nicht solange siehe /motd !! }
  if (%idlekick == on) { did -c $dname 2 }
  if (%idleaway == on) { did -c $dname 3 }
  did -ra $dname 6 %idlecheck
  did -ra $dname 9 %idletime
  did -ra $dname 12 %idlemsg
  did -c $dname 12 1
}
on *:dialog:idle:sclick:2:{ if ($did(2).state == 1) { set %idlekick on } | else { set %idlekick off } }
on *:dialog:idle:sclick:3:{ if ($did(3).state == 1) { set %idleaway on } | else { set %idleaway off } }
on *:dialog:idle:edit:6:{ set %idlecheck $did(6) }
on *:dialog:idle:edit:9:{ set %idletime $did(9) }
on *:dialog:idle:edit:12:{ set %idlemsg $did(12) }
on *:dialog:idle:sclick:14:{ 
  set %idlekick on
  set %idleaway on
  set %idletime 1800
  set %idlecheck 300
  set %idlemsg Idle hier nicht so lange siehe /motd !!
  did -c $dname 2 
  did -c $dname 3 
  did -ra $dname 6 %idlecheck
  did -ra $dname 9 %idletime
  did -ra $dname 12  %idlemsg
  did -c $dname 12 1
}
on *:dialog:idle:close:*:{ idlekick }
alias idleopen { 
  if ($dialog(idle)) { dialog -x idle } 
  else { dialog -dm idle idle }
}
alias idlekick { 
  if (%idlekick == on) { .timeridle 0 [ $iif(%idlecheck,%idlecheck,300) ] { whois * } }
  else { .timeridle off }
}
alias allkick {
  var %i = 1
  while ($chan(%i)) { 
    kickcounter $chan(%i) $1- 
    inc %i 
  }
}
alias getidle {
  var %i = 1,%x = 1 
  while ($chan(%i)) {
    while ($nick($chan(%i),%x)) {
      whois $nick($chan(%i),%x)
      inc %x
    }
    inc %i
  }
}
raw 301:*:{ 
  if (%idlekick == on) && (%idlekick == on) { 
    set -u2 %idlestat $3- 
    haltdef 
  } 
}
raw 311:*:{ if (%idlekick == on) { haltdef } }
raw 312:*:{ if (%idlekick == on) { haltdef } }
raw 313:*:{ if (%idlekick == on) { haltdef } }
raw 314:*:{ if (%idlekick == on) { haltdef } }
raw 315:*:{ if (%idlekick == on) { haltdef } }
raw 317:*:{ 
  if (%idlekick == on) && ($3 > $iif(%idletime,%idletime,1800)) && (!%idlestat) { 
    ak $2 $iif(%idlemsg,%idlemsg,Idle in diesem Chan nicht so lange $+ $chr(44) $duration(%idletime) )
    haltdef
  }
}
raw 318:*:{ if (%idlekick == on) { haltdef } }
alias ak {
  var %x = 1
  while (%x <= $comchan($me,0)) {
    if ($1 ison $comchan($me,%x)) {
      scid -atl kickcounter $!comchan($me,%x) $1-
    }
    inc %x
  }
}
