[wpdev-commits] xmlscripts/scripts/commands account.py,1.2,1.3
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-07-08 23:24:25
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8092 Modified Files: account.py Log Message: Fix Index: account.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/account.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** account.py 8 Jul 2004 23:11:51 -0000 1.2 --- account.py 8 Jul 2004 23:24:16 -0000 1.3 *************** *** 131,139 **** account = wolfpack.accounts.find( username ) if account: ! socket.sysmessage( "An account with this name already exists!" ) return False # Create the Account elif not account: ! wolfpack.accounts.add( username, password ) socket.sysmessage( "You created the account successfully!" ) char.log( LOG_MESSAGE, "0x%x created account: %s\n" % ( char.serial, username ) ) --- 131,140 ---- account = wolfpack.accounts.find( username ) if account: ! socket.sysmessage( "Error: Account %s exists!" % username ) return False # Create the Account elif not account: ! newaccount = wolfpack.accounts.add( username, password ) ! newaccount.acl = 'player' socket.sysmessage( "You created the account successfully!" ) char.log( LOG_MESSAGE, "0x%x created account: %s\n" % ( char.serial, username ) ) *************** *** 141,145 **** # Failure else: ! socket.sysmessage( "Account creation failed!" ) return True --- 142,146 ---- # Failure else: ! socket.sysmessage( "Error: Account creation failed!" ) return True *************** *** 147,161 **** def accountShow( socket, username, key ): char = socket.player ! characcount = wolfpack.accounts.find( char.account ) ! key = key.lower() # Usernames are limited to 16 characters in length ! if len( username ) > 16: ! socket.sysmessage( "The given username exceeds the 16 character limit!" ) ! return True # Find the account else: account = wolfpack.accounts.find( username ) if account: ! # if account.rank >= characcount.rank: return False --- 148,164 ---- def accountShow( socket, username, key ): char = socket.player ! characcount = wolfpack.accounts.find( char.account.name ) # Usernames are limited to 16 characters in length ! if len( username ) > 16 or len( username ) == 0: ! if len( username ) > 16: ! socket.sysmessage( "Error: Username exceeds the 16 character limit!" ) ! if len( username ) == 0: ! socket.sysmessage( "Error: Username is NULL!" ) ! return False # Find the account else: account = wolfpack.accounts.find( username ) if account: ! # Rank Checking if account.rank >= characcount.rank: return False |