[CF-Devel] Path: party gsay improvment

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sun Jun 6 03:09:51 CDT 2004


Hello.

Katia/Karla can't easily access the net lately, so she asked me to 
send a patch for her.

It's some tweaks for the 'gsay' command.

Looks fine to me, i'd have committed it but she seems to prefer 
sending it to mailing list for approval, so here it is :)

Nicolas
-------------- next part --------------
Index: server/c_party.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/server/c_party.c,v
retrieving revision 1.6
diff -u -r1.6 c_party.c
--- server/c_party.c	13 Sep 2003 05:02:08 -0000	1.6
+++ server/c_party.c	6 Jun 2004 08:06:38 -0000
@@ -156,7 +156,7 @@
   int no=op->contr->party_number;
   for(pl=first_player;pl!=NULL;pl=pl->next)
     if(pl->ob->contr->party_number==no && pl->ob!=op)
-	new_draw_info(NDI_UNIQUE, NDI_WHITE, pl->ob, msg);
+	new_draw_info_format(NDI_WHITE, 0, pl->ob, msg);
 }
 
 int command_gsay(object *op, char *params)
@@ -255,17 +255,18 @@
 #endif /* PARTY_KILL_LOG */
   if(strncmp(params, "say ", 4)==0)
     {
-          if(op->contr->party_number<=0)
+         if(op->contr->party_number<=0)
             {
               new_draw_info(NDI_UNIQUE, 0,op,"You are not a member of any party.");
               return 1;
             }
-      params += 4;
-      sprintf(buf, "%s says: %s", op->name, params);
-          send_party_message(op,buf);
-          new_draw_info(NDI_UNIQUE, 0,op,"Ok.");
-          return 1;
-        }
+         params += 4;
+         currentparty = find_party(op->contr->party_number,firstparty);
+         snprintf(buf,MAX_BUF-1, "[%s] %s says: %s", currentparty, op->name, params);
+         send_party_message(op,buf);
+         new_draw_info_format(NDI_WHITE, 0,op,"[%s] You say: %s", currentparty, params);
+         return 1;
+    }
 
   if(strncmp(params, "form ",5) == 0) {
 
-------------- next part --------------
_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list