[Otfbot-svn] r121 - trunk

cato- at BerliOS cato-
So Jun 24 00:35:05 CEST 2007


Author: cato-
Date: 2007-06-24 00:34:59 +0200 (Sun, 24 Jun 2007)
New Revision: 121

Modified:
   trunk/TODO
   trunk/otfbot.py
Log:
* updated todo-list


Modified: trunk/TODO
===================================================================
--- trunk/TODO	2007-06-23 18:12:26 UTC (rev 120)
+++ trunk/TODO	2007-06-23 22:34:59 UTC (rev 121)
@@ -1,22 +1,26 @@
 core:
-* add a way to cleanly stop the bot from system (SIGTERM-handling, module "signal)
+* add a way to cleanly stop the bot from system (twisted has something in a reactor)
 * maybe add channel-name to log-messages
+* new callback "command"
+* seperate callbacks for query and channel messages
+* priorities of callbacks for modules (module with the highest priority will get the callback first)
+* return value for chatmod callbacks, which can be NO_FURTHER_PROCESSING or maybe MSG_CHANGED(newmsg) or something like this.
+** In this case, logMod should get the highest priorty for right logging, and some mod could alter the message, and pass it to the kiMod
+* get modechars and channeltypes from servergreeting
+* ability not to *load* modules for certain networks
+* don't use global variables in Bot (classes, logging, modechars, ..)
+* put the stuff, which is now plain in otfbot.py in a class
+* limit the commands processed (maybe put some users temporarily on ignore) and limit the lines sent per minute
 modules:
-* move modules into subdir (eg /module/kiMod.py)
-* move data of modules in a subdir of the modules-dir (eg /module/kiMod/megahal1.brn)
-* load all modules from the dir, automatically
 * extent modules-api
 logMod:
-* make logfilerotation working
+* make logfilerotation working (should work, if needed more exactly use scheduler)
 rdfMod:
 * use real parser(?)
 * decrease the interval between two hits, if a change was found, increase it, if nothing was changed.
 * load the Feeds in a central place, so the Feed only needs to be loaded once f?r two(or more) channels
-* priorities of callbacks for modules (module with the highest priority will get the callback first)
-* return value for chatmod callbacks, which can be NO_FURTHER_PROCESSING or maybe MSG_CHANGED(newmsg) or something like this.
-** In this case, logMod should get the highest priorty for right logging, and some mod could alter the message, and pass it to the kiMod
 kiMod:
-* make megahal use a brain per channel, limit brainsize (maybe requires hacking the megahalpython-binding)
+* limit brainsize (maybe requires hacking the megahalpython-binding)
 
 
 commandsMod:

Modified: trunk/otfbot.py
===================================================================
--- trunk/otfbot.py	2007-06-23 18:12:26 UTC (rev 120)
+++ trunk/otfbot.py	2007-06-23 22:34:59 UTC (rev 121)
@@ -20,18 +20,12 @@
 # 
 
 """Chat Bot"""
-svnversion="$Revision$".split(" ")[1]
 from twisted.words.protocols import irc
 
 from twisted.internet import reactor, protocol, error, ssl
 import os, random, string, re, sys, traceback, atexit
 import functions, config, scheduler
 
-
-# some constants, can be retrieved from serveranswer while connecting.
-modchars={'a':'!','o':'@','h':'%','v':'+'}
-modcharvals={'!':4,'@':3,'%':2,'+':1,' ':0}
-
 ###############################################################################
 # Parse commandline options
 from optparse import OptionParser
@@ -116,14 +110,6 @@
         classes[-1].datadir = "modules/"+classes[-1].__name__+"-data"
         corelogger.debug("Loading module "+classes[-1].__name__)
 
-
-# react on signals
-#import signal
-#def signalhandler(signal, frame):
-#    corelogger.info("Got Signal "+str(signal))
-#signal.signal(signal.SIGHUP,signalhandler)
-#signal.signal(signal.SIGTERM,signalhandler)
-
 ###############################################################################
 # some config functions
 theconfig=None
@@ -177,6 +163,11 @@
     file.write(theconfig.exportxml())
     file.close()
 
+
+# some constants, can be retrieved from serveranswer while connecting.
+modchars={'a':'!','o':'@','h':'%','v':'+'}
+modcharvals={'!':4,'@':3,'%':2,'+':1,' ':0}
+
 class Bot(irc.IRCClient):
     """The Protocol of our IRC-Bot"""
     def __init__(self):
@@ -191,8 +182,7 @@
         self.numMods = 0
 
         self.versionName="OtfBot"
-        self.versionNum="svn "+str(svnversion)
-        self.versionEnv="" #sys.version
+        self.versionNum="svn "+"$Revision$".split(" ")[1]
         self.logging = logging
         self.logger = logging.getLogger("core")
         self.logger.info("Starting new Botinstance")




Mehr Informationen über die Mailingliste Otfbot-dev