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.

TCL / Eggdrop Scan for Users, who are in 2 channels or more.

Old posts that have not been replied to for several years.
Locked
t
tessa
Voice
Posts: 4
Joined: Sat Jan 15, 2005 11:33 am

TCL / Eggdrop Scan for Users, who are in 2 channels or more.

Post by tessa »

Hallo :D

i've a very big problem.

I've installed the os_notinchanlist module from anope.

This module being force users into the channel #idle, who are not in any channels.


Now my problem:

On my shell is an eggdrop installed, who takes all 5 minutes following command: /os notinchanlist

Now all 5 minutes are joining peoples the channel #idle, but they aren't part, if they join another chan.


What i want to do, is the following:

All people in this chan should part #idle if they are joining another channel.

- I need a TCL-script that scanns all 5 minutes the users in #idle.
- If they are in 2 or more channels, the script should /sapart them out of #idle
- The script shouldn't sapart op's, because i want to watch the channel


Sry for my english :) Plz, plz help me :D ^^
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

wrong forum buddy, you need to ask for this on Script Requests forum

if you are willing to help yourself, here's a tip: WHOIS users and intercept (using raw bind) numeric 319 (the channels that user is on)
t
tessa
Voice
Posts: 4
Joined: Sat Jan 15, 2005 11:33 am

Post by tessa »

Oops I'm sry demond... :oops:

Thank u for move :D

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

Post by awyeah »

Here's a basic concept. This is a code written in 3 minutes, so use with caution. :roll:

Code: Select all

timer 5 check:chan

proc check:chan { } {
 if {[botonchan #idle]} {
  foreach user [chanlist #idle] {
   if {![isop $user #idle] && ![isbotnick $user]} {
   putserv "WHOIS $user"
   }
  }
 }
 timer 5 check:chan
}

bind raw - 319 check:whois

proc check:whois {from key arg} {
 #This might not be the best way to check for 2 channels, but who cares
 #as long as it works, its fine by me.
  if {[string match "*? #?* #?*" $arg] || [[llength $arg] >= 4] && [onchan [lindex $arg 1] #idle]} {
  # Can also use 'string index' above to check the first index of the lindexes
  #Assuming that the bot is already opered up and has a +a or +A flag
   putserv "SAPART #idle [lindex $arg 1]"
   }
 return 1
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked