I'm currently running a python game server based on Twisted's framework. It's a simple socket server that allows users to connect and play games with each other. Anyway, the main functions for each user (like grabbing a user's info, getting their friends, sending messages, etc) are all within the user class (LineReceiver). Occasionally, whenever a new function is created and tested to work fine, a user might find an issue with it or abuse it. That would mean I have to fix it quickly (not the issue here, I can do that fine) and then restart the whole server, which has around ~300 users connected and playing at once. That would mean they all had to re-login at one time, causing lag and a hard time for the server. Is there anyway I could update the function that has the issue (for example SetUserScore (score)) and not have to restart the server? All of the users information is stored in the user class as well.
I was thinking I could possibly move functions to a separate class and just store all individual user information, (display name, current game id, etc) in the user class. The separate class could then be reloaded upon the command of a game admin and then the user class would start using the new function every time it calls a function from there? Would this work?