From 0bebe112286ba1f05d14eb300ae5ec116dc78a73 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Fri, 22 Sep 2006 01:56:07 +0000 Subject: [PATCH] Delete obsolete and non-propagated user modes. src/hash.h (FLAGS_LOCOP): Delete. (FLAGS_SERVNOTICE): Delete. (FLAGS_HELPER): Delete. (IsServNotice): Delete. (IsHelperIrcu): Delete. src/opserv.c (cmd_whois): Remove IsServNotice() or IsHelperIrcu(). src/proto-bahamut.c (mod_usermode): Do not handle +O/+s/+h, we never see them. src/proto-p10.c (irc_user): Do not emit +s or +h, we never set them.. (mod_usermode): Do not handle +O/+s/+h, we never see them. git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-36 --- ChangeLog | 25 +++++++++++++++++++++++++ src/hash.h | 7 +------ src/opserv.c | 2 -- src/proto-bahamut.c | 4 ---- src/proto-p10.c | 7 ------- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index f44c8d2..bd3963b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,31 @@ # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3 # +2006-09-22 01:56:07 GMT Michael Poole patch-36 + + Summary: + Delete obsolete and non-propagated user modes. + Revision: + srvx--devo--1.3--patch-36 + + src/hash.h (FLAGS_LOCOP): Delete. + (FLAGS_SERVNOTICE): Delete. + (FLAGS_HELPER): Delete. + (IsServNotice): Delete. + (IsHelperIrcu): Delete. + + src/opserv.c (cmd_whois): Remove IsServNotice() or IsHelperIrcu(). + + src/proto-bahamut.c (mod_usermode): Do not handle +O/+s/+h, we never see them. + + src/proto-p10.c (irc_user): Do not emit +s or +h, we never set them.. + (mod_usermode): Do not handle +O/+s/+h, we never see them. + + modified files: + ChangeLog src/hash.h src/opserv.c src/proto-bahamut.c + src/proto-p10.c + + 2006-09-22 01:48:00 GMT Michael Poole patch-35 Summary: diff --git a/src/hash.h b/src/hash.h index 656926a..f002126 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,5 +1,5 @@ /* hash.h - IRC network state database - * Copyright 2000-2004 srvx Development Team + * Copyright 2000-2006 srvx Development Team * * This file is part of srvx. * @@ -46,14 +46,11 @@ #define MODE_REMOVE 0x80000000 #define FLAGS_OPER 0x0001 /* Operator +O */ -#define FLAGS_LOCOP 0x0002 /* Local operator +o */ #define FLAGS_INVISIBLE 0x0004 /* invisible +i */ #define FLAGS_WALLOP 0x0008 /* receives wallops +w */ -#define FLAGS_SERVNOTICE 0x0010 /* receives server notices +s */ #define FLAGS_DEAF 0x0020 /* deaf +d */ #define FLAGS_SERVICE 0x0040 /* cannot be kicked, killed or deoped +k */ #define FLAGS_GLOBAL 0x0080 /* receives global messages +g */ -#define FLAGS_HELPER 0x0100 /* (network?) helper +h */ #define FLAGS_PERSISTENT 0x0200 /* for reserved nicks, this isn't just one-shot */ #define FLAGS_GAGGED 0x0400 /* for gagged users */ #define FLAGS_AWAY 0x0800 /* for away users */ @@ -68,8 +65,6 @@ #define IsInvisible(x) ((x)->modes & FLAGS_INVISIBLE) #define IsGlobal(x) ((x)->modes & FLAGS_GLOBAL) #define IsWallOp(x) ((x)->modes & FLAGS_WALLOP) -#define IsServNotice(x) ((x)->modes & FLAGS_SERVNOTICE) -#define IsHelperIrcu(x) ((x)->modes & FLAGS_HELPER) #define IsGagged(x) ((x)->modes & FLAGS_GAGGED) #define IsPersistent(x) ((x)->modes & FLAGS_PERSISTENT) #define IsAway(x) ((x)->modes & FLAGS_AWAY) diff --git a/src/opserv.c b/src/opserv.c index ee7b6b8..7a768a8 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -1185,8 +1185,6 @@ static MODCMD_FUNC(cmd_whois) if (IsWallOp(target)) buffer[bpos++] = 'w'; if (IsOper(target)) buffer[bpos++] = 'o'; if (IsGlobal(target)) buffer[bpos++] = 'g'; - if (IsServNotice(target)) buffer[bpos++] = 's'; - if (IsHelperIrcu(target)) buffer[bpos++] = 'h'; if (IsService(target)) buffer[bpos++] = 'k'; if (IsDeaf(target)) buffer[bpos++] = 'd'; if (IsHiddenHost(target)) buffer[bpos++] = 'x'; diff --git a/src/proto-bahamut.c b/src/proto-bahamut.c index faa89fe..c135a00 100644 --- a/src/proto-bahamut.c +++ b/src/proto-bahamut.c @@ -242,7 +242,6 @@ irc_user(struct userNode *user) { if (IsInvisible(user)) modes[modelen++] = 'i'; if (IsWallOp(user)) modes[modelen++] = 'w'; if (IsService(user)) modes[modelen++] = 'k'; - if (IsServNotice(user)) modes[modelen++] = 's'; if (IsDeaf(user)) modes[modelen++] = 'd'; if (IsReggedNick(user)) modes[modelen++] = 'r'; if (IsGlobal(user)) modes[modelen++] = 'g'; @@ -1193,17 +1192,14 @@ void mod_usermode(struct userNode *user, const char *mode_change) { userList_remove(&curr_opers, user); } break; - case 'O': do_user_mode(FLAGS_LOCOP); break; case 'i': do_user_mode(FLAGS_INVISIBLE); if (add) invis_clients++; else invis_clients--; break; case 'w': do_user_mode(FLAGS_WALLOP); break; - case 's': do_user_mode(FLAGS_SERVNOTICE); break; case 'd': do_user_mode(FLAGS_DEAF); break; case 'r': do_user_mode(FLAGS_REGNICK); break; case 'k': do_user_mode(FLAGS_SERVICE); break; case 'g': do_user_mode(FLAGS_GLOBAL); break; - case 'h': do_user_mode(FLAGS_HELPER); break; } #undef do_user_mode } diff --git a/src/proto-p10.c b/src/proto-p10.c index dce0d98..5820323 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -471,14 +471,10 @@ irc_user(struct userNode *user) modes[modelen++] = 'w'; if (IsService(user)) modes[modelen++] = 'k'; - if (IsServNotice(user)) - modes[modelen++] = 's'; if (IsDeaf(user)) modes[modelen++] = 'd'; if (IsGlobal(user)) modes[modelen++] = 'g'; - if (IsHelperIrcu(user)) - modes[modelen++] = 'h'; if (IsHiddenHost(user)) modes[modelen++] = 'x'; modes[modelen] = 0; @@ -2115,7 +2111,6 @@ void mod_usermode(struct userNode *user, const char *mode_change) { userList_remove(&curr_opers, user); } break; - case 'O': do_user_mode(FLAGS_LOCOP); break; case 'i': do_user_mode(FLAGS_INVISIBLE); if (add) invis_clients++; @@ -2123,11 +2118,9 @@ void mod_usermode(struct userNode *user, const char *mode_change) { invis_clients--; break; case 'w': do_user_mode(FLAGS_WALLOP); break; - case 's': do_user_mode(FLAGS_SERVNOTICE); break; case 'd': do_user_mode(FLAGS_DEAF); break; case 'k': do_user_mode(FLAGS_SERVICE); break; case 'g': do_user_mode(FLAGS_GLOBAL); break; - case 'h': do_user_mode(FLAGS_HELPER); break; case 'x': do_user_mode(FLAGS_HIDDEN_HOST); break; case 'r': if (*word) { -- 2.20.1