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.

Annoucement Script

Old posts that have not been replied to for several years.
Locked
f
funkymonkey

Annoucement Script

Post by funkymonkey »

Hi, I'm looking for a script that will make the bot produce a random quote, but only when the channel has been idle for a set amount of time.

I can see plenty of scripts to do random quotes, but havent seen any that only kick in when its a bit quiet.

Any help would be appreciated
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Well, it's not that hard to make such script yourself, but you may even want to use one of the existing, then you might add following things:

set lastchanmsg [unixtime]
bind msg - "#yourchannel*" updatetime

proc upditetime {nick uhost handle channel text} {
global lastchanmsg
set lastchanmsg [unixtime]
}


This is all supposed to go outside any procedures... Now, find the procedure that actually prints out the quote and this immidiately after the procedure declaration:

global lastchanmsg
if {[expr [unixtime] - $latchanmsg] < set_some_minimum_idletime} { return }

This would be a very sloppy solution, but unless you can code TCL, it might be your only way out.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

ARGH!
It is NOT:
bind msg - "#yourchannel*" updatetime

but:

bind pubm - "#yourchannel*" updatetime


Sorry, i was dumb or something...
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
Locked