Update of /cvsroot/wpdev/xmlscripts/scripts/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5541/scripts/commands
Modified Files:
__init__.py email.py password.py
Log Message:
- Fixed email command and cleaned up password command.
- Added encryption for some clients above 3.0.5 that were missing
Index: password.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/password.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** password.py 17 Jul 2004 12:56:22 -0000 1.3
--- password.py 24 Aug 2004 20:13:22 -0000 1.4
***************
*** 19,41 ****
# Handles the password command
def commandPassword( socket, cmd, args ):
- account = None
- password = None
char = socket.player
! args = args.strip()
account = wolfpack.accounts.find( char.account.name )
! password = str( args )
if len( password ) == 0:
socket.sysmessage( "Usage: password <newpassword>" )
return False
! elif len( password ) > 0:
! if len( password ) > 16:
! socket.sysmessage( "Your password can have a maximum of 16 characters." )
! return False
! else:
! account.password = str( password )
! socket.sysmessage( "Your password has been changed." )
! char.log( LOG_MESSAGE, "Account %s changed their password.\n" % char.serial )
! return True
! else:
! socket.sysmessage( "Usage: password <newpassword>" )
return False
--- 19,35 ----
# Handles the password command
def commandPassword( socket, cmd, args ):
char = socket.player
! password = str( args.strip() )
account = wolfpack.accounts.find( char.account.name )
!
if len( password ) == 0:
socket.sysmessage( "Usage: password <newpassword>" )
return False
! elif len( password ) > 16:
! socket.sysmessage( "Your password can have a maximum of 16 characters." )
return False
+
+ account.password = str( password )
+ socket.sysmessage( "Your password has been changed." )
+ char.log( LOG_MESSAGE, "Account %s changed their password.\n" % char.serial )
+ return True
Index: __init__.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/__init__.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** __init__.py 27 Jun 2004 11:48:28 -0000 1.14
--- __init__.py 24 Aug 2004 20:13:22 -0000 1.15
***************
*** 90,95 ****
def nightsight(socket, command, arguments):
player = socket.player
! if player.hastag( 'magic.nightsight'):
! player.removeevent('magic.nightsight')
if player.hastag('nightsight'):
--- 90,94 ----
def nightsight(socket, command, arguments):
player = socket.player
! player.removeevent('magic.nightsight')
if player.hastag('nightsight'):
Index: email.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/email.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** email.py 23 Aug 2004 03:10:39 -0000 1.1
--- email.py 24 Aug 2004 20:13:22 -0000 1.2
***************
*** 17,37 ****
return
! # Handles the password command
def commandEmail( socket, cmd, args ):
- account = None
- password = None
char = socket.player
- args = args.strip()
account = wolfpack.accounts.find( char.account.name )
! email = str( args )
! if len( email ) == 0 or len( email ) > 255:
! if len( email ) > 0:
! socket.sysmessage( "Usage: email <newemail>" )
! elif len( password ) > 255:
! socket.sysmessage( "Your email can have a maximum of 255 characters." )
return False
! else:
! account.email = str( email )
! socket.sysmessage( "Your email has been changed." )
! char.log( LOG_MESSAGE, "Account %s changed their email.\n" % account.name )
! return True
--- 17,35 ----
return
! # Handles the email command
def commandEmail( socket, cmd, args ):
char = socket.player
account = wolfpack.accounts.find( char.account.name )
! email = str( args.strip() )
!
! if len( email ) == 0
! socket.sysmessage( "Usage: email <new email>" )
return False
! elif len( email ) > 255:
! socket.sysmessage( "Your email can have a maximum of 255 characters." )
! return False
!
! account.email = str( email )
! socket.sysmessage( "Your email has been changed." )
! char.log( LOG_MESSAGE, "Account %s changed their email.\n" % account.name )
! return True
|