Difference for server/c_chat.c from version 1.17 to 1.18


version 1.17 version 1.18
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_chat_c =   * static char *rcsid_c_chat_c =
  *   "$Id: c_chat.c,v 1.17 2003/11/07 19:54:49 ryo_saeba Exp $";   *   "$Id: c_chat.c,v 1.18 2004/11/09 07:44:24 mwedel Exp $";
  */   */
   
 /*  /*
Line 97
 
Line 97
     return 0;      return 0;
 }  }
   
 int command_shout (object *op, char *params)  static int command_tell_all(object *op, char *params, int pri, int color, char *desc)
 {  {
     int evtid;      int evtid;
     CFParm CFP;      CFParm CFP;
   
  if (op->contr->no_shout == 1){   if (op->contr->no_shout == 1){
  new_draw_info(NDI_UNIQUE, 0,op,"You are no longer allowed to shout.");   new_draw_info(NDI_UNIQUE, 0,op,"You are no longer allowed to shout or chat.");
  return 1;   return 1;
  }else{   }else{
    
     if (params == NULL) {      if (params == NULL) {
  new_draw_info(NDI_UNIQUE, 0,op,"Shout what?");       new_draw_info(NDI_UNIQUE, 0,op,"Shout/Chat what?");
  return 1;   return 1;
     }      }
     new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_RED, 1, NULL,    new_draw_info_format(NDI_UNIQUE | NDI_ALL | color, pri, NULL,
  "%s shouts: %s", op->name, params);   "%s %s: %s", op->name, desc, params);
   
     /* GROS : Here we handle the SHOUT global event */      /* GROS : Here we handle the SHOUT global event */
     evtid = EVENT_SHOUT;      evtid = EVENT_SHOUT;
     CFP.Value[0] = (void *)(&evtid);      CFP.Value[0] = (void *)(&evtid);
     CFP.Value[1] = (void *)(op);      CFP.Value[1] = (void *)(op);
     CFP.Value[2] = (void *)(params);      CFP.Value[2] = (void *)(params);
    /* Pass in priority - not sure if the plugin can use it or not */
    CFP.Value[3] = (void *)(&pri);
     GlobalEvent(&CFP);      GlobalEvent(&CFP);
     return 1;      return 1;
  }   }
 }  }
   
   int command_shout (object *op, char *params)
   {
       return command_tell_all(op, params, 1, NDI_RED, "shouts");
   }
   
   int command_chat (object *op, char *params)
   {
       return command_tell_all(op, params, 9, NDI_BLUE, "chats");
   }
   
   
   
 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;


Legend:
line(s) removed in v.1.17 
line(s) changed
 line(s) added in v.1.18

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