botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 11-02-2005, 11:10   #1 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 38
lsn will become famous soon enough
Exclamation bot link unlink

vreau sa fac urmatorul cod sa functioneze:
Code:
 set home "#chan"
 
bind link - * bot:link
bind disc - * bot:disc
 
proc bot:link {botname via} {
global home
puthelp "PRIVMSG $home : $botname just joined the botnet"
return "..."
}
proc bot:disc {botname} {
global home
puthelp "PRIVMSG $home : $botname just disconnected the botnet"
return "..."
}
asa cum e acuma merge dar la un link de n nr de boti el imi zice pe fiecare intr-o noua linie, eu vreau doar sa ii enumere pe toti intr-o singura linie ca e flood pe canal altfel

se poate face cumva asa ceva ?
lsn is offline   Reply With Quote
Old 11-02-2005, 21:52   #2 (permalink)
Member
 
Kurupt's Avatar
 
Join Date: Jun 2004
Location: Hermannstadt
Age: 24
Posts: 108
Rep Power: 36
Kurupt will become famous soon enough
Send a message via Yahoo to Kurupt
Default .

destul de simplu
faci un flood prot de ex daca mai multe linkuri/delinkuri decat nr sa faca un list unde sa ii puna pe toti si dupa sa dea notice.. daca nu te descurci o sa dau si cod da cred ca vrei sa faci u nu?
__________________
Owner of #ro-tcl
Kurupt is offline   Reply With Quote
Old 14-02-2005, 14:19   #3 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 38
lsn will become famous soon enough
Default

yep as vrea sa il fac eu dar chiar nu am nici o idee ....
lsn is offline   Reply With Quote
Old 16-02-2005, 13:21   #4 (permalink)
Administrator

aka aqwzsx
 
Join Date: Jun 2004
Posts: 827
Blog Entries: 126
Rep Power: 3
UniversaliA is on a distinguished road
Default

Simplu, faci un bind care sa fie executat fiecare minuta, daca in aceasta minuta sau conectat/deconectat boti - el spune pe $home, in caz contrariu tace

Code:
bind time - "* * * * *"	01:minutes
proc 01:minutes {min hour day month year} {
global home botnet
if { [llength $botnet(linked)]} {puthelp "PRIVMSG $home : $botnet(linked) joined the botnet"; set botnet(linked) ""}
if { [llength $botnet(unlinked)]} {puthelp "PRIVMSG $home : $botnet(unlinked) disconnected the botnet"; set botnet(unlinked) ""}
} 
 
 
if {![info exists set botnet(linked)]} {set botnet(linked) ""}
if {![info exists set botnet(unlinked)]} {set botnet(unlinked) ""}
Daca preferi genul acesta de cod atunci putin va trebui sa skimbi procesele tale, de exemplu cam asa

Code:
proc bot:link {botname via} {
global botnet
lappend botnet(linked) $botname 
}
proc bot:disc {botname} {
global botnet
lappend botnet(unlinked) $botname 
}
Cam asa, destul de simplist. S-ar putea si altfel, in botnet`uri mici si stabile, unde botii nu se deconecteaza/conecteaza asa de des. In acest caz, nu are sens sa verifici fiecare minuta. La fiecare link unlink, tu ai putea sa declansezi un timer de 60 secunde, daca in aceste 60 secunde cienva mai intra sau iese din botnet, el automat va fi adaugat la lista timer`ului de 60 secunde. Dupa 60 secunde, timer`ul va spune pe toti care au intrat sau iesit din botnet. Si pina la urmatorul link/unlink, botul nu mai face nici o verificare in plus. E simplu script, dar te las pe tine sa faci :P. In orice caz, ca exemplu poti lua a&a light in comenzile la X, el lucreaza dupa principiul care eu am descris.
UniversaliA is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
!link ccameleon Tcl scripting 1 20-01-2007 08:30
problema de link lsn Eggdrop 6 11-01-2005 01:10
Link Erised Eggdrop 3 14-06-2004 12:13


All times are GMT +3. The time now is 07:08.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.