Hi,

I would like to propose the attached patch for review, that add support
for authentication plugins to poker-network.

Let me know if it deserve more love in order to get included into trunk.

Thanks in advance.
-- 
Johan Euphrosine <[EMAIL PROTECTED]>
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 4062)
+++ ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2008-07-07  Johan Euphrosine  <[EMAIL PROTECTED]>
+
+	* pokernetwork/pokerauth.py (get_auth_instance):
+	Add authentification modularity.
+	* pokernetwork/pokerauthmysql.py:
+	Add authenfification module based on a foreign mysql database.
+	* tests/test-pokerauth.py.in:
+	Add tests for authentification modules lookup.
+
 2008-07-06  Bradley M. Kuhn  <[EMAIL PROTECTED]>
 
 	* pokerui/pokerrenderer.py (PokerInteractors.interactorSelected):
Index: pokernetwork/pokerauthmysql.py
===================================================================
--- pokernetwork/pokerauthmysql.py	(revision 0)
+++ pokernetwork/pokerauthmysql.py	(revision 0)
@@ -0,0 +1,89 @@
+#
+# -*- py-indent-offset: 4; coding: iso-8859-1 -*-
+#
+# Copyright (C) 2006, 2007, 2008 Loic Dachary <[EMAIL PROTECTED]>
+# Copyright (C) 2008 Johan Euphrosine <[EMAIL PROTECTED]>
+# Copyright (C) 2004, 2005, 2006 Mekensleep
+#
+# Mekensleep
+# 24 rue vieille du temple
+# 75004 Paris
+#       [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+# Authors:
+#  Loic Dachary <[EMAIL PROTECTED]>
+#  Johan Euphrosine <[EMAIL PROTECTED]>
+#  Henry Precheur <[EMAIL PROTECTED]> (2004)
+#  Cedric Pinson <[EMAIL PROTECTED]> (2004-2006)
+
+from pokernetwork.user import User
+from twisted.python.runtime import seconds
+import MySQLdb
+
+class PokerAuth:
+
+    def __init__(self, db, settings):
+        self.db = db
+        self.type2auth = {}
+        self.verbose = settings.headerGetInt("/server/@verbose")
+        self.settings = settings
+        self.parameters = self.settings.headerGetProperties("/server/auth")[0]
+        self.auth_db = MySQLdb.connect(host = self.parameters["host"],
+                                  port = int(self.parameters.get("port", '3306')),
+                                  user = self.parameters["user"],
+                                  passwd = self.parameters["password"],
+                                  db = self.parameters["db"])
+
+    def message(self, string):
+        print "PokerAuth: " + string
+
+    def error(self, string):
+        self.message("*ERROR* " + string)
+            
+    def SetLevel(self, type, level):
+        self.type2auth[type] = level
+
+    def GetLevel(self, type):
+        return self.type2auth.has_key(type) and self.type2auth[type]
+
+    def auth(self, name, password):
+        cursor = self.auth_db.cursor()
+        cursor.execute("SELECT username, password, privilege FROM %s " % self.parameters["table"] +
+                       "WHERE username = '%s'" % name)
+        numrows = int(cursor.rowcount)
+        serial = 0
+        privilege = User.REGULAR
+        if numrows <= 0:
+                if self.verbose > 1:
+                    self.message("user %s does not exist" % name)
+                cursor.close()
+                return ( False, "Invalid login or password" )
+        elif numrows > 1:
+            self.error("more than one row for %s" % name)
+            cursor.close()
+            return ( False, "Invalid login or password" )
+        else:
+            (serial, password_sql, privilege) = cursor.fetchone()
+            cursor.close()
+            if password_sql != password:
+                self.message("password mismatch for %s" % name)
+                return ( False, "Invalid login or password" )
+
+        return ( (serial, name, privilege), None )
+
+def get_auth_instance(db, settings):
+    return PokerAuth(db, settings)
Index: pokernetwork/pokerservice.py
===================================================================
--- pokernetwork/pokerservice.py	(revision 4062)
+++ pokernetwork/pokerservice.py	(working copy)
@@ -163,7 +163,8 @@
         self.cleanUp(temporary_users = self.settings.headerGet("/server/users/@temporary"))
         self.cashier = pokercashier.PokerCashier(self.settings)
         self.cashier.setDb(self.db)
