[Twisted-Python] Adding pb users online

Martin Stenhård stenis at stenhard.net
Wed Jan 14 17:29:42 EST 2004


I have the below code for my server with pb authentications. And that’s
works fine clients can login and do CallRemote. The clients can also login
as an anonymous users to add them self to users database that are stored in
a MySQL table. My question is how do I reload my users using registerChecker
with out stopping the server? So that the current online users don't lose
there connections.

c = checkers.InMemoryUsernamePasswordDatabaseDontUse()
# users comes from a SQL db
for user in users: 
       print "User  Password  Email Status  Disable Lastlogin"
       print user.username," ",user.password," ",user.email,"
",user.status," ",user.disable," ",
       print time.ctime(user.lastlogin)        
realm =MyRealm()
realm.server = GameServer()
p = portal.Portal(realm)    
reactor.listenTCP(8800, pb.PBServerFactory(p))


More information about the Twisted-Python mailing list