set count 0
foreach user [chanlist $chan] {
if {[string match -nocase "*!*@[lindex [split $uhost @] 1]" "${user}![getchanhost $user $chan]"]} {
incr count
}
}
set totalclones $count
However you have to match one ip against all the channel list for 1 user, and do the same for all users and incr count, lappend cloning ips to a list, since you are not checking on join or any event over here.
Check clones for all users in the channel?
Something like this maybe:
#Bind on notc and make a proc with this:
global doscan
if {[info exists doscan($chan)] && [string equal "ChanServ" $nick] && && [isbotnick $chan] && [string equal "Founder" [lindex $text 0]] && [string equal ":" [lindex $text 1]]} {
set chanfounder [lindex $text 2]; unset doscan
}
#Then you can set $chanfounder global and use it in your main proc
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
#Bind on notc and make a proc with this:
global doscan
if {[info exists doscan($chan)] && [string equal "ChanServ" $nick] && && [isbotnick $chan] && [string equal "Founder" [lindex $text 0]] && [string equal ":" [lindex $text 1]]} {
set chanfounder [lindex $text 2]; unset doscan
}
#Then you can set $chanfounder global and use it in your main proc
Main proc, meaning your main procedure, which will scan total operators, clones etc. You have to have 2-3 procedures with 2 binds atleast for this script to work -- give 3 output results.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
1. join channel
2. scan channel for :
a) How many user in channel
b) check for clones
c) founder
3. part from channel
4. report to my channel (HUB channel)
but i dont know how to make bot join/part. I try use "cycle" but bots didint scan channel.
bind msg n "scan" scan:channel
proc scan:channel {nick uhost hand text} {
if {[string equal "#" [string index $text 0]]} {
set chan [lindex $text 0]
#Add the channel to the bots channel list and join it
channel add $chan; putquick "JOIN $chan"
#Getting total channel users here
set total_users [llength [chanlist $chan]]
#Doing ChanServ INFO here
putquick "PRIVMSG chanserv :INFO $chan"
#Displaying one of the gotten results
putquick "PRIVMSG $nick :Total ops on $chan: $total_users"
#Remove the channel from the bot's channel list
channel remove $chan
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
In private message:
*MyBot* Total ops on #phpnuke: 0
In party line
<MyBot> [11:56] joined #phpnuke but didn't want to!
and channel info bla bla....
Problem:
1. Bots dont get total user
2. bots didint give founder infomation
3. Bots has been ban
* MyBot (MyBot@=uYhgmefu.gunbound.com.my) has joined #phpnuke
* MyBot (MyBot@=uYhgmefu.gunbound.com.my) has left #phpnuke
* encik sets mode: +b *!*@=uYhgmefu.gunbound.com.my
you have do the whole with thing interactiv or at least timer based.
in awyeahs example 'channel remove $chan' is invoked before 'putquick "JOIN $chan"' has left the bot, meaning the bot has here 'set total_users [llength [chanlist $chan]]' an empty list ^-^.
PS: i dont believe it was meant as a complete script .
btw. 'putquick "JOIN $chan"' is redudant, because 'channel add' will invoke a JOIN anyway.