Maybe 2 people sharing 1 ID.^DooM^ wrote:split personality disorder?
Code: Select all
bind time - "?0 *" {set flag 1; putallbots req;#}
bind bot - req gotreq
proc gotreq {from cmd text} {
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[nick2hand $user $chan] != "*"} {
putbot $from "ans $chan $user"
}
}
}
}
bind bot - ans gotans
proc gotans {from cmd text} {
if $::flag {
if [info exists ::bbots] {unset ::bbots}
if [info exists ::buser] {unset ::buser}
set ::flag 0
}
set chan [lindex [split $text] 0]
set user [lindex [split $text] 1]
if {![info exists ::bbots($chan)] ||
[lsearch -exact $::bbots($chan) $from] == -1} {
lappend ::bbots($chan) $from
}
if {![info exists ::buser($chan)] ||
[lsearch -exact $::buser($chan) $user] == -1} {
lappend ::buser($chan) $user
}
}
Code: Select all
bind time - "?0 *" {set flag 1; putallbots req;#}
bind bot - req gotreq
proc gotreq {from cmd text} {
foreach chan [channels] {
foreach user [chanlist $chan] {
if {[nick2hand $user $chan] != "*"} {
putbot $from "ans $chan $user"
}
}
}
}
bind bot - ans gotans
proc gotans {from cmd text} {
if $::flag {
if [info exists ::bbots] {unset ::bbots}
if [info exists ::buser] {unset ::buser}
foreach chan [channels] {
lappend ::bbots($chan) $::nick
foreach user [chanlist $chan] {
if {[nick2hand $user $chan] != "*"} {
lappend ::buser($chan) $user
}
}
}
set ::flag 0
}
set chan [lindex [split $text] 0]
set user [lindex [split $text] 1]
if {![info exists ::bbots($chan)] ||
[lsearch -exact $::bbots($chan) $from] == -1} {
lappend ::bbots($chan) $from
}
if {![info exists ::buser($chan)] ||
[lsearch -exact $::buser($chan) $user] == -1} {
lappend ::buser($chan) $user
}
}
Code: Select all
proc members {f alist} {
puts $f <p>
set idx 0
set more 1
while $more {
set more 0
puts $f <tr>
foreach {chan elems} $alist {
if {$idx < [llength $elems]} {
puts $f <td>[lindex $elems $idx]</td>
set more 1
} {
puts $f <td></td>
}
}
puts $f </tr>
incr idx
}
}
proc genpage {f} {
puts $f <html><head>botnet</head><body>
puts $f <table>
puts $f <tr>
foreach chan [array names ::bbots] {
puts $f <td>$chan</td>
}
puts $f </tr>
members $f [array get ::bbots]
members $f [array get ::buser]
puts $f </table>
puts $f </body></html>
}