]> jfr.im git - irc/gameservirc.git/commitdiff
Fixed some bugs
authorkainazzzo <redacted>
Tue, 6 Apr 2004 02:53:55 +0000 (02:53 +0000)
committerkainazzzo <redacted>
Tue, 6 Apr 2004 02:53:55 +0000 (02:53 +0000)
git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@150 bc333340-6410-0410-a689-9d09f3c113fa

gameserv/Changes
gameserv/TODO
gameserv/gameserv.cpp
gameserv/player.cpp
gameserv/tcpclient.cpp

index 0cb5184a8554bd14c34f68157353aedd458226af..a1073f7121f70c318d1a1365482986e486161048 100644 (file)
@@ -1,4 +1,8 @@
 Version 1.2.0
+* Fixed a bug that was causing players not to be voiced on the forest 
+    channel on P10 servers - kain
+* Added a missing code segment to subtract 1 from the player fights per 
+    day when you fight another player (reported by MaCbLiNd) - kain
 * Fixed a bug that allowed the same player name to be registered any 
     number of times - kain
 * Fixed a problem in when players quit on a P10 server, the /msg 
index b7d4804852e1913b13a5ccd07ee3ee6dfe60cf4d..06329f668a8eb5b47698076df6bd261fa6f47492 100644 (file)
@@ -2,6 +2,8 @@
 - = Started
 X = Finsihed
 
+* Fix bug that doesn't decrease player fights
+
 * Deal with cheaters who create additional characters, fight with them a bit,
   then kill them to get their gold.  Maybe add level restrictions to fighting
   other players?
@@ -53,7 +55,7 @@ X = Finsihed
 
 * Make a logout command
 
-* make it so you can't register two of the same player names
+X make it so you can't register two of the same player names
 
 X Option for including a config file as a runtime parameter for running
     Multiple instances of GameServ on different networks.
index 485937c8504b9ea383c6ab19e2808bae55b9b198..ea8d6fff213fed79b840da3d3c6ed768ee2e1047 100644 (file)
@@ -1050,6 +1050,8 @@ void do_fight(char *u)
        clearYourTurn(battle->stats);
 
        // Initiate Battle sequence!
+       battle->stats->player_fights -= 1;
+
         notice(s_GameServ, u, "You challenge %s to an online duel!", battle->stats->name);
         notice(s_GameServ, battle->getNick(), "%s has challenged you to an online duel!", ni->stats->name);
         notice(s_GameServ, battle->getNick(), "%s gets to go first "\
index c9f219580b91b4b4d8e59ec796269a612c282dfe..39f81468bf53cdff9784efb994c41fcb00734d45 100644 (file)
@@ -58,7 +58,9 @@ Player::Player(char *n)
 
     strcpy(name, n);
 
-    log("New Player: %s", name);
+    #ifdef DEBUGMODE
+       log("New Player: %s", name);
+    #endif
 }
 
 Player::~Player()
@@ -122,7 +124,9 @@ void Player::setData(Player *right)
        sprintf(name, "Player%d", num);
     }
 
-    log("Setting Player data for %s", name);
+    #ifdef DEBUGMODE
+       log("Setting Player data for %s", name);
+    #endif
 }
 
 monster_::~monster_()
index 0e96bb189340ead1c392965c382c9b9bcc0a8ab9..69d5dd768fa523e884102b4bac66595a7c772843 100644 (file)
@@ -361,11 +361,39 @@ int main(int argc, char *argv[])
            else if (stricmp(dest, c_Forest) == 0)
                forest(source, rest);
       #endif
+      #if defined(P10)
+       } else if (stricmp(cmd, "J") == 0) {
+      #else
        } else if (stricmp(cmd, "JOIN") == 0) {
+      #endif
            char *channel;
+           aClient *joiner;
            channel = strtok(NULL, " ");
-           if (stricmp(channel, c_Forest) == 0 && is_playing(source + 1))
-               raw(":%S MODE %s +v %s", c_Forest, (source + 1));
+
+            char z = source[0];
+
+            if (z == ':')
+                source++;
+
+           joiner = find(source);
+
+           if (stricmp(channel, c_Forest) == 0 && is_playing(joiner))
+           {
+               #ifdef DEBUGMODE
+                   log("Player %s (IRC: %s) joined %s", 
+                       joiner->stats->name, 
+                       #ifdef P10
+                           joiner->getRealNick(),
+                       #else
+                           joiner->getNick(),
+                       #endif
+                       c_Forest);
+               #endif
+               raw(":%S MODE %s +v %s", c_Forest, (source));
+           }
+
+           if (z == ':')
+               source--;
 
        #if defined(BAHAMUT)
        } else if (stricmp(cmd, "SJOIN") == 0) {