Răsfoiți Sursa

* Removed udef from the flag_record structs

svn: 912
Bryan Drewery 22 ani în urmă
părinte
comite
c6c219d262

+ 1 - 0
doc/UPDATES

@@ -4,6 +4,7 @@ This is a summary of ChangeLog basically.
 
 1.Fixed a cosmetic error in cmd_downbots.
 2.Cleaned up and removed more un-needed code.
+3.Fixed a bug in defalg_user()
 
 1.1.5
 

+ 1 - 1
src/cfg.c

@@ -211,7 +211,7 @@ void deflag_user(struct userrec *u, int why, char *msg, struct chanset_t *chan)
 {
   char tmp[256] = "", tmp2[1024] = "";
   struct cfg_entry *ent = NULL;
-  struct flag_record fr = {FR_GLOBAL, FR_CHAN, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!u)
     return;

+ 2 - 2
src/chanprog.c

@@ -345,7 +345,7 @@ void tell_verbose_status(int idx)
 void tell_settings(int idx)
 {
   char s[1024] = "";
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   dprintf(idx, "Botnet Nickname: %s\n", conf.bot->nick);
   if (firewall[0])
@@ -646,7 +646,7 @@ int shouldjoin(struct chanset_t *chan)
   else if (!strncmp(conf.bot->nick, "wtest", 4)) /* use 5 for all */
     return 0; 
 #ifdef G_BACKUP
-  struct flag_record fr = { FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0, 0 };
+  struct flag_record fr = { FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0};
  
   if (!chan || (chan && !chan->name || (chan->name && !chan->name[0])))
     return 0;

+ 13 - 13
src/cmds.c

@@ -785,7 +785,7 @@ static void cmd_help(struct userrec *u, int idx, char *par)
 {
   char flg[100] = "", *fcats = NULL, temp[100] = "", buf[2046] = "", match[20] = "";
   int fnd = 0, done = 0, nowild = 0;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   egg_snprintf(temp, sizeof temp, "a|- a|a n|- n|n m|- m|m mo|o m|o i|- o|o o|- p|- -|-");
   fcats = temp;
@@ -1234,7 +1234,7 @@ static void cmd_console(struct userrec *u, int idx, char *par)
 {
   char *nick = NULL, s[2] = "", s1[512] = "";
   int dest = 0, i, ok = 0, pls, md;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   struct chanset_t *chan = NULL;
 
   if (!par[0]) {
@@ -2163,7 +2163,7 @@ int check_dcc_attrs(struct userrec *u, int oatr)
 	botnet_send_join_idx(i, -1);
       }
       if ((oatr & USER_MASTER) && !(u->flags & USER_MASTER)) {
-	struct flag_record fr = {FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+	struct flag_record fr = {FR_CHAN | FR_ANYWH, 0, 0, 0};
 
 	dcc[i].u.chat->con_flags &= ~(LOG_MISC | LOG_CMDS | LOG_RAW |
 				      LOG_FILES | LOG_WALL | LOG_DEBUG);
@@ -2295,7 +2295,7 @@ int check_dcc_chanattrs(struct userrec *u, char *chname, int chflags, int ochatr
 	   (!(chflags & (USER_OP | USER_MASTER | USER_OWNER)))) ||
 	  ((chflags & (USER_OP | USER_MASTER | USER_OWNER)) &&
 	   (!(ochatr & (USER_OP | USER_MASTER | USER_OWNER))))) {
-	struct flag_record fr = {FR_CHAN, 0, 0, 0, 0, 0};
+	struct flag_record fr = {FR_CHAN, 0, 0, 0};
 
 	for (chan = chanset; chan && !found; chan = chan->next) {
 	  get_user_flagrec(u, &fr, chan->dname);
@@ -2319,10 +2319,10 @@ static void cmd_chattr(struct userrec *u, int idx, char *par)
   char *hand = NULL, *arg = NULL, *tmpchg = NULL, *chg = NULL, work[1024] = "";
   struct chanset_t *chan = NULL;
   struct userrec *u2 = NULL;
-  struct flag_record pls = {0, 0, 0, 0, 0, 0},
-  		     mns = {0, 0, 0, 0, 0, 0},
-		     user = {0, 0, 0, 0, 0, 0},
-		     ouser = {0, 0, 0, 0, 0, 0};
+  struct flag_record pls = {0, 0, 0, 0},
+  		     mns = {0, 0, 0, 0},
+		     user = {0, 0, 0, 0},
+		     ouser = {0, 0, 0, 0};
   int fl = -1, of = 0, ocf = 0;
 
   if (!par[0]) {
@@ -2930,7 +2930,7 @@ static void cmd_strip(struct userrec *u, int idx, char *par)
 static void cmd_su(struct userrec *u, int idx, char *par)
 {
   int atr = u ? u->flags : 0, ok;
-  struct flag_record fr = {FR_ANYWH | FR_CHAN | FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_ANYWH | FR_CHAN | FR_GLOBAL, 0, 0, 0};
 
   u = get_user_by_handle(userlist, par);
 
@@ -3346,8 +3346,8 @@ static void cmd_pls_host(struct userrec *u, int idx, char *par)
   char *handle = NULL, *host = NULL;
   struct userrec *u2 = NULL;
   struct list_type *q = NULL;
-  struct flag_record fr2 = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0},
-                     fr  = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr2 = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0},
+                     fr  = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   putlog(LOG_CMDS, "*", "#%s# +host %s", dcc[idx].nick, par);
 
@@ -3429,8 +3429,8 @@ static void cmd_mns_host(struct userrec *u, int idx, char *par)
 {
   char *handle = NULL, *host = NULL;
   struct userrec *u2 = NULL;
-  struct flag_record fr2 = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0},
-                     fr  = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr2 = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0},
+                     fr  = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   putlog(LOG_CMDS, "*", "#%s# -host %s", dcc[idx].nick, par);
   if (!par[0]) {

+ 4 - 4
src/core_binds.c

@@ -46,7 +46,7 @@ void core_binds_init()
 
 void check_bind_dcc(const char *cmd, int idx, const char *text)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int x, hits;
 #ifdef S_DCCPASS
   bind_entry_t *entry = NULL;
@@ -116,7 +116,7 @@ void check_bind_bot(const char *nick, const char *code, const char *param)
 
 void check_bind_chon(char *hand, int idx)
 {
-  struct flag_record     fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record     fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   struct userrec        *u = NULL;
 
   u = get_user_by_handle(userlist, hand);
@@ -127,7 +127,7 @@ void check_bind_chon(char *hand, int idx)
 
 void check_bind_chof(char *hand, int idx)
 {
-  struct flag_record     fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record     fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   struct userrec        *u = NULL;
 
   u = get_user_by_handle(userlist, hand);
@@ -173,7 +173,7 @@ int check_bind_note(const char *from, const char *to, const char *text)
 
 void check_bind_chjn(const char *bot, const char *nick, int chan, const char type, int sock, const char *host)
 {
-  struct flag_record    fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record    fr = {FR_GLOBAL, 0, 0, 0};
   char                  s[11] = "", t[2] = "";
 
   t[0] = type;

+ 3 - 3
src/dcc.c

@@ -1194,7 +1194,7 @@ static time_t lasttelnettime;
  */
 static int detect_telnet_flood(char *floodhost)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   get_user_flagrec(get_user_by_host(floodhost), &fr, NULL);
   if (!flood_telnet_thr || glob_noflood(fr))
@@ -1475,7 +1475,7 @@ void dupwait_notify(char *who)
 static void dcc_telnet_id(int idx, char *buf, int atr)
 {
   int ok = 0;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   strip_telnet(dcc[idx].sock, buf, &atr);
   buf[HANDLEN] = 0;
@@ -1552,7 +1552,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
 static void dcc_telnet_pass(int idx, int atr)
 {
   int ok = 0, i, ok2;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
   /* No password set? */

+ 1 - 1
src/dccutil.c

@@ -226,7 +226,7 @@ void chanout_but (int x, ...)
 void dcc_chatter(int idx)
 {
   int i, j;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
   dprintf(idx, "Connected to %s, running %s\n", conf.bot->nick, version);

+ 9 - 11
src/flags.c

@@ -85,7 +85,7 @@ int chan_sanity_check(int chatr, int atr)
  */
 char geticon(int idx)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   if (!dcc[idx].user)
     return '-';
@@ -101,8 +101,7 @@ char geticon(int idx)
   return '-';
 }
 
-void break_down_flags(const char *string, struct flag_record *plus,
-		      struct flag_record *minus)
+void break_down_flags(const char *string, struct flag_record *plus, struct flag_record *minus)
 {
   struct flag_record	*which = plus;
   int			 mode = 0;	/* 0 = glob, 1 = chan, 2 = bot */
@@ -454,7 +453,7 @@ void get_user_flagrec(struct userrec *u, struct flag_record *fr, const char *chn
 
 static int botfl_unpack(struct userrec *u, struct user_entry *e)
 {
-  struct flag_record fr = {FR_BOT, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_BOT, 0, 0, 0};
 
   break_down_flags(e->u.list->extra, &fr, NULL);
   list_type_kill(e->u.list);
@@ -465,7 +464,7 @@ static int botfl_unpack(struct userrec *u, struct user_entry *e)
 static int botfl_pack(struct userrec *u, struct user_entry *e)
 {
   char x[100] = "";
-  struct flag_record fr = {FR_BOT, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_BOT, 0, 0, 0};
 
   fr.bot = e->u.ulong;
   e->u.list = calloc(1, sizeof(struct list_type));
@@ -484,7 +483,7 @@ static int botfl_kill(struct user_entry *e)
 static int botfl_write_userfile(FILE *f, struct userrec *u, struct user_entry *e)
 {
   char x[100] = "";
-  struct flag_record fr = {FR_BOT, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_BOT, 0, 0, 0};
 
   fr.bot = e->u.ulong;
   build_flags(x, &fr, NULL);
@@ -519,7 +518,7 @@ static int botfl_set(struct userrec *u, struct user_entry *e, void *buf)
 
 static void botfl_display(int idx, struct user_entry *e, struct userrec *u)
 {
-  struct flag_record fr = {FR_BOT, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_BOT, 0, 0, 0};
   char x[100] = "";
 
   fr.bot = e->u.ulong;
@@ -621,7 +620,7 @@ int ischanhub()
 
 int dovoice(struct chanset_t *chan)
 {
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!chan) return 0;
 
@@ -633,7 +632,7 @@ int dovoice(struct chanset_t *chan)
 
 int dolimit(struct chanset_t *chan)
 {
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!chan) return 0;
 
@@ -645,8 +644,7 @@ int dolimit(struct chanset_t *chan)
 
 int whois_access(struct userrec *user, struct userrec *whois_user)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-  struct flag_record whois = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0}, whois = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   get_user_flagrec(user, &fr, NULL);
   get_user_flagrec(whois_user, &whois, NULL);

+ 0 - 3
src/flags.h

@@ -16,12 +16,9 @@
 struct flag_record {
   int match;
   int global;
-/* FIXME: STRIP OUT UDEF FROM ALL FLAG_RECORD STRUCTS */
 /* FIXME: ALSO MAKE THESE LONG */
-  int udef_global;
   int bot;
   int chan;
-  int udef_chan;
 };
 
 #define FR_GLOBAL 0x00000001

+ 2 - 2
src/misc.c

@@ -467,7 +467,7 @@ void show_motd(int idx)
 void show_channels(int idx, char *handle)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = { FR_CHAN | FR_GLOBAL, 0, 0, 0, 0 };
+  struct flag_record fr = { FR_CHAN | FR_GLOBAL, 0, 0, 0};
   struct userrec *u = NULL;
   int first = 0, l = 0, total = 0;
   char format[120] = "";
@@ -1109,7 +1109,7 @@ char *replace(const char *string, char *oldie, char *newbie)
 void showhelp (int idx, struct flag_record *flags, char *string)
 {
   static int help_flags;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   char helpstr[12288] = "", tmp[2] = "", flagstr[10] = "";
   int ok = 1;
 

+ 2 - 2
src/mod/channels.mod/channels.c

@@ -631,7 +631,7 @@ void remove_channel(struct chanset_t *chan)
  */
 static int channels_chon(char *handle, int idx)
 {
-  struct flag_record fr = {FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0};
   int find, found = 0;
   struct chanset_t *chan = chanset;
 
@@ -678,7 +678,7 @@ void channels_report(int idx, int details)
   struct chanset_t *chan = NULL;
   int i;
   char s[1024] = "", s2[100] = "";
-  struct flag_record fr = {FR_CHAN | FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_CHAN | FR_GLOBAL, 0, 0, 0};
 
   for (chan = chanset; chan; chan = chan->next) {
     if (idx != DP_STDOUT)

+ 2 - 2
src/mod/channels.mod/cmdschan.c

@@ -6,8 +6,8 @@
 
 #include <ctype.h>
 
-static struct flag_record user	 = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-static struct flag_record victim = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+static struct flag_record user	 = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
+static struct flag_record victim = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
 
 static void cmd_pls_mask(char type, struct userrec *u, int idx, char *par)

+ 4 - 4
src/mod/channels.mod/userchan.c

@@ -876,7 +876,7 @@ int write_bans(FILE *f, int idx)
   }
   for (chan = chanset; chan; chan = chan->next)
     if ((idx < 0)  || 1) {
-      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0};
+      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0};
 
       if (idx >= 0)
 	get_user_flagrec(dcc[idx].user, &fr, chan->dname);
@@ -929,7 +929,7 @@ int write_exempts(FILE *f, int idx)
   }
   for (chan = chanset;chan;chan=chan->next)
     if ((idx < 0) || 1) {
-      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0};
+      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0};
 
       if (idx >= 0)
 	get_user_flagrec(dcc[idx].user,&fr,chan->dname);
@@ -982,7 +982,7 @@ int write_invites(FILE *f, int idx)
   }
   for (chan = chanset; chan; chan = chan->next)
     if ((idx < 0) || (1)) {
-      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0};
+      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0};
 
       if (idx >= 0)
 	get_user_flagrec(dcc[idx].user,&fr,chan->dname);
@@ -1022,7 +1022,7 @@ int write_chans(FILE *f, int idx)
 
   for (chan = chanset; chan; chan = chan->next) {
     if ((idx < 0) || (1)) {
-      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0};
+      struct flag_record fr = {FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0};
       if (idx >= 0)
         get_user_flagrec(dcc[idx].user,&fr,chan->dname);
       else

+ 15 - 15
src/mod/irc.mod/chan.c

@@ -151,7 +151,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
         bpos = (ops - 1);
 
     } else if (!opsonly || chan_hasop(m)) {
-        struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+        struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
         if (m->user)
           get_user_flagrec(m->user, &fr, chan->dname);
 
@@ -176,7 +176,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
   sent = 0;
   for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
     if (!opsonly || chan_hasop(m)) {
-      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0 };
 
       if (m->user)
         get_user_flagrec(m->user, &fr, chan->dname);
@@ -219,7 +219,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
   tpos = 0;
   for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
     if (!opsonly || chan_hasop(m)) {
-      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0 };
 
       if (m->user)
         get_user_flagrec(m->user, &fr, chan->dname);
@@ -267,7 +267,7 @@ static int target_priority(struct chanset_t * chan, memberlist *target, int opso
       if (match_my_nick(m->nick))
         bpos = ops;
     } else if (!opsonly || chan_hasop(m)) {
-      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0 };
+      struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0 };
 
       if (m->user)
         get_user_flagrec(m->user, &fr, chan->dname);
@@ -335,7 +335,7 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
   struct userrec *u = NULL;
   memberlist *m = NULL;
   int thr = 0, lapse = 0;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!chan || (which < 0) || (which >= FLOOD_CHAN_MAX))
     return 0;
@@ -554,7 +554,7 @@ static void kick_all(struct chanset_t *chan, char *hostmask, char *comment, int
 {
   memberlist *m = NULL;
   char kicknick[512] = "", s[UHOSTLEN] = "";
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int k, l, flushed;
 
   if (!me_op(chan))
@@ -611,7 +611,7 @@ static void refresh_ban_kick(struct chanset_t *chan, char *user, char *nick)
   for (cycle = 0; cycle < 2; cycle++) {
     for (b = cycle ? chan->bans : global_bans; b; b = b->next) {
       if (wild_match(b->mask, user)) {
-	struct flag_record	fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+	struct flag_record	fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 	char c[512] = "";		/* The ban comment.	*/
 	char s[UHOSTLEN] = "";
 
@@ -966,7 +966,7 @@ void check_this_user(char *hand, int delete, char *host)
   memberlist *m = NULL;
   struct userrec *u = NULL;
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
@@ -1116,7 +1116,7 @@ void recheck_channel(struct chanset_t *chan, int dobans)
 {
   memberlist *m = NULL;
   char s[UHOSTLEN] = "";
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   static int stacking = 0;
   int stop_reset = 0, botops = 0, nonbotops = 0, botnonops = 0;
 
@@ -1352,7 +1352,7 @@ static void memberlist_reposition(struct chanset_t * chan, memberlist * target)
 
 static int got352or4(struct chanset_t *chan, char *user, char *host, char *serv, char *nick, char *flags, int hops)
 {
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
   char userhost[UHOSTLEN] = "";
   memberlist *m = NULL;
   int waschanop;
@@ -1995,7 +1995,7 @@ static int gotjoin(char *from, char *chname)
   memberlist *m = NULL;
   masklist *b = NULL;
   struct userrec *u = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   fixcolon(chname);
   chan = findchan(chname);
@@ -2273,7 +2273,7 @@ static int gotkick(char *from, char *origmsg)
   memberlist *m = NULL;
   struct chanset_t *chan = NULL;
   struct userrec *u = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   strncpy(buf2, origmsg, 510);
   buf2[510] = 0;
@@ -2351,7 +2351,7 @@ static int gotnick(char *from, char *msg)
   memberlist *m = NULL, *mm = NULL;
   struct chanset_t *chan = NULL, *oldchan = NULL;
   struct userrec *u = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   strcpy(uhost, from);
   nick = splitnick(&uhost);
@@ -2556,7 +2556,7 @@ static int gotmsg(char *from, char *msg)
   int ignoring;
   struct userrec *u = NULL;
   memberlist *m = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!strchr("&#!+@$", msg[0]))
     return 0;
@@ -2733,7 +2733,7 @@ static int gotnotice(char *from, char *msg)
   struct userrec *u = NULL;
   memberlist *m = NULL;
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int ignoring;
 
   if (!strchr(CHANMETA "@", *msg))

+ 10 - 10
src/mod/irc.mod/irc.c

@@ -182,7 +182,7 @@ void getin_request(char *botnick, char *code, char *par)
   struct maskrec **mr = NULL,
    *tmr = NULL;
   struct maskstruct *b = NULL;
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   if (!server_online) 
     return;
@@ -480,7 +480,7 @@ static void request_op(struct chanset_t *chan)
   memberlist *ml = NULL;
   memberlist *botops[MAX_BOTS];
   char s[100] = "", *l = NULL, myserv[SERVLEN] = "";
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   if (!chan || (chan && (channel_pending(chan) || !shouldjoin(chan) || !channel_active(chan) || me_op(chan))))
     return;
@@ -590,7 +590,7 @@ static void request_in(struct chanset_t *chan)
   int i = 0;
   int cnt, n;
   struct userrec *botops[MAX_BOTS], *u = NULL;
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   for (u = userlist; u && (i < MAX_BOTS); u = u->next) {
     get_user_flagrec(u, &fr, NULL);
@@ -640,7 +640,7 @@ static int want_to_revenge(struct chanset_t *chan, struct userrec *u,
 			   struct userrec *u2, char *badnick, char *victimstr,
 			   int mevictim)
 {
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   /* Do not take revenge upon ourselves. */
   if (match_my_nick(badnick))
@@ -657,7 +657,7 @@ static int want_to_revenge(struct chanset_t *chan, struct userrec *u,
         return 1;
     /* Do we revenge for our users ... and do we actually know the victim? */
     } else if (channel_revenge(chan) && u2) {
-      struct flag_record fr2 = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
+      struct flag_record fr2 = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
       get_user_flagrec(u2, &fr2, chan->dname);
       /* Protecting friends? */
@@ -679,7 +679,7 @@ static void punish_badguy(struct chanset_t *chan, char *whobad,
 {
   char reason[1024] = "", ct[81] = "", *kick_msg = NULL;
   memberlist *m = NULL;
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
+  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   m = ismember(chan, badnick);
   if (!m)
@@ -1150,7 +1150,7 @@ static void check_expired_chanstuff()
   memberlist *m = NULL, *n = NULL;
   char s[UHOSTLEN] = "";
   struct chanset_t *chan;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (!server_online)
     return;
@@ -1246,7 +1246,7 @@ static void check_expired_chanstuff()
             m->user = get_user_by_host(s);
 
           if (m->user) {
-            struct flag_record fr2 = { FR_GLOBAL | FR_CHAN, 0, 0 };
+            struct flag_record fr2 = { FR_GLOBAL | FR_CHAN, 0, 0, 0};
             get_user_flagrec(m->user, &fr2, chan->dname);
             if (!private(fr2, chan, PRIV_VOICE) && 
                ((channel_voice(chan) && !chk_devoice(fr2, chan)) ||
@@ -1279,7 +1279,7 @@ static void check_expired_chanstuff()
 #ifdef S_AUTHCMDS
 static int check_bind_pubc(char *cmd, char *nick, char *from, struct userrec *u, char *args, char *chan)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int x = check_bind(BT_msgc, cmd, &fr, nick, from, u, args, chan);
 
   if (x & BIND_RET_LOG)
@@ -1319,7 +1319,7 @@ void flush_modes()
 
 void irc_report(int idx, int details)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   char ch[1024] = "", q[160] = "", *p = NULL;
   int k, l;
   struct chanset_t *chan = NULL;

+ 2 - 2
src/mod/irc.mod/mode.c

@@ -18,8 +18,8 @@ static int reversing = 0;
 #define EXEMPT  0x20
 #define INVITE  0x40
 
-static struct flag_record user   = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-static struct flag_record victim = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+static struct flag_record user   = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
+static struct flag_record victim = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
 static int do_op(char *nick, struct chanset_t *chan, int force)
 {

+ 9 - 9
src/mod/irc.mod/msgcmds.c

@@ -56,7 +56,7 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
 {
   struct chanset_t *chan = NULL;
   char *pass = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (match_my_nick(nick))
     return BIND_RET_BREAK;
@@ -153,7 +153,7 @@ static int msg_invite(char *nick, char *host, struct userrec *u, char *par)
 {
   char *pass = NULL;
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (match_my_nick(nick))
     return BIND_RET_BREAK;
@@ -444,7 +444,7 @@ static int msgc_test(char *nick, char *host, struct userrec *u, char *par, char
 {
   char *chn, *hand;
   struct chanset_t *chan;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   struct userrec *user;
   
   hand = newsplit(&par);
@@ -464,7 +464,7 @@ static int msgc_test(char *nick, char *host, struct userrec *u, char *par, char
 static int msgc_op(char *nick, char *host, struct userrec *u, char *par, char *chname)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int force = 0;
   memberlist *m = NULL;
 
@@ -514,7 +514,7 @@ static int msgc_op(char *nick, char *host, struct userrec *u, char *par, char *c
 static int msgc_voice(char *nick, char *host, struct userrec *u, char *par, char *chname)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int force = 0;
   memberlist *m = NULL;
 
@@ -562,7 +562,7 @@ static int msgc_voice(char *nick, char *host, struct userrec *u, char *par, char
 static int msgc_channels(char *nick, char *host, struct userrec *u, char *par, char *chname)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   char list[1024] = "";
 
   putlog(LOG_CMDS, "*", "(%s!%s) !%s! %s %sCHANNELS %s", nick, host, u->handle, chname ? chname : "", cmdprefix, par ? par : "");
@@ -587,7 +587,7 @@ static int msgc_channels(char *nick, char *host, struct userrec *u, char *par, c
 static int msgc_getkey(char *nick, char *host, struct userrec *u, char *par, char *chname)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   if (chname && chname[0]) 
     return 0;
@@ -615,7 +615,7 @@ static int msgc_help(char *nick, char *host, struct userrec *u, char *par, char
 {
   bind_entry_t *entry = NULL;
   bind_table_t *table = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   putlog(LOG_CMDS, "*", "(%s!%s) !%s! %sHELP %s", nick, host, u->handle, cmdprefix, par ? par : "");
 
@@ -661,7 +661,7 @@ static int msgc_sha1(char *nick, char *host, struct userrec *u, char *par, char
 static int msgc_invite(char *nick, char *host, struct userrec *u, char *par, char *chname)
 {
   struct chanset_t *chan = NULL;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int force = 0;
 
   if (chname && chname[0])

+ 2 - 2
src/mod/server.mod/server.c

@@ -1217,7 +1217,7 @@ static int ctcp_DCC_CHAT(char *nick, char *from, struct userrec *u, char *object
 {
   char *action = NULL, *param = NULL, *ip = NULL, *prt = NULL;
   int i, ok;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
   
   if (!ischanhub())
     return BIND_RET_LOG;
@@ -1295,7 +1295,7 @@ static void dcc_chat_hostresolved(int i)
 {
   char buf[512] = "", ip[512] = "";
   int ok;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
 
   egg_snprintf(buf, sizeof buf, "%d", dcc[i].port);
 #ifndef USE_IPV6

+ 3 - 3
src/mod/server.mod/servmsg.c

@@ -104,7 +104,7 @@ static int gotfake433(char *from)
 
 static int check_bind_msg(char *cmd, char *nick, char *uhost, struct userrec *u, char *args)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
   int x;
 
   get_user_flagrec(u, &fr, NULL);
@@ -117,7 +117,7 @@ static int check_bind_msg(char *cmd, char *nick, char *uhost, struct userrec *u,
 #ifdef S_AUTHCMDS
 static int check_bind_msgc(char *cmd, char *nick, char *from, struct userrec *u, char *args)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
   int x;
 
   x = check_bind(BT_msgc, cmd, &fr, nick, from, u, args, NULL);
@@ -151,7 +151,7 @@ int check_bind_ctcpr(char *nick, char *uhost, struct userrec *u,
                            char *dest, char *keyword, char *args,
                            bind_table_t *table)
 {
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0};
   get_user_flagrec(u, &fr, NULL);
   return check_bind(table, keyword, &fr, nick, uhost, u, dest, keyword, args);
 }

+ 2 - 2
src/mod/share.mod/share.c

@@ -40,7 +40,7 @@ static int private_global = 0;
 static int private_user = 0;
 static char private_globals[50] = "";
 static int allow_resync = 0;
-static struct flag_record fr = {0, 0, 0, 0, 0, 0};
+static struct flag_record fr = {0, 0, 0, 0};
 static int resync_time = 900;
 static int overr_local_bots = 1;	/* Override local bots?		    */
 
@@ -2134,7 +2134,7 @@ void share_init()
 
 int private_globals_bitmask()
 {
-  struct flag_record my_fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record my_fr = {FR_GLOBAL, 0, 0, 0};
 
   break_down_flags(private_globals, &my_fr, 0);
   return my_fr.global;

+ 1 - 1
src/shell.c

@@ -496,7 +496,7 @@ void detected(int code, char *msg)
 {
   char *p = NULL, tmp[512] = "";
   struct userrec *u = NULL;
-  struct flag_record fr = { FR_GLOBAL, 0, 0, 0, 0};
+  struct flag_record fr = { FR_GLOBAL, 0, 0, 0};
   int act;
 
   u = get_user_by_handle(userlist, conf.bot->nick);

+ 3 - 3
src/userent.c

@@ -312,7 +312,7 @@ void config_display(int idx, struct user_entry *e, struct userrec *u)
 {
 #ifdef HUB
   struct xtra_key *xk = NULL;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
   /* scan thru xtra field, searching for matches */
@@ -567,7 +567,7 @@ struct user_entry_type USERENTRY_PASS =
 
 void secpass_display(int idx, struct user_entry *e, struct userrec *u)
 {
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
 
@@ -817,7 +817,7 @@ static int botaddr_set(struct userrec *u, struct user_entry *e, void *buf)
 static void botaddr_display(int idx, struct user_entry *e, struct userrec *u)
 {
 #ifdef HUB
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
   if (glob_admin(fr)) {

+ 2 - 2
src/userrec.c

@@ -289,7 +289,7 @@ int write_user(struct userrec *u, FILE * f, int idx)
   struct chanuserrec *ch = NULL;
   struct chanset_t *cst = NULL;
   struct user_entry *ue = NULL;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   fr.global = u->flags;
   build_flags(s, &fr, NULL);
@@ -520,7 +520,7 @@ struct userrec *adduser(struct userrec *bu, char *handle, char *host, char *pass
     clear_chanlist();
   noshare = oldshare;
   if ((!noshare) && (handle[0] != '*') && (!(flags & USER_UNSHARED)) && (bu == userlist)) {
-    struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+    struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
     char x[100] = "";
 
     fr.global = u->flags;

+ 3 - 3
src/users.c

@@ -453,7 +453,7 @@ void tell_user(int idx, struct userrec *u, int master)
   struct chanset_t *chan = NULL;
   struct user_entry *ue = NULL;
   struct laston_info *li = NULL;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   n = num_notes(u->handle);
 
@@ -525,7 +525,7 @@ void tell_user_ident(int idx, char *id, int master)
 {
   char format[81] = "";
   struct userrec *u = NULL;
-  struct flag_record user = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
+  struct flag_record user = {FR_GLOBAL | FR_CHAN, 0, 0, 0};
 
   get_user_flagrec(dcc[idx].user, &user, NULL);
 
@@ -1173,7 +1173,7 @@ void autolink_cycle(char *start)
   struct bot_addr *my_ba = NULL;
   char uplink[HANDLEN + 1] = "", avoidbot[HANDLEN + 1] = "", curhub[HANDLEN + 1] = "";
   int i, hlc;
-  struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
+  struct flag_record fr = {FR_GLOBAL, 0, 0, 0};
 
   /* Reset connection attempts if we ain't called due to a failed link */
   if (!start)