From: Digital X. <dig...@us...> - 2007-03-03 00:43:49
|
Update of /cvsroot/openrpg/openrpg1/orpg/chat In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20649/orpg/chat Modified Files: commands.py Log Message: Added ability to ban by IP even if the player is not connected Index: commands.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/chat/commands.py,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** commands.py 27 Feb 2007 03:05:17 -0000 1.77 --- commands.py 3 Mar 2007 00:43:46 -0000 1.78 *************** *** 657,664 **** elif args[0] == "ban": ! #remove a group from the server and drop all players within the group msg = msgbase + ' cmd="ban" bid="' + str(args[1]) + '" />' self.session.outbox.put(msg) elif args[0] == "unban": #remove a group from the server and drop all players within the group --- 657,673 ---- elif args[0] == "ban": ! #Ban a player from the server msg = msgbase + ' cmd="ban" bid="' + str(args[1]) + '" />' self.session.outbox.put(msg) + elif args[0] == "banip": + #Ban a player from the server + try: + bname = str(args[2]) + except: + bname = 'Unknown' + msg = msgbase + ' cmd="banip" bip="' + str(args[1]) + '" bname="' + bname + '"/>' + self.session.outbox.put(msg) + elif args[0] == "unban": #remove a group from the server and drop all players within the group |