]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/c_forest.cpp
Added the welcome message and a welcome message delay.
[irc/gameservirc.git] / gameserv / c_forest.cpp
index 430f0751eaae5f71ab90120122cf030bb86a9e7a..e58effaf9e5a2d2c0d05a1f5f302ffba90a5fc72 100644 (file)
@@ -34,15 +34,19 @@ source--;
 void do_forest(char *u)
 {
     aClient *source;
-    char *cmd;
 
     int num = rand() % 12;
 
-    source = find(u);
 
-    if (!is_playing(u))
+    if (!(source = find(u)) || !source->stats)
     {
         notice(s_GameServ, u, "You must be playing the game to search the forest!");
+       return;
+    }
+    else if (!is_alive(source))
+    {
+       notice(s_GameServ, u, "You are dead. Wait until tomorrow to search the forest some more.");
+       return;
     }
     else 
     {
@@ -52,7 +56,7 @@ void do_forest(char *u)
                 "till tomorrow!");
             return;
         }
-        else if (isnt_fighting(u))
+        else if (!is_fighting(u))
         {
             Player *p = source->stats;
             p->forest_fights--;