diff options
author | sjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-05-08 15:10:05 +0000 |
---|---|---|
committer | sjaz <sjaz@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-05-08 15:10:05 +0000 |
commit | 9210aae6f994bc9511843fd7e9c94763b930d37b (patch) | |
tree | 1504b8e6ef854f076fc4e0b1c758420924753d60 | |
parent | d4b6968108f8582b293ff58b4657a3ccf075c7b0 (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/stable@2297 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | include/services.h | 1 | ||||
-rw-r--r-- | lang/cat.l | 2 | ||||
-rw-r--r-- | lang/de.l | 2 | ||||
-rw-r--r-- | lang/en_us.l | 2 | ||||
-rw-r--r-- | lang/es.l | 2 | ||||
-rw-r--r-- | lang/fr.l | 2 | ||||
-rw-r--r-- | lang/gr.l | 2 | ||||
-rw-r--r-- | lang/hun.l | 2 | ||||
-rw-r--r-- | lang/it.l | 2 | ||||
-rw-r--r-- | lang/nl.l | 2 | ||||
-rw-r--r-- | lang/pl.l | 2 | ||||
-rw-r--r-- | lang/pt.l | 2 | ||||
-rw-r--r-- | lang/ru.l | 2 | ||||
-rw-r--r-- | lang/tr.l | 2 | ||||
-rw-r--r-- | src/core/os_jupe.c | 3 | ||||
-rw-r--r-- | src/servers.c | 4 |
16 files changed, 33 insertions, 1 deletions
diff --git a/include/services.h b/include/services.h index 11a909c40..79ff66635 100644 --- a/include/services.h +++ b/include/services.h @@ -851,6 +851,7 @@ struct server_ { #define SERVER_ISME 0x0001 #define SERVER_JUPED 0x0002 +#define SERVER_ISUPLINK 0x0004 /*************************************************************************/ diff --git a/lang/cat.l b/lang/cat.l index 3d948e758..ec1076698 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -2953,6 +2953,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Please use a valid server name when juping +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2919,6 +2919,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Benutze bitte einen gültigen hostnamen, wenn du jupiterst +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX diff --git a/lang/en_us.l b/lang/en_us.l index ed942d942..1b42e39db 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -2865,6 +2865,8 @@ OPER_JUPE_SYNTAX JUPE servername [reason] OPER_JUPE_HOST_ERROR Please use a valid server name when juping +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2926,6 +2926,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Por favor usa un nombre de servidor valido cuando use JUPE +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2976,6 +2976,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Veuillez indiquer un nom de serveur valide pour JUPE. +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2956,6 +2956,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Please use a valid server name when juping +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX diff --git a/lang/hun.l b/lang/hun.l index e437f49a6..4025ee3fa 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -2915,6 +2915,8 @@ OPER_JUPE_SYNTAX JUPE szervernév [leírás] OPER_JUPE_HOST_ERROR Kérlek használj érvényes szerver nevet amikor jupolsz! +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW válaszok OPER_RAW_SYNTAX @@ -2879,6 +2879,8 @@ OPER_JUPE_SYNTAX JUPE nomeserver [motivo] OPER_JUPE_HOST_ERROR Prego utilizzare un nome server valido per jupe +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2925,6 +2925,8 @@ OPER_JUPE_SYNTAX JUPE servername [reden] OPER_JUPE_HOST_ERROR Gebruik een geldige servernaam bij het jupen +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -3868,6 +3868,8 @@ OPER_JUPE_SYNTAX OPER_JUPE_HOST_ERROR Proszê u¿yæ prawid³owej nazwy serwera. +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2891,6 +2891,8 @@ OPER_JUPE_SYNTAX JUPE servidor [motivo] OPER_JUPE_HOST_ERROR Por favor, use um nome de servidor válido quando estiver "jupando". +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2862,6 +2862,8 @@ OPER_JUPE_SYNTAX JUPE èìÿ_ñåðâåðà [ïðè÷èíà] OPER_JUPE_HOST_ERROR  êà÷åñòâå îñíîâíîãî ïàðàìåòðà âû äîëæíû óêàçàòü ðåàëüíîå èìÿ ñåðåâåðà +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX @@ -2950,6 +2950,8 @@ OPER_JUPE_SYNTAX # RAW responses OPER_JUPE_HOST_ERROR Please use a valid server name when juping +OPER_JUPE_INVALID_SERVER + You can not jupe your services server or your uplink server. # RAW responses OPER_RAW_SYNTAX diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c index f25977f5e..2b6146d64 100644 --- a/src/core/os_jupe.c +++ b/src/core/os_jupe.c @@ -74,8 +74,11 @@ int do_jupe(User * u) if (!jserver) { syntax_error(s_OperServ, u, "JUPE", OPER_JUPE_SYNTAX); } else { + 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 { anope_cmd_jupe(jserver, u->nick, reason); diff --git a/src/servers.c b/src/servers.c index 08391e823..8aa5b2a12 100644 --- a/src/servers.c +++ b/src/servers.c @@ -155,8 +155,10 @@ Server *new_server(Server * uplink, const char *name, const char *desc, uplink->links = serv; } /* Check if this is our uplink server */ - if ((uplink == me_server) && !(flags & SERVER_JUPED)) + if ((uplink == me_server) && !(flags & SERVER_JUPED)) { serv_uplink = serv; + serv->flags |= SERVER_ISUPLINK; + } /* Write the StartGlobal (to non-juped servers) */ if (GlobalOnCycle && GlobalOnCycleUP && !(flags & SERVER_JUPED)) |