summaryrefslogtreecommitdiff
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-12-26 07:20:45 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-26 07:20:45 +0000
commit0607b8c2b2a0510207a73320f4532844863ec9a0 (patch)
tree80b5c0b8886f3d10647b28350a3b5672ba40d0e1
parent90974e3636f34fd3a9e49c37b8dae4a357ea070a (diff)
BUILD : 1.7.6 (504) BUGS : 245 NOTES : Enforce SGLINE/SQLINE where the ircd does not do it on its own, and updated ptlink support to be more complaint
git-svn-id: svn://svn.anope.org/anope/trunk@504 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@358 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes4
-rw-r--r--Changes.conf15
-rw-r--r--data/example.conf16
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
-rw-r--r--src/operserv.c31
-rw-r--r--src/ptlink.c11
-rw-r--r--version.log6
8 files changed, 82 insertions, 7 deletions
diff --git a/Changes b/Changes
index 76d0af483..a867ade19 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Anope Version S V N
-------------------
Provided by Anope Dev. <dev@anope.org> - 2004
+12/26 A Services can enforce SGLINE and SQLINE by killing the user on set [#245]
12/25 A Flag to tell if we need to enforce SGlines or not [ #00]
12/02 A Support for other Ulines Servers (NeoStats/SolarStats). [ #00]
11/28 A Support for Unreal's version of SVSHOLD. [ #00]
@@ -14,7 +15,8 @@ Provided by Anope Dev. <dev@anope.org> - 2004
11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00]
11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00]
11/18 A NSAddAccessOnReg to control access list on registration. [ #00]
-12/25 F Fixed up user and channel modes for various ircds [ #00]
+12/26 F Updated PTLink support to be more in line with the ircd protocol. [ #00]
+12/25 F Fixed up user and channel modes for various ircds. [ #00]
12/23 F Several compiler errors under make strict. [ #00]
12/21 F Unsetting away would not trigger checking of memos. [#258]
12/21 F Dreamforge compile. [ #00]
diff --git a/Changes.conf b/Changes.conf
index 90629d4be..b55bd5b9f 100644
--- a/Changes.conf
+++ b/Changes.conf
@@ -19,6 +19,21 @@ NSAddAccessOnReg
UlineServers "stats.your.network, proxy.your.network"
+# KillOnSGline [OPTIONAL]
+#
+# When enabled, this option makes the services send an (SVS)KILL command
+# immediately after SGLINE ADD. This eliminates the need of killing the
+# users after the SGLINE has been added.
+
+# KillOnSGline
+
+# KillOnSQline [OPTIONAL]
+#
+# When enabled, this option makes the services send an (SVS)KILL command
+# immediately after SQLINE ADD. This eliminates the need of killing the
+# users after the SQLINE has been added.
+
+# KillOnSQline
** MODIFIED CONFIGURATION DIRECTIVES **
diff --git a/data/example.conf b/data/example.conf
index 060f41206..3b745d9d9 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -1138,6 +1138,22 @@ SZLineExpiry 30d
# AkillOnAdd
+# KillOnSGline [OPTIONAL]
+#
+# When enabled, this option makes the services send an (SVS)KILL command
+# immediately after SGLINE ADD. This eliminates the need of killing the
+# users after the SGLINE has been added.
+
+# KillOnSGline
+
+# KillOnSQline [OPTIONAL]
+#
+# When enabled, this option makes the services send an (SVS)KILL command
+# immediately after SQLINE ADD. This eliminates the need of killing the
+# users after the SQLINE has been added.
+
+# KillOnSQline
+
# KillClonesAkillExpire <time> [REQUIRED]
# Sets the expiry time for autokills added for hosts that have been
# killed using the KILLCLONES command.
diff --git a/include/extern.h b/include/extern.h
index 5acb85ebb..78b3591cc 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -401,6 +401,8 @@ E int SGLineExpiry;
E int SQLineExpiry;
E int SZLineExpiry;
E int AkillOnAdd;
+E int KillonSGline;
+E int KillonSQline;
E int DisableRaw;
E int WallOper;
E int WallBadOS;
diff --git a/src/config.c b/src/config.c
index 80513547a..87c959a59 100644
--- a/src/config.c
+++ b/src/config.c
@@ -242,6 +242,8 @@ int SGLineExpiry;
int SQLineExpiry;
int SZLineExpiry;
int AkillOnAdd;
+int KillonSGline;
+int KillonSQline;
int WallOper;
int WallBadOS;
int WallOSGlobal;
@@ -475,6 +477,8 @@ Directive directives[] = {
{"KeepBackups", {{PARAM_INT, PARAM_RELOAD, &KeepBackups}}},
{"KeepLogs", {{PARAM_INT, PARAM_RELOAD, &KeepLogs}}},
{"KillClones", {{PARAM_SET, PARAM_FULLONLY, &KillClones}}},
+ {"KillonSGline", {{PARAM_SET, PARAM_RELOAD, &KillonSGline}}},
+ {"KillonSQline", {{PARAM_SET, PARAM_RELOAD, &KillonSQline}}},
{"AddAkiller", {{PARAM_SET, PARAM_RELOAD, &AddAkiller}}},
{"KillClonesAkillExpire",
{{PARAM_TIME, PARAM_RELOAD, &KillClonesAkillExpire}}},
diff --git a/src/operserv.c b/src/operserv.c
index 176eed93b..ab0e90ea9 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -2519,7 +2519,11 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires,
const char *reason)
{
int deleted = 0, i;
+ int x;
SXLine *entry;
+ User *u2;
+ char buf[BUFSIZE];
+ *buf = '\0';
/* Checks whether there is an SGLINE that already covers
* the one we want to add, and whether there are SGLINEs
@@ -2595,6 +2599,17 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires,
anope_cmd_sgline(entry->mask, entry->reason);
+ if (KillonSGline && !ircd->sglineenforce) {
+ for (x = 0; x < 1024; x++) {
+ for (u2 = userlist[x]; u2; u2 = u2->next) {
+ if (match_wild_nocase(entry->mask, u2->realname)) {
+ snprintf(buf, BUFSIZE - 1, "G-Lined: %s",
+ entry->reason);
+ kill_user(ServerName, u2->nick, buf);
+ }
+ }
+ }
+ }
return deleted;
}
@@ -2972,7 +2987,11 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires,
const char *reason)
{
int deleted = 0, i;
+ int x;
+ User *u2;
SXLine *entry;
+ char buf[BUFSIZE];
+ *buf = '\0';
/* Checks whether there is an SQLINE that already covers
* the one we want to add, and whether there are SQLINEs
@@ -3052,6 +3071,18 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires,
sqline(entry->mask, entry->reason);
+ if (KillonSQline) {
+ for (x = 0; x < 1024; x++) {
+ for (u2 = userlist[x]; u2; u2 = u2->next) {
+ if (match_wild_nocase(entry->mask, u2->nick)) {
+ snprintf(buf, BUFSIZE - 1, "Q-Lined: %s",
+ entry->reason);
+ kill_user(ServerName, u2->nick, buf);
+ }
+ }
+ }
+ }
+
return deleted;
}
diff --git a/src/ptlink.c b/src/ptlink.c
index 13941b221..098b5bf9f 100644
--- a/src/ptlink.c
+++ b/src/ptlink.c
@@ -591,7 +591,7 @@ int anope_event_capab(char *source, int ac, char **av)
*/
void anope_cmd_sqline(char *mask, char *reason)
{
- send_cmd(NULL, "SQLINE %s :%s", mask, reason);
+ send_cmd(ServerName, "SQLINE %s :%s", mask, reason);
}
/*
@@ -646,7 +646,8 @@ void anope_cmd_unsqline(char *user)
void anope_cmd_join(char *user, char *channel, time_t chantime)
{
- send_cmd(user, "JOIN %s", channel);
+ send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) time(null),
+ channel, user);
}
/*
@@ -1589,7 +1590,7 @@ void anope_cmd_chg_nick(char *oldnick, char *newnick)
return;
}
- send_cmd(oldnick, "NICK %s", newnick);
+ send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(null));
}
/*
@@ -1597,11 +1598,11 @@ void anope_cmd_chg_nick(char *oldnick, char *newnick)
parv[0] = sender (services client)
parv[1] = target client nick
parv[2] = channels list
- :ChanServ SVSJOIN mynick 4163321 #Chan1,#Chan2
+ :OperServ SVSJOIN Trystan #Admin
*/
void anope_cmd_svsjoin(char *source, char *nick, char *chan)
{
- send_cmd(source, "SVSJOIN %s :%s", nick, chan);
+ send_cmd(source, "SVSJOIN %s %s", nick, chan);
}
/*
diff --git a/version.log b/version.log
index bc7239fa9..5c8d36dfd 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="6"
-VERSION_BUILD="503"
+VERSION_BUILD="504"
# $Log$
#
+# BUILD : 1.7.6 (504)
+# BUGS : 245
+# NOTES : Enforce SGLINE/SQLINE where the ircd does not do it on its own, and updated ptlink support to be more complaint
+#
# BUILD : 1.7.6 (503)
# BUGS : N/A
# NOTES : Fixes alot of user and channel modes on various ircd, also applied two patches provided by DrStein