Difference for server/c_chat.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_chat_c =   * static char *rcsid_c_chat_c =
  *   "$Id: c_chat.c,v 1.5 2001/10/07 06:48:53 garbled Exp $";   *   "$Id: c_chat.c,v 1.6 2001/10/14 07:57:14 gros Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 51
 
Line 51
 int command_shout (object *op, char *params)  int command_shout (object *op, char *params)
 {  {
     char buf[MAX_BUF];      char buf[MAX_BUF];
   #ifdef PLUGINS
       int evtid;
       CFParm CFP;
   #endif
     if (params == NULL) {      if (params == NULL) {
  new_draw_info(NDI_UNIQUE, 0,op,"Shout what?");   new_draw_info(NDI_UNIQUE, 0,op,"Shout what?");
  return 1;   return 1;
Line 60
 
Line 64
     strncat(buf, params, MAX_BUF-30);      strncat(buf, params, MAX_BUF-30);
     buf[MAX_BUF - 30] = '\0';      buf[MAX_BUF - 30] = '\0';
     new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_RED, 1, NULL, buf);      new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_RED, 1, NULL, buf);
   #ifdef PLUGINS
       /* GROS : Here we handle the SHOUT global event */
       evtid = EVENT_SHOUT;
       CFP.Value[0] = (void *)(&evtid);
       CFP.Value[1] = (void *)(op);
       CFP.Value[2] = (void *)(params);
       GlobalEvent(&CFP);
   #endif
     return 1;      return 1;
 }  }
   
 int command_tell (object *op, char *params)  int command_tell (object *op, char *params)
 {  {
     char buf[MAX_BUF],*name = NULL ,*msg = NULL;      char buf[MAX_BUF],*name = NULL ,*msg = NULL;
       char buf2[MAX_BUF];
     player *pl;      player *pl;
     if ( params != NULL){      if ( params != NULL){
         name = params;          name = params;
Line 86
 
Line 99
  return 1;   return 1;
     }      }
   
   
     sprintf(buf,"%s tells you:",op->name);      sprintf(buf,"%s tells you:",op->name);
     strncat(buf, msg, MAX_BUF-strlen(buf)-1);      strncat(buf, msg, MAX_BUF-strlen(buf)-1);
     buf[MAX_BUF-1]=0;      buf[MAX_BUF-1]=0;
Line 94
 
Line 106
     for(pl=first_player;pl!=NULL;pl=pl->next)      for(pl=first_player;pl!=NULL;pl=pl->next)
       if(strncasecmp(pl->ob->name,name,MAX_NAME)==0)        if(strncasecmp(pl->ob->name,name,MAX_NAME)==0)
       {        {
  new_draw_info(NDI_UNIQUE | NDI_WHITE, 0, pl->ob, buf);          new_draw_info(NDI_UNIQUE | NDI_ORANGE, 0, pl->ob, buf);
           sprintf(buf2, "You tell to %s: %s",name,msg);
           new_draw_info(NDI_UNIQUE | NDI_ORANGE, 0, op, buf2);
         return 1;          return 1;
       }        }
     new_draw_info(NDI_UNIQUE, 0,op,"No such player.");      new_draw_info(NDI_UNIQUE, 0,op,"No such player.");
     return 1;      return 1;
   }    }
   
   
 /*  /*
  * This function covers basic emotions a player can have.  An emotion can be   * This function covers basic emotions a player can have.  An emotion can be
  * one of three things currently.  Directed at oneself, directed at someone,   * one of three things currently.  Directed at oneself, directed at someone,


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:26