chiark / gitweb /
rm some todos
[inn-innduct.git] / samples / INN.py
1 ##  $Id: INN.py 7897 2008-06-22 18:04:31Z iulius $
2 ##
3 ##  This module supplies stub Python functions corresponding to the ones
4 ##  provided by innd.  It is not used by the server; it is only here so
5 ##  that you can test your filter scripts before loading.
6 ##  See the INN Python Filtering and Authentication Hooks documentation
7 ##  for more information.
8
9 from types import *
10
11 def set_filter_hook(anObject):
12     if type(anObject) == InstanceType:
13         print "** set_filter_hook for " + repr(anObject)
14     else:
15         print "** <Your object is not a class instance.>"
16
17 def addhist(messageid):
18     print "** addhist Message-ID: " + messageid
19
20 def havehist(messageid):
21     print "** havehist Message-ID: " + messageid
22
23 def cancel(messageid):
24     print "** cancel Message-ID: " + messageid
25
26 def newsgroup(groupname):
27     print "** newsgroup: " + groupname
28
29 def head(messageid):
30     print "** head Message-ID: " + messageid
31
32 def article(messageid):
33     print "** article Message-ID: " + messageid
34
35 def hashstring(mystring):
36     print "** hash: " + mystring
37
38 def syslog(level, message):
39     print "-- syslog level: %s message: %s" % (level, message)