Author: Alex Badea <vampire@p16.pub.ro>
authorAlex Badea <vampire@p16.pub.ro>
Tue, 18 Jun 2002 13:16:40 +0000 (13:16 +0000)
committerAlex Badea <vampire@p16.pub.ro>
Tue, 18 Jun 2002 13:16:40 +0000 (13:16 +0000)
Log message:

Kick net.riders on burst, plus a few various fixes.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@774 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
adns/Makefile.in
include/s_conf.h
ircd/ircd_parser.y
ircd/m_burst.c
ircd/s_err.c

index 05f192f218100fb16a24711361125c43f38af21b..d33f25a53e41dd20c96c3c010dd34e99cf966e90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-06-18  Alex Badea  <vampire@p16.pub.ro>
+
+       * ircd/m_burst.c (ms_burst): kick local members if the channel
+       has a larger local TS and it's +i or +k remotely (anti net.ride)
+
+       * ircd/ircd_parser.y: fixed a bug that broke IP-based C:lines
+
+       * ircd/s_err.c: connection classes are now strings (RPL_STATSCLINE)
+
+       * include/s_conf.h: externalized lookup_confhost
+
+       * adns/Makefile.in: compilation-outside-source-tree fix
+
 2002-06-17  Alex Badea  <vampire@p16.pub.ro>
 
        * adns/*: added a slightly hacked copy of adns
index 050b71f434f8ea39c7d0c9bfa5724a1c2f56fc8a..5d6b9537ba8389f677780b2adf50b936b2188895 100644 (file)
@@ -62,7 +62,7 @@ dist:                 distprep
        mv $(dist_tmp).tar.gz .
 
 README:                        README.html
-       lynx -dump -number_links -cfg=/dev/null ./README.html >README.tmp
+       lynx -dump -number_links -cfg=/dev/null $(srcdir)/README.html >README.tmp
        mv -f README.tmp README
 
 TAGS info dvi:
index 14f6df61f1afed936393b36f5a7f6a9f8a06d639..ac61e36e00d44b8aef7c1f6a8ecd22d4f463fd01 100644 (file)
@@ -194,6 +194,7 @@ extern int find_restrict(struct Client *cptr);
 extern struct MotdItem* read_motd(const char* motdfile);
 
 extern void set_initial_oper_privs(struct ConfItem *oper, int flags);
+extern void lookup_confhost(struct ConfItem *aconf);
 
 extern void yyerror(const char *msg);
 
index 86b1335108aad9a72d64be39d9c64659512cdd3c..44220713c6750cf50d1fa614db1f8761e42ef719 100644 (file)
@@ -47,6 +47,7 @@
 #include "parse.h"
 #include "res.h"
 #include "s_bsd.h"
+#include "s_conf.h"
 #include "s_debug.h"
 #include "s_misc.h"
 #include "send.h"
@@ -364,6 +365,7 @@ connectblock: CONNECT
   aconf->host = host;
   aconf->next = GlobalConfList;
   aconf->ipnum.s_addr = INADDR_NONE;
+  lookup_confhost(aconf);
   GlobalConfList = aconf;
   printf("Server added: %s\n", name);
   /* ccount++; -- XXX fixme --- A1kmm */
index 5b70eabd5d029f2a70f45781d70dc97ff199c5ad..15475b87ccc277b4b5d8eda1345bf41805b25df5 100644 (file)
@@ -192,6 +192,32 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 
   timestamp = atoi(parv[2]);
 
+  if (!chptr->creationtime || chptr->creationtime > timestamp) {
+    /*
+     * Kick local members if channel is +i or +k and our TS was larger
+     * than the burst TS (anti net.ride). The modes hack is here because
+     * we have to do this before mode_parse, as chptr may go away.
+     */
+    for (param = 3; param < parc; param++) {
+      if (parv[param][0] != '+')
+        continue;
+      if (strchr(parv[param], 'i') || strchr(parv[param], 'k')) {
+        for (member = chptr->members; member; member = member->next_member) {
+          if (!MyUser(member->user) || IsZombie(member))
+            continue;
+          sendcmdto_serv_butone(&me, CMD_KICK, NULL, "%H %C :Net Rider", chptr, member->user);
+          sendcmdto_channel_butserv_butone(&me, CMD_KICK, chptr, NULL, "%H %C :Net Rider", chptr, member->user);
+          make_zombie(member, member->user, &me, &me, chptr);
+        }
+      }
+      break;
+    }
+
+    /* If the channel had only locals, it went away by now. */
+    if (!(chptr = get_channel(sptr, parv[1], CGT_CREATE)))
+      return 0; /* can't create the channel? */
+  }
+
   /* turn off burst joined flag */
   for (member = chptr->members; member; member = member->next_member)
     member->status &= ~(CHFL_BURST_JOINED|CHFL_BURST_ALREADY_OPPED|CHFL_BURST_ALREADY_VOICED);
index 110624d5e6b39fea6e10a1ef7866b662f579db86..807047b921817716cb889b37da5feb9ce2de7cae 100644 (file)
@@ -458,7 +458,7 @@ static Numeric replyTable[] = {
 /* 212 */
   { RPL_STATSCOMMANDS, "%s %u %u", "212" },
 /* 213 */
-  { RPL_STATSCLINE, "%c %s * %s %d %d", "213" },
+  { RPL_STATSCLINE, "%c %s * %s %d %s", "213" },
 /* 214 */
   { RPL_STATSNLINE, "%c %s * %s %d %d", "214" },
 /* 215 */