summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-11-12 05:37:12 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-11-12 05:37:12 +0000
commitf0c53b4727bf64c280b49cb7c15c6ba77c6b1dc5 (patch)
tree4f48274e4da6d8090a906b933f6222375e1b0fce /src
parentc58d37f49dfc674920ae2ccd93d6fd32df68544d (diff)
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
git-svn-id: svn://svn.anope.org/anope/trunk@440 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@295 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/misc.c2
-rw-r--r--src/operserv.c40
-rw-r--r--src/ptlink.c19
3 files changed, 56 insertions, 5 deletions
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
}
/*