-        self.poker_auth = PokerAuth(self.db, self.settings)
+        from pokerauth import get_auth_instance
+        self.poker_auth = get_auth_instance(self.db, self.settings)
         self.dirs = split(self.settings.headerGet("/server/path"))
         self.serial2client = {}
         self.avatars = []
@@ -1635,83 +1636,6 @@
         delay = int(self.delays.get('messages', 60))
         self.timer['messages'] = reactor.callLater(delay, self.messageCheck)
 
-class PokerAuth:
-
-    def __init__(self, db, settings):
-        self.db = db
-        self.type2auth = {}
-        self.verbose = settings.headerGetInt("/server/@verbose")
-        self.auto_create_account = settings.headerGet("/server/@auto_create_account") != 'no'
-        currency = settings.headerGetProperties("/server/currency")
-        if len(currency) > 0:
-            self.currency = currency[0]
-        else:
-            self.currency = None
-
-    def message(self, string):
-        print "PokerAuth: " + string
-
-    def error(self, string):
-        self.message("*ERROR* " + string)
-            
-    def SetLevel(self, type, level):
-        self.type2auth[type] = level
-
-    def GetLevel(self, type):
-        return self.type2auth.has_key(type) and self.type2auth[type]
-
-    def auth(self, name, password):
-        cursor = self.db.cursor()
-        cursor.execute("SELECT serial, password, privilege FROM users "
-                       "WHERE name = '%s'" % name)
-        numrows = int(cursor.rowcount)
-        serial = 0
-        privilege = User.REGULAR
-        if numrows <= 0:
-            if self.auto_create_account:
-                if self.verbose > 1:
-                    self.message("user %s does not exist, create it" % name)
-                serial = self.userCreate(name, password)
-                cursor.close()
-            else:
-                if self.verbose > 1:
-                    self.message("user %s does not exist" % name)
-                cursor.close()
-                return ( False, "Invalid login or password" )
-        elif numrows > 1:
-            self.error("more than one row for %s" % name)
-            cursor.close()
-            return ( False, "Invalid login or password" )
-        else:
-            (serial, password_sql, privilege) = cursor.fetchone()
-            cursor.close()
-            if password_sql != password:
-                self.message("password mismatch for %s" % name)
-                return ( False, "Invalid login or password" )
-
-        return ( (serial, name, privilege), None )
-
-    def userCreate(self, name, password):
-        if self.verbose:
-            self.message("creating user %s" % name)
-        cursor = self.db.cursor()
-        cursor.execute("INSERT INTO users (created, name, password) values (%d, '%s', '%s')" %
-                       (seconds(), name, password))
-        #
-        # Accomodate for MySQLdb versions < 1.1
-        #
-        if hasattr(cursor, "lastrowid"):
-            serial = cursor.lastrowid
-        else:
-            serial = cursor.insert_id()
-        if self.verbose:
-            self.message("create user with serial %s" % serial)
-        cursor.execute("INSERT INTO users_private (serial) values ('%d')" % serial)
-        if self.currency:
-            cursor.execute("INSERT INTO user2money (user_serial, currency_serial, amount) values (%d, %s, %s)" % ( serial, self.currency['serial'], self.currency['amount']))
-        cursor.close()
-        return int(serial)
-
 if HAS_OPENSSL:
     class SSLContextFactory:
 
