egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Configuring :/

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
TEK7
Voice


Joined: 10 Apr 2010
Posts: 10

PostPosted: Thu Aug 25, 2011 9:04 am    Post subject: Configuring :/ Reply with quote

I can't configure this tcl, please help me.
What i put in that variables?

Code:
set service(name) "Eggdrop.Virtualife.com.br"
set service(serveur) "127.0.0.1"
set service(port) "6667"
set service(pass) "senha"
set service(info) "BadChan Procurando"
set service(chan) "#canal"
set service(version) "1.2"
set service(debug) "0"
set service(nick) "nick-do-bot"

bind dcc X +badchan pbc:dcc
proc pbc:dcc {nick idx arg} {
global service botnick
set fichier [open badchan.txt a]
set addchan [lindex [string tolower $arg] 0]
if {$addchan==""} {
putdcc $idx "\002Erreur!\002 Vous devez spécifier un salon à ajouter à la liste!"
return 0
}
if {[isin $arg $fichier]=="1"} {
putdcc $idx "Le Salon\002 $addchan \002est déjà dans la liste des BadChan."
return 0
}
puts $fichier "$addchan"
close $fichier
putdcc $idx "Le Salon\002 $addchan \002a été ajouté à la liste des BadChan"
return 0
}

proc isin {text file} {
catch {open badchan.txt r} db
set found -1
while {![eof $db]} {
gets $db y
if {"$y"=="$text"} {
set found 1
break
}
}
catch {close $db}
return $found
}

proc delchr {text} {
set z {}
catch {open badchan.txt r} dat
while {![eof $dat]} {
set stdin [string tolower [gets $dat]]
if {$stdin!="$text" && $stdin != ""} {
lappend z "$stdin"
}
}
catch {close $dat}
set g [open badchan.txt w+]
foreach q $z {
puts $g "$q"
}
close $g
}

bind dcc X leave leave:dcc
proc leave:dcc {nick idx arg} {
global service botnick
set cleave [lindex $arg 0]
putdcc $service(idx) ":$service(nick) PART $cleave"
return 0
}

bind dcc X -badchan mbc:dcc
proc mbc:dcc {nick idx arg} {
global service botnick
set fichier [open badchan.txt a]
set delchan [lindex [string tolower $arg] 0]
if {$delchan==""} {
putdcc $idx "\002Erreur!\002 Vous devez spécifier un salon à supprimer de la liste!"
return 0
}
if {![isin $delchan $fichier]=="-1"} {
putdcc $idx "\002Erreur!\002 Le Salon\002 $delchan \002n'est pas dans la liste!"
return 0
}
delchr $delchan
putdcc $idx "Le Salon\002 $delchan \002 a été supprimé de la liste des BadChan."
return 0
}

bind dcc X bconnect services_dcc
proc services_dcc {arg idx} {
global service
set service(idx) [connect $service(serveur) $service(port)]
putdcc $service(idx) "PASS $service(pass)"
putdcc $service(idx) "SERVER $service(name) 1 [unixtime] [unixtime] J09 :$service(info)"
putdcc $service(idx) ":$service(name) NICK $service(nick) 1 1 $service(nick) $service(name) $service(name) :BadChan Searcher"
putdcc $service(idx) ":$service(nick) MODE $service(nick) +owsgzi"
putdcc $service(idx) ":$service(nick) JOIN $service(chan)"
putdcc $service(idx) ":$service(nick) MODE $service(chan) +o $service(nick) 0"
putdcc $service(idx) ":$service(nick) MODE $service(chan) +isnt 0"
utimer 30 check_connect
}


