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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Ciber
Voice
Posts: 3 Joined: Wed Aug 02, 2006 8:22 pm
Post
by Ciber » Thu Aug 03, 2006 1:37 pm
Okay, i'd like a script mainly to prevent abuse and make the bot avalible to others more. I want it to do a check on join, and maybe a check every 20 mins to see if the channel has 5+ users. If under 5 users it will leave the channel.
Thanks
!
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Fri Aug 04, 2006 4:00 pm
You can't do a check onjoin since the bot doesn't know how many people are on a channel when it joins, for a simple check (every 10 minutes)
Code: Select all
bind TIME -|- {?0 * * * *} check:stuff
proc check:stuff {args} {
foreach channel [channels] {
if {[expr [clock seconds] - [getchanjoin $::botnick $channel]] > 60} {
# only continue if we joined more than 60 seconds ago
if {[llength [chanlist $channel]] < 5} {
channel remove $channel
}
}
}
}
Untested, i'm not exactly sure if the getchanjoin part will work as planned
Ciber
Voice
Posts: 3 Joined: Wed Aug 02, 2006 8:22 pm
Post
by Ciber » Fri Aug 04, 2006 4:11 pm
Thanks