proc clone:scan {host chan} {
set fp [open "clonescan.$chan" a]
foreach host {[chanlist $chan]} {
set host *!*@[lindex [split $host "@"] 1]
puts $fp $host
}
close $fp
clone:check $host $chan
}
proc clone:check {host chan} {
set fp [open "clonescan.$chan" r]
set data [read -nonewline $fp]
close $fp
set hosts [split $data "\n"]
foreach host {[chanlist $chan]} {
set host *!*@[lindex [split $host "@"] 1]
if {[string match "$host" $hosts]} {
inc clones($chan) 1
}
}
}
Thats basic. Just a file and a string match. But hopefully it works. I havn't tested it yet. Oh, and nice script metriod never noticed you made it this morning.
let me enlighten you on a very important subject: if you don't test your code - and I don't think you've ever tested a single line written by yourself - it's basically the same if you believe you can drive since you have seen other people drive, having never driven a car yourself
for starters, [chanlist] doesn't return a host list, it returns a nick list, so your code is absolutely disfunctional
and apparently you haven't bothered to consider what I suggested to you earlier, about file access and maintaining list structures in memory... remember? I even wrote an example of that, especially for you
foreach nick {[chanlist $chan]} {
set host [getchanhost $nick $chan
set host *!*@[lindex [split $host "@"] 1]
puts $fp $host
}
Then if you could please help me more of this memory stuff i could ditch that puts fp and the file stuff and just use memory. Im not good with this memory stuff. Then, can i still use string match with this memory stuff to match any hosts. Also, how can i increase a variable by 1. Thanks for your help so far, im willing to learn more about this memory stuff and get this script tested and completed. Also maybe a antipjen-drone script if you could help with that aswell. Trying my best ;p.
foreach nick {[chanlist $chan]} {
set host [getchanhost $nick $chan]
set host *!*@[lindex [split $host "@"] 1]
}
set clonescan($channel) {}
foreach hosts {[$host]} {
if {[set idx [lsearch $clonescan($chan) $hosts]] != -1} {
lset $clonescan($channel) $idx $hosts
}
}
set clonecheck 1
if {$clonecheck} {
foreach hostcheck {[$hosts]} {
if {[string match "$hostcheck" "$clonescan($channel)"]} {
incr clones($channel)
}
}
}
Ok, I read some guides and made this simple script. Hopefully it works. Demond can you check that code is correct as you know alot about data structures in memory. Atleast i tryed .
Tosser^^ wrote:Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
i recall you from IRC miethering me like mad to create you a clonescan
Tosser^^ wrote:Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
i recall you from IRC miethering me like mad to create you a clonescan
He does that a lot
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.
Tosser^^ wrote:oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.
Thanks for that random bot code greenbear.
please please refrase that.
You mess me around, I ban you.
And I'm banned on 19 bots, like I care? Get out more, please.
Tosser^^ wrote:oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.
Thanks for that random bot code greenbear.
please please refrase that.
You mess me around, I ban you.
And I'm banned on 19 bots, like I care? Get out more, please.
in case you haven't noticed, here you are not on your local qnet ban discussion forum, so better stick to the topic(s)