proc services_control {idx arg} {
global service
if {$service(debug)=="0"} { putdcc $service(idx) ":$service(nick) privmsg $service(chan) :$arg" }

regsub -all {\\} $arg {\\\\} arg
regsub -all {\{} $arg {\{} arg
regsub -all {\}} $arg {\}} arg
regsub -all {\]} $arg {\]} arg
regsub -all {\[} $arg {\[} arg
regsub -all {"} $arg {"} arg
regsub -all {\`} $arg {\`} arg

set fichier [open badchan.txt a]
set arg1 [lindex $arg 0]
set arg2 [lindex $arg 1]
set arg3 [lindex $arg 2]

if {$arg2=="PRIVMSG"} {
}
if {$arg2=="315"} {
}
if {$arg2=="TOPIC"} {
}
if {$arg2=="NOTICE"} {
}
if {$arg2=="MOTD"} {
}
if {$arg2=="KILL"} {
}
if {$arg2=="SILENCE"} {
}
if {$arg2=="NICK"} {
}
if {$arg2=="MODE"} {
}
if {$arg2=="KICK"} {
}
if {$arg2=="SETIDENT"} {
}
if {$arg2=="SETHOST"} {
}
if {$arg2=="PART"} {
}
if {$arg2=="JOIN"} {
if {[isin $arg3 $fichier]=="1"} {
set temp [string trim $arg1 :]
set defraison "Salon à accès non-autorisé! Merci d'en choisir un autre."
putdcc $service(idx) ":$service(nick) JOIN $arg3"
putdcc $service(idx) ":$service(nick) MODE $arg3 +ois $service(nick) 0"
putdcc $service(idx) ":$service(nick) MODE $arg3 +b *!*@*"
putdcc $service(idx) ":$service(nick) KICK $arg3 $temp :Salon à accès non-autorisé! Merci de ne plus joindre ce salon."
close $fichier
return 0
}
}
if {$arg2=="LUSERS"} {
}
if {$arg2=="TRACE"} {
}
if {$arg2=="VERSION"} {
}
if {$arg2=="NAMES"} {
}
if {$arg2=="STATS"} {
}
if {$arg2=="315"} {
}
if {$arg2=="352"} {
}
if {$arg2=="SQUIT"} {
}
if {$arg2=="SERVER"} {
}
if {$arg2=="MODE"} {
}
if {$arg1=="PING"} {
putdcc $idx "PONG $arg2"
return 0
}
}


proc do_connect {} {
global service
set service(idx) [connect $service(serveur) $service(port)]
putdcc $service(idx) "PASS $service(pass)"
putdcc $service(idx) "SERVER $service(name) 1 [unixtime] [unixtime] J09 :$service(info)"
control $service(idx) services_control
putdcc $service(idx) ":$service(name) NICK $service(nick) 1 1 $service(nick) $service(name) $service(name) :BadChan Searcher"
putdcc $service(idx) ":$service(nick) MODE $service(nick) +owsgiz"
putdcc $service(idx) ":$service(nick) JOIN $service(chan)"
putdcc $service(idx) ":$service(nick) MODE $service(chan) +ontis $service(nick)"
putdcc $service(idx) ":$service(nick) WALLOPS :Hello world"
utimer 30 check_connect
}


proc check_connect {} {
global service
putdcc $service(idx) ":$service(nick) JOIN $service(chan)"
if {[valididx $service(idx)]} {
utimer 30 check_connect
return 0
}
do_connect
}

proc valididx {idx} {
set r 0
foreach j [dcclist] {
if {[lindex $j 0] == $idx} {
set r 1
}
}
return $r
}
if {![info exists service(idx)]} {do_connect}
Back to top
View user's profile Send private message
Trixar_za
Op


Joined: 18 Nov 2009
Posts: 143
Location: South Africa

PostPosted: Fri Aug 26, 2011 3:08 pm    Post subject: Reply with quote

You have to give us a little more information than that.

We can tell this is a Services script that connects as a server, but we need to know what kind of server software your running (like UnrealIRCd, InspIRCd, nefariousIRCd, ShadowIRCd, Ratbot, etc) to work out what variables you need. Hell, giving us the basic information like your server's IRC address might be helpful too.

Also note that this script was written to work and link with only a certain server protocol and will not work with any other without modification. In the case of a TS6 server, it might never work.
_________________
http://www.trixarian.net/Projects
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber