summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorsjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>2009-05-08 15:10:52 +0000
committersjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>2009-05-08 15:10:52 +0000
commit1f48897042e392933d230d9a530abb436226d2d9 (patch)
tree1b08e61af9607710b27a259b20271370f663927b /src/core
parentfeab2cb85494c62131b936705f0eaad9f4c43b14 (diff)
Patch to allow jupe on all bar uplink and self. Thanks Adam. (Bug #1076)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2298 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
-rw-r--r--src/core/os_jupe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c
index 9243e953d..ce4c1978f 100644
--- a/src/core/os_jupe.c
+++ b/src/core/os_jupe.c
@@ -26,9 +26,12 @@ class CommandOSJupe : public Command
{
const char *jserver = params[0].c_str();
const char *reason = params.size() > 1 ? params[1].c_str() : NULL;
+ Server *server = findserver(servlist, jserver);
if (!isValidHost(jserver, 3))
notice_lang(s_OperServ, u, OPER_JUPE_HOST_ERROR);
+ else if (server && ((server->flags & SERVER_ISME) || (server->flags & SERVER_ISUPLINK)))
+ notice_lang(s_OperServ, u, OPER_JUPE_INVALID_SERVER);
else {
char rbuf[256];
snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", u->nick, reason ? ": " : "", reason ? reason : "");