if ( cmd == "changepass" )
{
if (!text) PrivMessage( player, "Correct syntax: /changepass <new password>" );
else
{
QuerySQL( sqliteDB, "UPDATE hujia SET hujiaPassword='" + ::SHA256( text.tolower() ) + "' WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
MessagePlayer("You have successfully changed your password to " + text, player );
}
}
I get the message that i have successfully changed my password, but it didn't get changed
Firstly, Why do you use :: for SHA256? There's no need of using it.
Secondly, Why do you insert the password as .tolower() form?
Try using the following command. it should be working fine.
if ( cmd == "changepass" )
{
if (!text) PrivMessage( player, "Correct syntax: /changepass <new password>" );
else
{
QuerySQL( sqliteDB, "UPDATE hujia SET hujiaPassword='" + SHA256( text ) + "' WHERE Name='" + player.Name + "'" );
MessagePlayer("You have successfully changed your password to " + text, player );
}
}