This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

scan chan tcl

Old posts that have not been replied to for several years.
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

scan chan tcl

Post by MasterScript »

Hi, i am new here. I need scan chan tcl. Its for scan:

1. How many user
2. Who is channel founder
3. Check clone

Example:
/msg mybot scan #egghelp

Mybot join #egghelp then scan that channel

Result like this:

scan on #egghelp: duration(0.04) clones(2) groups(1) usercount(1000) founder(Egg)

Thanks
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

How can we check who is the channel founder?

1) For counting total channel users: set totalusers [llength [chanlist $chan]]
2) For checking clones:

Code: Select all

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:

Code: Select all

set count 0
foreach user [chanlist $chan] {
 foreach person [chanlist $chan] {
  if {[string equal -nocase [getchanhost $user $chan] [getchanhost $person $chan]] && ![string equal $user $person]} {
  incr count
  }
 }
}
set totalclones $count
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Thanks

I am connect to webchat irc. Check founder channel:

/msg chanserv info #channame

Example:
-ChanServ- *** #iWEBTEAM is iWEBTEAM Enterprise http://www.iwebteam.com
-ChanServ- Founder : MasterScript
-ChanServ- CSN : 101983
-ChanServ- Registered : 12/09/04 10:58:44 GMT
-ChanServ- Last Opping : 04/26/05 09:58:39 GMT
-ChanServ- Last Topic : Selamat Datang Ke Laman http://www.iwebteam.com http://www.mircmalaysia.com/index.php?o ... &Itemid=52 (MasterScript)
-ChanServ- ModeLock : +rtn-k
-ChanServ- Options : ModeLock, OpGuard, KeepTopic
-ChanServ- MemoLevel : UOp
-ChanServ- *** End of info ***
Tq
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

This one you can do something like:

Code: Select all

#For your main proc - scanning one you can do this:

 putserv "PRIVMSG chanserv :INFO $chan"
 set doscan($chan) 1
and then:

Code: Select all

#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.
==================================
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Thank you very much.

I am a newbies. Can u help me make one example for that start from bind msg?



Command: /msg botnick scan #channame
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Heres an example:

Code: Select all

bind msg n "scan" scan:channel

proc scan:channel {nick uhost hand text} {
 if {[string equal "#" [string index $text 0]]} {
  putserv "PRIVMSG $nick :Total ops on [lindex $text 0]: [llength [chanlist [lindex $text 0]]]"
  }
}
This will private message you with the result of total operators in a channel. If you want to display the result on that channel then use:

Code: Select all

bind msg n "scan" scan:channel

proc scan:channel {nick uhost hand text} {
 if {[string equal "#" [string index $text 0]]} {
  putserv "PRIVMSG [lindex $text 0] :Total ops on [lindex $text 0]: [llength [chanlist [lindex $text 0]]]"
  }
}
I have set the handle flag to 'n' so only bot owners can use: /msg botnick scan #channel
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Thanks

Bots can scan channel if bots on that channel i give. I have question

1. How to set bots autojoin to channel, scan, part and send report to myhome channel?
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

What do u mean #For your main proc and #Bind on notc and make a proc with this?

:cry:
awyeah wrote:This one you can do something like:

Code: Select all

#For your main proc - scanning one you can do this:

 putserv "PRIVMSG chanserv :INFO $chan"
 set doscan($chan) 1
and then:

Code: Select all

#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
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Thanks.

Now i try make scan channel like this:

/msg botnick scan #chan

Bots Action:

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.

*Newbies :cry:
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Code: Select all

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.
==================================
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Thanks.

Scan Channel
-> *MyBot* scan #phpnuke

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
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
M
MasterScript
Halfop
Posts: 41
Joined: Tue Apr 26, 2005 1:44 am

Post by MasterScript »

Then what is your suggestion?

Thanks
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

do [llength [chanlist $chan]] when you recieve end-of-who
photon?
Locked