chromecow
Visitor
|
Module question - 2008/03/27 06:00
I'm trying to modify the behavior of the server, specifically the function:
| Code: | def serverAddClientToRoom(self, client, room='', parentR=''):
|
From a module, is there any way to intercept the call to this function and replace it with my own function?
Currently, if a client asks to join a room, this function does two things that should, in my opinion, be in separate functions.
If the room exists, the client is added, which is what this function should do.
If the room does not exist, this function creates a room, and let's the client. This should be separated into a createRoom function, and the function should return an error id the player tries to join a non-existent room.
Breaking out these behaviors would be my first step in creating password protected rooms, which is where I'm headed with this.
|