Index: pokernetwork/pokerauth.py
===================================================================
--- pokernetwork/pokerauth.py	(revision 0)
+++ pokernetwork/pokerauth.py	(revision 0)
@@ -0,0 +1,131 @@
+#
+# -*- py-indent-offset: 4; coding: iso-8859-1 -*-
+#
+# Copyright (C) 2006, 2007, 2008 Loic Dachary <[EMAIL PROTECTED]>
+# Copyright (C) 2008 Johan Euphrosine <[EMAIL PROTECTED]>
+# Copyright (C) 2004, 2005, 2006 Mekensleep
+#
+# Mekensleep
+# 24 rue vieille du temple
+# 75004 Paris
+#       [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+# Authors:
+#  Loic Dachary <[EMAIL PROTECTED]>
+#  Johan Euphrosine <[EMAIL PROTECTED]>
+#  Henry Precheur <[EMAIL PROTECTED]> (2004)
+#  Cedric Pinson <[EMAIL PROTECTED]> (2004-2006)
+
+from pokernetwork.user import User
+from twisted.python.runtime import seconds
+
+class PokerAuth:
+
+    def __init__(self, db, settings):
+        self.db = db
+        self.type2auth = {}
+        self.verbose = settings.headerGetInt("/server/@verbose")
+        self.auto_create_account = settings.headerGet("/server/@auto_create_account") != 'no'
+        currency = settings.headerGetProperties("/server/currency")
+        if len(currency) > 0:
+            self.currency = currency[0]
+        else:
+            self.currency = None
+
+    def message(self, string):
+        print "PokerAuth: " + string
+
+    def error(self, string):
+        self.message("*ERROR* " + string)
+            
+    def SetLevel(self, type, level):
+        self.type2auth[type] = level
+
+    def GetLevel(self, type):
+        return self.type2auth.has_key(type) and self.type2auth[type]
+
+    def auth(self, name, password):
+        cursor = self.db.cursor()
+        cursor.execute("SELECT serial, password, privilege FROM users "
+                       "WHERE name = '%s'" % name)
+        numrows = int(cursor.rowcount)
+        serial = 0
+        privilege = User.REGULAR
+        if numrows <= 0:
+            if self.auto_create_account:
+                if self.verbose > 1:
+                    self.message("user %s does not exist, create it" % name)
+                serial = self.userCreate(name, password)
+                cursor.close()
+            else:
+                if self.verbose > 1:
+                    self.message("user %s does not exist" % name)
+                cursor.close()
+                return ( False, "Invalid login or password" )
+        elif numrows > 1:
+            self.error("more than one row for %s" % name)
+            cursor.close()
+            return ( False, "Invalid login or password" )
+        else:
+            (serial, password_sql, privilege) = cursor.fetchone()
+            cursor.close()
+            if password_sql != password:
+                self.message("password mismatch for %s" % name)
+                return ( False, "Invalid login or password" )
+
+        return ( (serial, name, privilege), None )
+
+    def userCreate(self, name, password):
+        if self.verbose:
+            self.message("creating user %s" % name)
+        cursor = self.db.cursor()
+        cursor.execute("INSERT INTO users (created, name, password) values (%d, '%s', '%s')" %
+                       (seconds(), name, password))
+        #
+        # Accomodate for MySQLdb versions < 1.1
+        #
+        if hasattr(cursor, "lastrowid"):
+            serial = cursor.lastrowid
+        else:
+            serial = cursor.insert_id()
+        if self.verbose:
+            self.message("create user with serial %s" % serial)
+        cursor.execute("INSERT INTO users_private (serial) values ('%d')" % serial)
+        if self.currency:
+            cursor.execute("INSERT INTO user2money (user_serial, currency_serial, amount) values (%d, %s, %s)" % ( serial, self.currency['serial'], self.currency['amount']))
+        cursor.close()
+        return int(serial)
+
+_get_auth_instance = None
+def get_auth_instance(db, settings):
+    global _get_auth_instance
+    if _get_auth_instance == None:
+        verbose = settings.headerGet("/server/@verbose")
+        def message(string):
+            print "PokerAuth: " + string
+        import imp
+        script = settings.headerGet("/server/auth/@script")
+        try:
+            if verbose > 0: message("get_auth_instance: trying to load: '%s'" % script)
+            module = imp.load_source("user_defined_pokerauth", script)
+            get_instance = getattr(module, "get_auth_instance")
+            if verbose > 0: message("get_auth_instance: using custom implementation of get_auth_instance: %s" % script)
+            _get_auth_instance = get_instance
+        except:
+            if verbose > 0: message("get_auth_instance: falling back on pokerauth.get_auth_instance, script not found: '%s'" % script)
+            _get_auth_instance = lambda db, settings: PokerAuth(db, settings)
+    return apply(_get_auth_instance, [db, settings])
Index: tests/testmessages.py
===================================================================
--- tests/testmessages.py	(revision 4062)
+++ tests/testmessages.py	(working copy)
@@ -44,7 +44,8 @@
 from pokernetwork import pokerservice
 classes.append(pokerservice.PokerService)
 classes.append(pokerservice.PokerXML)
