diff --git a/dr.botzo.cfg.example b/dr.botzo.cfg.example index 8d5c024..1bc6e8c 100644 --- a/dr.botzo.cfg.example +++ b/dr.botzo.cfg.example @@ -14,6 +14,7 @@ dbname = dr_botzo [IrcAdmin] autojoin = #bss +sleep = 30 automsg = nickserv identify foo [Karma] diff --git a/modules/IrcAdmin.py b/modules/IrcAdmin.py index 86fa3cb..bacc4f4 100644 --- a/modules/IrcAdmin.py +++ b/modules/IrcAdmin.py @@ -17,6 +17,7 @@ along with this program. If not, see . """ from ConfigParser import NoOptionError +import time from extlib import irclib @@ -56,6 +57,12 @@ class IrcAdmin(Module): ' '.join(command.split(' ')[1:])) except NoOptionError: pass + # sleep for a bit before autojoining, if told to + try: + sleep = self.config.getint(self.__class__.__name__, 'sleep') + time.sleep(sleep) + except NoOptionError: pass + # join the specified channels try: autojoins = self.config.get(self.__class__.__name__, 'autojoin').split(',')