File: INN.py

package info (click to toggle)
inn2 2.4.5-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,912 kB
  • ctags: 7,860
  • sloc: ansic: 85,104; perl: 11,427; sh: 9,863; makefile: 2,498; yacc: 1,563; python: 298; lex: 252; tcl: 7
file content (39 lines) | stat: -rw-r--r-- 1,149 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
##  $Id: INN.py 7897 2008-06-22 18:04:31Z iulius $
##
##  This module supplies stub Python functions corresponding to the ones
##  provided by innd.  It is not used by the server; it is only here so
##  that you can test your filter scripts before loading.
##  See the INN Python Filtering and Authentication Hooks documentation
##  for more information.

from types import *

def set_filter_hook(anObject):
    if type(anObject) == InstanceType:
        print "** set_filter_hook for " + repr(anObject)
    else:
        print "** <Your object is not a class instance.>"

def addhist(messageid):
    print "** addhist Message-ID: " + messageid

def havehist(messageid):
    print "** havehist Message-ID: " + messageid

def cancel(messageid):
    print "** cancel Message-ID: " + messageid

def newsgroup(groupname):
    print "** newsgroup: " + groupname

def head(messageid):
    print "** head Message-ID: " + messageid

def article(messageid):
    print "** article Message-ID: " + messageid

def hashstring(mystring):
    print "** hash: " + mystring

def syslog(level, message):
    print "-- syslog level: %s message: %s" % (level, message)