Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Bugs

Archive::Bugs Archive area for Bugs's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2002, 06:29 AM
kabalah
Fire Beetle
 
Join Date: Nov 2002
Location: Los Gatos, Ca
Posts: 27
Default fix for net.cpp

hi, i've noticed the command:

world adduser userx passx 1

no longer works. it seems the placment of the check for disablecommandline setting in the table variables has disabled the testing for the adduser command.

if (argc >= 2) {
char tmp[2];
if (strcasecmp(argv[1], "help") == 0 || strcasecmp(argv[1], "?") == 0 || strcasecmp(argv[1], "/?") == 0 || strcasecmp(argv[1], "-?") == 0 || strcasecmp(argv[1], "-h") == 0 || strcasecmp(argv[1], "- help") == 0) {
cout << "Worldserver command line commands:" << endl;
cout << "adduser username password flag - adds a user account" << endl;
cout << "flag username flag - sets GM flag on the account" << endl;
cout << "startzone zoneshortname - sets the starting zone" << endl;
cout << "-holdzones - reboots lost zones" << endl;
return 0;
}
else if (strcasecmp(argv[1], "-holdzones") == 0) {
cout << "Reboot Zones mode ON" << endl;
holdzones = true;
}
else if (database.GetVariable("disablecommandline", tmp, 2)) {
if (strlen(tmp) == 1) {
if (tmp[0] == '1') {
cout << "Command line disabled in database... exiting" << endl;
return 0;
}
}
}

else if (strcasecmp(argv[1], "adduser") == 0) {
if (argc == 5) {
if (Seperator::IsNumber(argv[4])) {

if the value is set to 1 the code returns 0. but if the value is set to 0 the code falls out of the if/else if statement and never processes the adduser test. it seems that the test of the disablecommandline variable should be a separate test before the main if/else if testing occurs. that way you wouldn't even get the help text if you had turned on the disablecommandline variable.

kabalah
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:59 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3