-classes.append(pokerservice.PokerAuth)
+from pokernetwork import pokerauth
+classes.append(pokerauth.PokerAuth)
 from pokernetwork import pokerlock
 classes.append(pokerlock.PokerLock)
 from pokernetwork import pokeravatar
Index: tests/test-pokerauth/pokerauth.py
===================================================================
--- tests/test-pokerauth/pokerauth.py	(revision 0)
+++ tests/test-pokerauth/pokerauth.py	(revision 0)
@@ -0,0 +1,6 @@
+class PokerAuth:
+    def __init__(self, db, settings):
+        self.gotcha = 1
+
+def get_auth_instance(db, settings):
+    return PokerAuth(db, settings)
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 4062)
+++ tests/Makefile.am	(working copy)
@@ -79,6 +79,7 @@
 	test-pokerbotlogic.py \
 	test-pokerdatabase.py \
 	test-pokerservice.py \
+	test-pokerauth.py \
 	test-pokertable.py \
 	test-pokerchildren.py \
 	test-pokerclient.py \
Index: tests/test-pokerauth.py.in
===================================================================
--- tests/test-pokerauth.py.in	(revision 0)
+++ tests/test-pokerauth.py.in	(revision 0)
@@ -0,0 +1,180 @@
+# -*- mode: python -*-
+# Copyright (C) 2008 Johan Euphrosine <[EMAIL PROTECTED]>
+# Copyright (C) 2006 Mekensleep
+#
+# Mekensleep
+# 24 rue vieille du temple
+# 75004 Paris
+#       [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+# Authors:
+#  Pierre-Andre (05/2006)
+#  Loic Dachary <[EMAIL PROTECTED]>
+#  Johan Euphrosine <[EMAIL PROTECTED]>
+#
+
+import sys, os
+sys.path.insert(0, "@top_srcdir@")
+
+import unittest
+import os.path
+import types
+
+from pokernetwork import pokerauth
+from pokernetwork.user import User
+from pokernetwork import pokernetworkconfig
+import libxml2
+
+settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
+<server verbose="6" ping="300000" autodeal="yes" simultaneous="4" chat="yes" >
+  <delays autodeal="18" round="12" position="60" showdown="30" finish="18" />
+
+  <table name="Table1" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+  <table name="Table2" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+
+  <listen tcp="19480" />
+
+  <cashier acquire_timeout="5" pokerlock_queue_timeout="30" user_create="yes" />
+  <database name="pokernetworktest" host="@MYSQL_TEST_DBHOST@" user="pokernetworktest" password="pokernetwork"
+            root_user="@MYSQL_TEST_DBROOT@" root_password="@MYSQL_TEST_DBROOT_PASSWORD@" schema="@srcdir@/../../database/schema.sql" command="@MYSQL@" />
+  <path>@POKER_ENGINE_PKGSYSCONFDIR@ @POKER_NETWORK_PKGSYSCONFDIR@</path>
+  <users temporary="BOT"/>
+</server>
+"""
+
+settings_alternate_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
+<server verbose="6" ping="300000" autodeal="yes" simultaneous="4" chat="yes" >
+  <delays autodeal="18" round="12" position="60" showdown="30" finish="18" />
+
+  <table name="Table1" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+  <table name="Table2" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+
+  <listen tcp="19480" />
+
+  <cashier acquire_timeout="5" pokerlock_queue_timeout="30" user_create="yes" />
+  <database name="pokernetworktest" host="@MYSQL_TEST_DBHOST@" user="pokernetworktest" password="pokernetwork"
+            root_user="@MYSQL_TEST_DBROOT@" root_password="@MYSQL_TEST_DBROOT_PASSWORD@" schema="@srcdir@/../../database/schema.sql" command="@MYSQL@" />
+  <path>@POKER_ENGINE_PKGSYSCONFDIR@ @POKER_NETWORK_PKGSYSCONFDIR@</path>
+  <users temporary="BOT"/>
+  <auth script="@srcdir@/test-pokerauth/pokerauth.py" />
+</server>
+"""
+
+class PokerAuthTestCase(unittest.TestCase):
+        
+    # -----------------------------------------------------------------------------------------------------
+    def setUp(self):
+        pass
+    
+    # -----------------------------------------------------------------------------------------------------    
+    def tearDown(self):
+        pokerauth._get_auth_instance = None
+        
+    # -----------------------------------------------------------------------------------------------------    
+    def test01_Init(self):
+        """Test Poker auth : get_auth_instance"""
+        db = None
+        settings = pokernetworkconfig.Config([])
+        settings.doc = libxml2.parseMemory(settings_xml, len(settings_xml))
+        settings.header = settings.doc.xpathNewContext()
+        auth = pokerauth.get_auth_instance(db, settings)
+        
+    # -----------------------------------------------------------------------------------------------------    
+    def test02_AlternatePokerAuth(self):
+        """Test Poker auth : get_auth_instance alternate PokerAuth"""
+        db = None
+        settings = pokernetworkconfig.Config([])
+        settings.doc = libxml2.parseMemory(settings_alternate_xml, len(settings_alternate_xml))
+        settings.header = settings.doc.xpathNewContext()
+        auth = pokerauth.get_auth_instance(db, settings)
+        self.failUnless(hasattr(auth, 'gotcha'))
+
+settings_mysql_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
+<server verbose="6" ping="300000" autodeal="yes" simultaneous="4" chat="yes" >
+  <delays autodeal="18" round="12" position="60" showdown="30" finish="18" />
+
+  <table name="Table1" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+  <table name="Table2" variant="holdem" betting_structure="100-200-no-limit" seats="10" player_timeout="60" currency_serial="1" />
+
+  <listen tcp="19480" />
+
+  <cashier acquire_timeout="5" pokerlock_queue_timeout="30" user_create="yes" />
+  <database name="pokernetworktest" host="@MYSQL_TEST_DBHOST@" user="pokernetworktest" password="pokernetwork"
+            root_user="@MYSQL_TEST_DBROOT@" root_password="@MYSQL_TEST_DBROOT_PASSWORD@" schema="@srcdir@/../../database/schema.sql" command="@MYSQL@" />
+  <path>@POKER_ENGINE_PKGSYSCONFDIR@ @POKER_NETWORK_PKGSYSCONFDIR@</path>
+  <users temporary="BOT"/>
+  <auth script="@srcdir@/../pokernetwork/pokerauthmysql.py" host="@MYSQL_TEST_DBHOST@" user="@MYSQL_TEST_DBROOT@" password="@MYSQL_TEST_DBROOT_PASSWORD@" db="testpokerauthmysql" table="users"/>
+</server>
+"""
+
+import MySQLdb
+
+class PokerAuthMysqlTestCase(unittest.TestCase):
+        
+    # -----------------------------------------------------------------------------------------------------
+    def setUp(self):
+        self.settings = pokernetworkconfig.Config([])
+        self.settings.doc = libxml2.parseMemory(settings_mysql_xml, len(settings_mysql_xml))
+        self.settings.header = self.settings.doc.xpathNewContext()
+
+        self.parameters = self.settings.headerGetProperties("/server/auth")[0]
+        self.auth_db = MySQLdb.connect(host = self.parameters["host"],
+                                  port = int(self.parameters.get("port", '3306')),
+                                  user = self.parameters["user"],
+                                  passwd = self.parameters["password"])
+        self.auth_db.query("CREATE DATABASE %s" % self.parameters["db"])
+        self.auth_db.query("USE %s" % self.parameters["db"])
+        self.auth_db.query("CREATE TABLE %s (username varchar(20), password varchar(20), privilege int)" % self.parameters["table"])
+        self.auth_db.query("INSERT INTO users (username, password, privilege) VALUES ('testuser', 'testpassword', %i)" % User.REGULAR)
+        
+
+    # -----------------------------------------------------------------------------------------------------    
+    def tearDown(self):
+        self.auth_db.query("DROP DATABASE %s" % self.parameters["db"])
+        pokerauth._get_auth_instance = None
+        
+    # -----------------------------------------------------------------------------------------------------    
+    def test01(self):
+        """Test Poker mysql auth : get_auth_instance"""
+        db = None
+        auth = pokerauth.get_auth_instance(db, self.settings)
+        result, message = auth.auth("testuser", "testpassword")
+        self.assertNotEquals(False, result)
+                
+# -----------------------------------------------------------------------------------------------------
+def GetTestSuite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(PokerAuthTestCase))
+    suite.addTest(unittest.makeSuite(PokerAuthMysqlTestCase))
+    return suite
+    
+# -----------------------------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------------------------------
+def Run(verbose):
+    return unittest.TextTestRunner(verbosity=verbose).run(GetTestSuite())
+    
+# -----------------------------------------------------------------------------------------------------
+if __name__ == '__main__':
+    if Run(int(os.environ.get('VERBOSE_T', 2))).wasSuccessful():
+        sys.exit(0)
+    else:
+        sys.exit(1)
+
+# Interpreted by emacs
+# Local Variables:
+# compile-command: "( cd .. ; ./config.status tests/test-pokerauth.py ) ; ( cd ../tests ; make COVERAGE_FILES='../pokernetwork/pokerauth.py' TESTS='coverage-reset test-pokerauth.py coverage-report' check )"
+# End:
Index: configure.ac
===================================================================
--- configure.ac	(revision 4062)
+++ configure.ac	(working copy)
@@ -329,6 +329,7 @@
         tests/test-pokerpackets.py
         tests/test-pokerclientpackets.py
         tests/test-pokerservice.py
+        tests/test-pokerauth.py
         tests/test-pokertable.py
         tests/test-string.py
         tests/test-pokerchildren.py
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 4062)
+++ Makefile.am	(working copy)
@@ -63,7 +63,8 @@
 	upgrades/poker.server/1.0.13-1.0.14.xsl \
 	upgrades/poker.server/1.0.14-1.0.15.xsl \
 	upgrades/poker.server/1.0.30-1.0.31.xsl \
-	upgrades/poker.server/1.0.31-1.0.32.xsl
+	upgrades/poker.server/1.0.31-1.0.32.xsl \
+	upgrades/poker.server/1.6.0-1.7.0.xsl
 
 pokernetworkdir = ${pythondir}/pokernetwork
 pokernetwork_PYTHON = \
@@ -87,6 +88,8 @@
 	pokernetwork/pokerpackets.py \
 	pokernetwork/pokerserver.py \
 	pokernetwork/pokerservice.py \
+	pokernetwork/pokerauth.py \
+	pokernetwork/pokerauthmysql.py \
 	pokernetwork/pokertable.py \
 	pokernetwork/protocol.py \
 	pokernetwork/proxy.py \
Index: upgrades/poker.server/1.6.0-1.7.0.xsl
===================================================================
--- upgrades/poker.server/1.6.0-1.7.0.xsl	(revision 0)
+++ upgrades/poker.server/1.6.0-1.7.0.xsl	(revision 0)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+
+ <xsl:preserve-space elements="*" />
+ <xsl:output method="xml" indent="yes"
+	     encoding="ISO-8859-1"
+ />
+
+ <xsl:template match="/server/listen">
+  <xsl:copy>
+   <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+  <xsl:comment>
+    <![CDATA[
+    <auth script="/usr/local/share/poker-network/pokerauth.py"/>
+    ]]>
+  </xsl:comment>
+ </xsl:template>
+
+ <!-- copy the rest verbatim -->
+ <xsl:template match="@*|node()">
+  <xsl:copy>
+   <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to