]> code.citadel.org Git - citadel.git/commitdiff
* citserver.c: MESG command can now send a different system message based
authorMichael Hampton <io_error@uncensored.citadel.org>
Sat, 15 Jun 2002 17:53:59 +0000 (17:53 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sat, 15 Jun 2002 17:53:59 +0000 (17:53 +0000)
  on the developer and client ID of the connected client

citadel/ChangeLog
citadel/citserver.c

index f94f86845e4361e531dffc1e647317c3ee4dca9f..66d1033827acec50d73cb4913c76bcd69e9577d3 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 591.43  2002/06/15 17:53:59  error
+ * citserver.c: MESG command can now send a different system message based
+   on the developer and client ID of the connected client
+
  Revision 591.42  2002/06/15 04:52:26  ajc
  * SpamAssassin connector is now configurable in <.A>ide <S>ysconfig <I>nternet.
  * Allow more than one SA server (it'll try 'em all)
@@ -3725,4 +3729,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 322386d69c3e65b993d0d701178069def621ef1e..53f8066cc6788e25e17cdc840ce653dd517543aa 100644 (file)
@@ -505,20 +505,27 @@ void cmd_mesg(char *mname)
        FILE *mfp;
        char targ[SIZ];
        char buf[SIZ];
+       char buf2[SIZ];
        char *dirs[2];
 
        extract(buf,mname,0);
 
-
        dirs[0]=mallok(64);
        dirs[1]=mallok(64);
        strcpy(dirs[0],"messages");
        strcpy(dirs[1],"help");
-       mesg_locate(targ,sizeof targ,buf,2,(const char **)dirs);
+       snprintf(buf2, sizeof buf2, "%s.%d.%d", buf, CC->cs_clientdev, CC->cs_clienttyp);
+       mesg_locate(targ,sizeof targ,buf2,2,(const char **)dirs);
+       if (strlen(targ) == 0) {
+               snprintf(buf2, sizeof buf2, "%s.%d", buf, CC->cs_clientdev);
+               mesg_locate(targ,sizeof targ,buf2,2,(const char **)dirs);
+               if (strlen(targ) == 0) {
+                       mesg_locate(targ,sizeof targ,buf,2,(const char **)dirs);
+               }       
+       }
        phree(dirs[0]);
        phree(dirs[1]);
 
-
        if (strlen(targ)==0) {
                cprintf("%d '%s' not found.\n",ERROR,mname);
                return;