about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2005-08-29 10:58:00 +0000
committerAlexander Barton <alex@barton.de>2005-08-29 10:58:00 +0000
commita2e4eb5aafee30a3df32472454dedd2707ca1b2c (patch)
tree0f63cbb702fa5262ed479441bcd3ea4815bb4eb4 /src
parent58b8fb5d12bdbcc4f1893654149b555b5d0f44fa (diff)
downloadngircd-a2e4eb5aafee30a3df32472454dedd2707ca1b2c.tar.gz
ngircd-a2e4eb5aafee30a3df32472454dedd2707ca1b2c.zip
Fixed server NOTICEs to users with "s" mode ("server messages").
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/log.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/ngircd/log.c b/src/ngircd/log.c
index e00c7ce7..a29c4015 100644
--- a/src/ngircd/log.c
+++ b/src/ngircd/log.c
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2005 Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: log.c,v 1.58 2005/07/31 20:13:08 alex Exp $";
+static char UNUSED id[] = "$Id: log.c,v 1.59 2005/08/29 10:58:00 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -302,19 +302,23 @@ va_dcl
 } /* Log_Resolver */
 
 
+/**
+ * Send log messages to users flagged with the "s" mode.
+ * @param Msg The message to send.
+ */
 static void
 Wall_ServerNotice( char *Msg )
 {
-	/* Server-Notice an entsprechende User verschicken */
-
 	CLIENT *c;
 
 	assert( Msg != NULL );
 
 	c = Client_First( );
-	while( c )
-	{
-		if(( Client_Conn( c ) > NONE ) && ( Client_HasMode( c, 's' ))) IRC_WriteStrClient( c, "NOTICE %s :%s%s", Client_ThisServer( ), NOTICE_TXTPREFIX, Msg );
+	while(c) {
+		if (Client_Conn(c) > NONE && Client_HasMode(c, 's'))
+			IRC_WriteStrClient(c, "NOTICE %s :%s%s", Client_ID(c),
+							NOTICE_TXTPREFIX, Msg);
+
 		c = Client_Next( c );
 	}
 } /* Wall_ServerNotice */