Problem is bots print out 1 line more the once its like it print out stuff 2 times and sometimes it forgets to print out some stuff from my command list.
Code: Select all
### SETTINGS
set egglist { "flywithme" "hejda" "malvax"}
set comlist {
"» !date"
"» !uptime"
"» !ping <nick>"
"» !cal <calculation>"
"» !google <search word>"
"» !dns <host>"
"» !nmap <ip adress> (NOT WORKING)"
"» !cc <amount> <from> <to> (NOT WORKING)"
"» !ip <ip> (chanset +ipcheck)"
"» !troll (chanset +troll)"
"» !aftonbladet"
"» Piratebay: !pandroid !pmovie"
"» !liveleak"
"» !bash"
"» !phub"
}
bind pub n|o "!pcmds" list:send
proc list:send {nick uhost handle chan arg} {
global egglist comlist botnick
set cur_egg 0
foreach cur_com $comlist {
if { [lindex $egglist $cur_egg] == $botnick } {
puthelp "NOTICE $nick :$cur_com"
} else {
putbot [lindex $egglist $cur_egg] [concat ">say $nick" $cur_com]
}
incr cur_egg
if { $cur_egg == [llength $comlist] } {
set cur_egg 0
}
}
}
### SETTINGS
set master_egg "flywithme"
# The botnet-nick of the sender
set saychan "#lastwish"
### BINDS
bind bot - ">say" list:say
### PROCEDURES
proc list:say { from cmd arg } {
global saychan master_egg
set nick [lindex $arg 0]
set text [lrange $arg 1 end]
if { $from == $master_egg } {
puthelp "NOTICE $nick :$text"
}
}
If anyone is willing to help me out on this would be great. or point out how to fix it.