summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes2
-rw-r--r--include/ptlink.h19
-rw-r--r--src/misc.c2
-rw-r--r--src/operserv.c40
-rw-r--r--src/ptlink.c19
-rw-r--r--version.log7
6 files changed, 83 insertions, 6 deletions
diff --git a/Changes b/Changes
index b3c57d548..6baf1add3 100644
--- a/Changes
+++ b/Changes
@@ -34,6 +34,8 @@ Provided by Trystan <trystan@nomadirc.net> - 2004
09/07 A Ircd CHANMODE now trapped and stored. [ #00]
08/23 A New protocol independent design (aka anope-capab). [ #00]
08/28 A New IRCD document for adding new ircd support to new design. [ #00]
+11/11 F OS CLEARMODES now takes +q/+a [ #00]
+11/11 F Updated PTlink support [#211]
11/06 F Fixed syntax error when NSForceEmail is disabled [ #00]
11/06 F Fixed using "make" under some BSD systems [ #00]
11/06 F Chanserv taking modes more than once. [ #68]
diff --git a/include/ptlink.h b/include/ptlink.h
index 8e61f52bf..e97c59a0c 100644
--- a/include/ptlink.h
+++ b/include/ptlink.h
@@ -69,6 +69,25 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
+/*
+ The following variables are set to define the TS protocol version
+ that we support.
+
+ PTLink 6.14 to 6.17 TS CURRENT is 6 and MIN is 3
+ PTlink 6.18 TS CURRENT is 9 and MIN is 3
+ PTLink 6.19 TS CURRENT is 10 and MIN is 9
+
+ If you are running 6.18 or 6.19 do not touch these values as they will
+ allow you to connect
+
+ If you are running an older version of PTLink, first think about updating
+ your ircd, or changing the TS_CURRENT to 6 to allow services to connect
+*/
+
+#define PTLINK_TS_CURRENT 9
+#define PTLINK_TS_MIN 3
+
+
#endif
diff --git a/src/misc.c b/src/misc.c
index b0e87cd54..b2943a8de 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -157,7 +157,7 @@ static int do_match_wild(const char *pattern, const char *str, int docase)
char c;
const char *s;
- if (!str || !*str) {
+ if (!str || !*str || !pattern || !*pattern) {
return 0;
}
diff --git a/src/operserv.c b/src/operserv.c
index d17e06216..04ecde303 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -1678,6 +1678,46 @@ static int do_clearmodes(User * u)
free(argv[0]);
}
}
+
+ /* Clear mode Owners */
+ if (ircd->owner) {
+ for (cu = c->users; cu; cu = next) {
+ next = cu->next;
+
+ if (!chan_has_user_status(c, cu->user, CUS_OWNER))
+ continue;
+
+ argv[0] = sstrdup(ircd->ownerunset);
+ argv[1] = sstrdup(cu->user->nick);
+
+ anope_cmd_mode(s_OperServ, c->name, "%s %s",
+ ircd->ownerunset, cu->user->nick);
+ chan_set_modes(s_OperServ, c, 2, argv, 0);
+
+ free(argv[0]);
+ }
+ }
+
+ /* Clear mode protected or admins */
+ if (ircd->protect || ircd->admin) {
+ for (cu = c->users; cu; cu = next) {
+ next = cu->next;
+
+ if (!chan_has_user_status(c, cu->user, CUS_PROTECT))
+ continue;
+
+ argv[0] = sstrdup("-a");
+ argv[1] = sstrdup(cu->user->nick);
+
+ anope_cmd_mode(s_OperServ, c->name, "-a %s",
+ cu->user->nick);
+ chan_set_modes(s_OperServ, c, 2, argv, 0);
+
+ free(argv[0]);
+ }
+ }
+
+
}
if (c->mode) {
diff --git a/src/ptlink.c b/src/ptlink.c
index 2a35cd1cc..6f6d50eb1 100644
--- a/src/ptlink.c
+++ b/src/ptlink.c
@@ -201,7 +201,7 @@ char csmodes[128] = {
0, 0, 0, 0,
0,
- 'v', 0, 0, 0, 0,
+ 'v', 0, 0, 'a', 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -552,6 +552,8 @@ void moduleAddIRCDMsgs(void) {
m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
m = createMessage("CREDITS", anope_event_credits); addCoreMessage(IRCD,m);
m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("NJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("NNICK", anope_event_nick); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
@@ -731,12 +733,21 @@ void anope_cmd_connect(int servernum)
/*
SVINFO %d %d
parv[0] = server name
- parv[1] = minimum supported protocol version (3)
- parv[2] = current supported protocol version (6)
+ parv[1] = current supported protocol version
+ parv[2] = minimum supported protocol version
+
+ See the ptlink.h for information on PTLINK_TS_CURRENT, and
+ PTLINK_TS_MIN
*/
void anope_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 3 6 %lu", (unsigned long int) time(NULL));
+#if defined(PTLINK_TS_CURRENT) && defined(PTLINK_TS_MIN)
+ send_cmd(NULL, "SVINFO %d %d %lu", PTLINK_TS_CURRENT, PTLINK_TS_MIN,
+ (unsigned long int) time(NULL));
+#else
+ /* hardwired if the defs some how go missing */
+ send_cmd(NULL, "SVINFO 6 3 %lu", (unsigned long int) time(NULL));
+#endif
}
/*
diff --git a/version.log b/version.log
index 44730dba8..fa301a114 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="6"
-VERSION_BUILD="439"
+VERSION_BUILD="440"
# $Log$
#
+# BUILD : 1.7.6 (440)
+# BUGS : 211
+# NOTES : 1. Updated PTLink support, 2. OperServ takes +q/+a on CLEARMODES, 3. fixed a segfault in do_match_wild()
+# reported by DJ
+#
# BUILD : 1.7.6 (439)
# BUGS : 68, 170, 209
# NOTES : 1. DrSteins XOP patch (bug# 170), 2. Cleaned up the English language file for grammar (bug# 209),