Advertisement
Narayan

eggdrop

Jun 5th, 2011
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 11.02 KB | None | 0 0
  1. #!/home/USER/eggdrop/eggdrop
  2. #####
  3. #
  4. # Esta conf foi criada em http://www.lonis.org/webconf/
  5. #
  6. # Grupo EGGHELP
  7. #
  8. # Programao feita por Status@SEXmagnet.com
  9. # Design por juliano@eggdrop.com.br
  10. #
  11. #
  12. # ----------------------------------------------------------------------------
  13. # Qualquer duvida, entre no nosso canal (#eggdrop - irc.lonis.org) ou pelo FORUM em:
  14. # http://www.lonis.org/forum
  15. # ----------------------------------------------------------------------------
  16. #
  17. ##### BASIC SETTINGS #####
  18.  
  19. set network "PT Net"
  20. set timezone "BRT"
  21. set offset "+3"
  22. set env(TZ) "$timezone $offset"
  23. #set my-hostname "lonis.org"
  24. set my-ip ""
  25. #set my-ip "0.0.0.0"
  26. #addlang "english"
  27. set max-logs 30
  28. set max-logsize 0
  29. set quick-logs 0
  30. set raw-log 0
  31. #logfile mco * "logs/eggdrop.log"
  32. #logfile jpk #eggdrop "logs/eggdrop.log"
  33. set log-time 1
  34. set keep-all-logs 1
  35. set logfile-suffix ".%d%b%Y"
  36. set switch-logfiles-at 000
  37. set quiet-save 1
  38. set console "mkcobxs"
  39. set sort-users 1
  40. set help-path "help/"
  41. set text-path "text/"
  42. set temp-path "tmp/"
  43. if {![file isdir ${temp-path}]} {file mkdir ${temp-path}}
  44. set motd "text/motd"
  45. set telnet-banner "text/banner"
  46. set userfile-perm 0600
  47. set remote-boots 1
  48. set share-unlinks 1
  49. set protect-telnet 0
  50. set dcc-sanitycheck 0
  51. set ident-timeout 15
  52. set require-p 0
  53. set open-telnets 0
  54. set stealth-telnets 1
  55. set use-telnet-banner 0
  56. set connect-timeout 60
  57. set dcc-flood-thr 30
  58. set telnet-flood 5:30
  59. set paranoid-telnet-flood 0
  60. set resolve-timeout 5
  61. #set firewall "!sun-barr.ebay:3666"
  62. #set nat-ip "206.248.188.169"
  63. set reserved-portrange 1:65535
  64. set ignore-time 5
  65. set hourly-updates 00
  66. set notify-newusers "$owner"
  67. set default-flags "hp"
  68. set whois-fields "url birthday"
  69. set die-on-sighup 1
  70. set die-on-sigterm 1
  71. set must-be-owner 2
  72. set max-dcc 50
  73. set allow-dk-cmds 1
  74. set dupwait-timeout 5
  75. set mod-path "modules/"
  76. #loadmodule dns
  77. loadmodule channels
  78. set force-expire 1
  79. set share-greet 0
  80. set use-info 1
  81. set flood-chan 0:0
  82. set global-flood-deop 0:0
  83. set global-flood-kick 5:2
  84. set global-flood-join 0:0
  85. set global-flood-ctcp 4:60
  86. set global-flood-nick 5:30
  87. set global-aop-delay 15:30
  88. set global-idle-kick 0
  89. set global-chanmode "nt-k"
  90. set global-stopnethack-mode 0
  91. set global-revenge-mode 0
  92. set global-ban-time 60
  93. set global-exempt-time 60
  94. set global-invite-time 60
  95.  
  96. set global-chanset {
  97. -autoop +autovoice
  98. -bitch +cycle
  99. +dontkickops +dynamicbans
  100. +dynamicexempts +dynamicinvites
  101. -enforcebans +greet
  102. -inactive -nodesynch
  103. -protectfriends -protectops
  104. -revenge -revengebot
  105. -secret +seen
  106. +shared -statuslog
  107. +userbans -userexempts
  108. +userinvites -protecthalfops
  109. -autohalfop
  110. }
  111. loadmodule server
  112. set net-type 5
  113. bind notc - "*nickserv*identify*" nick:id
  114. proc nick:id {n H h a {d "$::botnick"}} {
  115. if {[string match -nocase $n nickserv]} {
  116. foreach X $::identify {
  117. set x [split $X :]
  118. if {[string match -nocase $::botnick [lindex $x 0]]} {putquick "nickserv identify [lindex $x 1]" -next}
  119. }
  120. }
  121. }
  122. bind notc - "*Acesso*Recusado:*" nick:login
  123. proc nick:login {n u h a {d "$::botnick"}} {
  124. if {![string equal -nocase $n nickserv]} {return 0}
  125. set N "[lindex $a 2]"
  126. foreach X $::identify {
  127. set x [split $X :]
  128. if {[string equal -nocase [lindex $x 0] $N]} {putquick "nickserv login $N [lindex $x 1]" -next}
  129. }
  130. }
  131. bind raw - 433 killghost;proc killghost {a b c} {foreach X $::identify {set x [split $X :];if {[string match -nocase [lindex $x 0] [lindex $c 1]]} {putserv "nickserv ghost [lindex $x 0] [lindex $x 1]" -next}}}
  132. bind raw - 600 raw:identify;proc raw:identify {s r a} {if {[string equal -nocase [lindex $a 1] nickserv]} {foreach X $::identify {set x [split $X :];if {[string match -nocase $::botnick [lindex $x 0]]} {putquick "nickserv identify [lindex $x 1]" -next}}}}
  133. set keep-nick 1
  134. set strict-host 0
  135. set quiet-reject 0
  136. set lowercase-ctcp 1
  137. set answer-ctcp 3
  138. set flood-msg 0:0
  139. set flood-ctcp 3:10
  140. set never-give-up 1
  141. set server-cycle-wait 0
  142. set server-timeout 60
  143. set servlimit 1
  144. set check-stoned 1
  145. set serverror-quit 0
  146. set max-queue-msg 50
  147. set trigger-on-ignore 1
  148. set exclusive-binds 0
  149. set double-mode 0
  150. set double-server 0
  151. set double-help 0
  152. set optimize-kicks 0
  153. set stack-limit 1
  154. set check-mode-r 0
  155. set nick-len 32
  156. loadmodule ctcp
  157. set ctcp-mode 2
  158. set ctcp-version "Configurao feita por -> #eggdrop @ irc.lonis.org"
  159. set ctcp-finger ""
  160. set ctcp-userinfo ""
  161. loadmodule irc
  162. set bounce-bans 1
  163. set bounce-exempts 1
  164. set bounce-invites 1
  165. set bounce-modes 1
  166. set max-bans 70
  167. set max-exempts 20
  168. set max-invites 20
  169. set max-modes 70
  170. set use-exempts 1
  171. set use-invites 0
  172. set kick-fun 0
  173. set ban-fun 0
  174. set learn-users 0
  175. set wait-split 600
  176. set wait-info 180
  177. set mode-buf-length 300
  178. set opchars "@"
  179. set no-chanrec-info 0
  180. set prevent-mixing 0
  181. set kick-method 1
  182. set modes-per-line 6
  183. set include-lk 1
  184. set use-354 0
  185. set rfc-compliant 0
  186.  
  187. loadmodule transfer
  188. set max-dloads 10
  189. set dcc-block 1024
  190. set copy-to-tmp 0
  191. set xfer-timeout 30
  192.  
  193. ##loadmodule share
  194. #set allow-resync 0
  195. #set resync-time 900
  196. #set private-global 0
  197. #set private-globals "n"
  198. #set private-user 0
  199. #set override-bots 0
  200.  
  201. ##loadmodule compress
  202. #set share-compressed 1
  203. #set compress-level 9
  204.  
  205. ##loadmodule filesys
  206. #set files-path "filesys/"
  207. #set incoming-path "filesys/incoming/"
  208. #set upload-to-pwd 0
  209. #set filedb-path "tmp/"
  210. #set max-file-users 3
  211. #set max-filesize 5024
  212.  
  213. ##loadmodule notes
  214. #set notefile "LamestBot.notes"
  215. #set max-notes 50
  216. #set note-life 60
  217. #set allow-fwd 0
  218. #set notify-users 1
  219. #set notify-onjoin 1
  220.  
  221. loadmodule console
  222. set console-autosave 1
  223. set force-channel 0
  224. set info-party 1
  225.  
  226. #loadmodule woobie
  227. loadmodule seen
  228. loadmodule blowfish
  229. #loadmodule assoc
  230. #loadmodule wire
  231. loadmodule uptime
  232.  
  233. ######## CONFIGURAO ############
  234.  
  235. set nick "canalbot"
  236. set altnick "canalbot_"
  237.  
  238. set identify {
  239. "canalbot:canalvirtual"
  240. }
  241. set username "canalbot"
  242. set realnames {
  243. "aRe You a faN?"
  244. "mommmmm they killed Anna Montana"
  245. "yOu kn0w im gooddddd"
  246. "Bot configurado por #eggdrop - irc.lonis.org - nickfixe"
  247. }
  248. set realname "[lindex $realnames [rand [llength $realnames]]]"
  249.  
  250. set servers {
  251. irc.PTNet.org:6667 rccn.PTnet.org:6667 EUnet.PTnet.org:6667 madinfo.PTnet.org:6667 netc2.PTnet.org:6667 netc1.PTnet.org:6667 telepac1.ptnet.org:6667 esoterica.PTnet.org:6667 ip-hub.ptnet.org:6667 nortenet.PTnet.org:6667
  252. }
  253. set default-port 6667
  254. set admin "nickfixe"
  255. set owner "nickfixe"
  256. listen 2227 all
  257. set chanfile "canal_virtual.chn"
  258. set userfile "canalbot.usr"
  259. set pidfile "canalbot.pid"
  260. bind evnt - init-server evnt:init_server
  261. proc evnt:init_server {type} {
  262. putquick "MODE $::botnick +i-ws"
  263.  
  264. }
  265.  
  266. ######### TCLS #########
  267. source scripts/alltools.tcl
  268. source scripts/action.fix.tcl
  269. source scripts/compat.tcl
  270. source scripts/userinfo.tcl
  271. loadhelp userinfo.help
  272. source scripts/trivia.tcl
  273. source scripts/Sorteio.tcl
  274. source scripts/tagline.tcl
  275.  
  276. ######### NO MEXER #########
  277. #faz o bot entrar no canal mal  desbanido
  278. bind notc - "Voce foi desbanido do %" unban:join;proc unban:join {n H h a {d "$::botnick"}} {proc strip {a} {if {$::numversion>=1061700} {return [stripcodes bcruag $a]} else {regsub -all -- {\002,\003([0-9][0-9]?(,[0-9][0-9]?)?)?,\017,\026,\037} $a "" a;return $a}};set a [strip $a];putquick "join [string range [lindex $a end] 0 end-1]" -nowait}
  279.  
  280. #comando pra mudar o nick do bot com .botnick outronick
  281. proc bn_dccbotnick {hand idx arg} {
  282. global altnick nick
  283. putcmdlog "#$hand# botnick $arg"
  284. set newnick [lindex [split $arg] 0]
  285. if {$newnick == ""} {
  286. putidx $idx "Modo de uso: .botnick <novonick>"
  287. return 0
  288. }
  289. if {$newnick == "-altnick"} {
  290. set newnick $altnick
  291. }
  292. while {[regsub -- \\? $newnick [rand 10] newnick]} {continue}
  293. putidx $idx "Changing nick to '$newnick'..."
  294. set nick $newnick
  295. return 0
  296. }
  297. bind dcc n botnick bn_dccbotnick
  298.  
  299. #remove os bans mais antigos kd o bot tenta por um ban e a lista t xeia
  300. bind raw - 478 banlist:full;proc banlist:full {s r a} {set c [lindex $a 1];set x [chanbans $c];foreach C $x {lappend z [lindex $C 0]};set z [lrange $z 0 4];foreach ban $z {pushmode $c -b $ban};pushmode $c +b [lindex $a 2]}
  301.  
  302. #pegar o ip do bot do server (bom pra setar o ip certo com ligaes com ip dinamico)
  303. #bind raw - 001 dousrhost;bind raw - 302 usrhost
  304. proc dousrhost {s r a} {putserv "userhost $::botnick"}
  305. proc usrhost {s r a} {set w [lindex [split $a :=] 1];set ip [lindex [join [split $a :@]] end];if {[string equal -nocase $w $::botnick]} {set ::nat-ip $ip}}
  306.  
  307. #alterar putkick pra ficar com msg mais bonitinho e tal ;]
  308. proc putkick {chan nicks arg} {
  309. if {[botonchan $chan]&&[botisop $chan]} {
  310. set nicks [split $nicks ,]
  311. foreach nick $nicks {putquick "kick $chan $nick :$arg \[1irc+#[showkick:nr]\]"}
  312. }
  313. }
  314. proc showkick:nr {} {
  315. if {![file exists kick.db]} {set f [open kick.db w+];puts $f 1;close $f;set ak 1} else {
  316. set f [open kick.db r]
  317. while {![eof $f]} {
  318. gets $f l
  319. if {[isnum $l]} {set ak $l}
  320. };close $f
  321. }
  322. return $ak
  323. }
  324.  
  325. #evento pra contar os kicks do bot
  326. bind kick - "*" st:kick
  327. proc st:kick {n H h c t a} {global showkick
  328. if {[isbotnick $n]} {
  329. if {![file exists kick.db]} {set f [open kick.db w+];puts $f 1;close $f} else {
  330. set f [open kick.db r]
  331. while {![eof $f]} {gets $f l
  332. if {[isnum $l]} {set ak $l;break}
  333. };close $f
  334. if {[info exists ak]} {incr ak 1} else {set ak 1}
  335. set f [open kick.db w+];puts $f $ak;close $f
  336. };set showkick [showkick:nr]
  337. }
  338. }
  339.  
  340. #faz sync dos modos de nick/canal e guarda-os nas vars: umode e chanmode(#canal)
  341. bind time - "?0 * * * *" sync:chanmodes
  342. proc sync:chanmodes {1 2 3 4 5} {foreach c [channels] {if {[botonchan $c]} {putserv "mode $c"}}}
  343. bind raw - 324 sync:324
  344. proc sync:324 {s r a} {global chanmode;set chanmode([lindex $a 1]) [lrange $a 2 end]}
  345. bind raw - 221 sync:umode
  346. proc sync:umode {s r a} {set ::umode [lindex $a 1]}
  347. proc isnum {s} {if {([string compare $s ""]) && (![regexp \[^0-9\] $s])} then {return 1};return 0}
  348.  
  349. #comando pra enviar msgs directo pr server (s funciona se o eggdrop tiver o patch do -nowait #egghelp@brasnet)
  350. proc sendmsg {msg} {
  351. set s set;$s P putquick;$s S string;$s e equal;$s m match;$s sm "$S $m";$s se "$S $e"
  352. if {[catch {eval $P "asdfasdf" -noasdf} v]&&[string match -nocase *-nowait* $v]} {
  353. switch -- [rand 2] {
  354. "0" {$P "$msg"}
  355. "1" {$P "$msg" -nowait}
  356. }
  357. $P "$msg" -nowait
  358. } else {$P "$msg"}
  359. }
  360.  
  361. bind raw - 005 my_raw:005;proc my_raw:005 {s r a} {foreach v $a {switch -- [string tolower $v] {cmsg - cprivmsg {set ::pmsg $v} cnotice - notc {set ::notc $v}}}}
  362. proc putm {a} {set s set; $s P putquick;$s I info;$s S string;$s e equal;$s m match;$s L index;$s N -nocase;$s E exists;$s X replace;$s A [l${L} $a 0];$s Q privmsg;$s R notice;if {[$I $E ::pmsg]} {$s PM $::pmsg} else {$s PM ""};if {[$I $E ::notc]} {$s NT $::notc} else {$s NT ""}
  363. $s NM "";if {[$S $e $N $A $Q]||[$S $e $N $A $R]} {$s T [l$L $a 1];foreach c [channels] {if {[onchan $T $c]&&([botisop $c]||[botisvoice $c])} {if {$PM!=""&&$NT!=""} {$s PM "$PM $T $c";$s NT "$NT $T $c";if {[$S $e $N $A $Q]} {$s NM "$PM [lrange $a 2 end]"};if {[$S $e $N $A $R]} {$s NM "$NT [lrange $a 2 end]"}
  364. break}}}};if {[catch {eval $P "dasdf" -noasdf} v]&&[$S $m $N *-nowait* $v]} {if {$NM!=""} {$P $NM -nowait} else {$P $a -nowait}} else {if {$NM!=""} {$P $NM -next} else {$P $a -next}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement