projects
/
ngircd-alex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d9e3f83
)
- fixed user mode propagation over server-links (IRC operator, away, ...)
author
Alexander Barton
<alex@barton.de>
Wed, 18 Dec 2002 14:16:21 +0000
(14:16 +0000)
committer
Alexander Barton
<alex@barton.de>
Wed, 18 Dec 2002 14:16:21 +0000
(14:16 +0000)
src/ngircd/irc-mode.c
patch
|
blob
|
history
diff --git
a/src/ngircd/irc-mode.c
b/src/ngircd/irc-mode.c
index 148698ac48096ab562fb28f393e9eaea968e53d6..05664949a6a968283b1df72b18cbda7796cf42f2 100644
(file)
--- a/
src/ngircd/irc-mode.c
+++ b/
src/ngircd/irc-mode.c
@@
-14,7
+14,7
@@
#include "portab.h"
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.2
3 2002/12/16 23:06:46
alex Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.2
4 2002/12/18 14:16:21
alex Exp $";
#include "imp.h"
#include <assert.h>
#include "imp.h"
#include <assert.h>
@@
-154,13
+154,18
@@
Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
x[0] = '\0';
switch( *mode_ptr )
{
x[0] = '\0';
switch( *mode_ptr )
{
+ case 'a':
+ /* Away */
+ if( Client_Type( Client ) == CLIENT_SERVER ) x[0] = 'a';
+ else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin ));
+ break;
case 'i':
/* Invisible */
x[0] = 'i';
break;
case 'o':
/* IRC operator (only unsetable!) */
case 'i':
/* Invisible */
x[0] = 'i';
break;
case 'o':
/* IRC operator (only unsetable!) */
- if(
! set
)
+ if(
( ! set ) || ( Client_Type( Client ) == CLIENT_SERVER )
)
{
Client_SetOperByMe( Target, FALSE );
x[0] = 'o';
{
Client_SetOperByMe( Target, FALSE );
x[0] = 'o';
@@
-169,7
+174,7
@@
Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
break;
case 'r':
/* Restricted (only setable) */
break;
case 'r':
/* Restricted (only setable) */
- if(
set
) x[0] = 'r';
+ if(
( set ) || ( Client_Type( Client ) == CLIENT_SERVER )
) x[0] = 'r';
else ok = IRC_WriteStrClient( Origin, ERR_RESTRICTED_MSG, Client_ID( Origin ));
break;
case 's':
else ok = IRC_WriteStrClient( Origin, ERR_RESTRICTED_MSG, Client_ID( Origin ));
break;
case 's':