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.

Script to make bot part channels when not in use

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
R
RejiMC
Voice
Posts: 2
Joined: Sat Jul 08, 2006 2:43 pm

Script to make bot part channels when not in use

Post by RejiMC »

Is there a script which will make the bot part channel if its not used for a while? Bot is in multiple channels so a simple timer wont work.

Thanks
User avatar
avilon
Halfop
Posts: 64
Joined: Tue Jul 13, 2004 6:58 am
Location: Germany

Post by avilon »

What's the definition of an unused channel?
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

..

Post by NTHosts »

Unused = No users right ? :s
www.NT-Hosts.Net - More than just a host
R
RejiMC
Voice
Posts: 2
Joined: Sat Jul 08, 2006 2:43 pm

Post by RejiMC »

Sorry for the confussion, its not unused channel but unused bot...
will explain the situation... we run a small network and provide a bible bot for our channels, some misuse it just to keep the room open, and some request it and then forget all about it, so what we are looking for is something like if the bot was never in use for say a week, it should part that channel, or at least when the channel gets droped (-r).

If anyone can help please do, Thank you.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Code: Select all

bind mode - "#mychannel -r" someproc
proc someproc {nick uhost hand chan mode target} {
                channel set $chan +inactive
                putcmdlog "Bot setting channel +inactive and leaving $chan"
}
Should work..Didn't test it..
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

that obviously won't work as it needs to check with *all* channels, not 1 specific channel.

Use

Code: Select all

bind mode -|- "* -r" someproc
Post Reply