From 2fba686904e6f78ebab35df171c5757afeebf05d Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 24 May 2010 23:36:40 -0500 Subject: Burned slist, rewrote operservs XLine code --- data/example.conf | 22 +- data/tables.sql | 8 +- docs/Changes | 1 + docs/Changes.conf | 5 + docs/Changes.lang | 53 ++ docs/IRCD | 4 +- include/Makefile | 3 - include/account.h | 2 +- include/config.h | 16 +- include/extern.h | 59 -- include/modules.h | 26 +- include/operserv.h | 231 ++++++ include/services.h | 71 +- include/slist.h | 49 -- lang/cat.l | 146 ++-- lang/de.l | 146 ++-- lang/en_us.l | 140 ++-- lang/es.l | 146 ++-- lang/fr.l | 144 ++-- lang/gr.l | 144 ++-- lang/hun.l | 140 ++-- lang/it.l | 142 ++-- lang/nl.l | 142 ++-- lang/pl.l | 132 ++-- lang/pt.l | 140 ++-- lang/ru.l | 144 ++-- lang/tr.l | 142 ++-- src/Makefile | 4 +- src/actions.c | 40 - src/bots.cpp | 3 +- src/config.c | 12 +- src/core/bs_bot.c | 15 +- src/core/cs_drop.c | 3 +- src/core/cs_forbid.c | 3 +- src/core/db_plain.cpp | 99 ++- src/core/hs_delall.c | 8 +- src/core/ns_drop.c | 5 +- src/core/ns_forbid.c | 5 +- src/core/ns_group.c | 20 +- src/core/ns_saset.c | 14 +- src/core/ns_set.c | 18 +- src/core/ns_suspend.c | 8 +- src/core/os_akill.c | 336 +++++---- src/core/os_chankill.c | 10 +- src/core/os_defcon.c | 24 +- src/core/os_sgline.c | 410 ----------- src/core/os_snline.cpp | 426 +++++++++++ src/core/os_sqline.c | 324 +++++---- src/core/os_stats.c | 114 +-- src/core/os_szline.c | 321 ++++---- src/hostserv.c | 4 +- src/init.c | 3 +- src/main.c | 10 - src/memoserv.c | 7 +- src/misc.c | 14 +- src/modules/mysql/db_mysql_read.cpp | 57 +- src/modules/mysql/db_mysql_write.cpp | 77 +- src/nickalias.cpp | 10 +- src/nickcore.cpp | 1 - src/nickserv.c | 6 +- src/operserv.c | 1325 ++++++++++++++-------------------- src/protocol/bahamut.c | 46 +- src/protocol/inspircd11.c | 32 +- src/protocol/inspircd12.cpp | 34 +- src/protocol/ratbox.c | 30 +- src/protocol/unreal32.c | 48 +- src/regchannel.cpp | 9 +- src/send.c | 18 + src/sessions.c | 8 +- src/slist.c | 395 ---------- src/tools/db-convert.c | 4 +- src/users.c | 15 +- 72 files changed, 3155 insertions(+), 3618 deletions(-) create mode 100644 include/operserv.h delete mode 100644 include/slist.h delete mode 100644 src/core/os_sgline.c create mode 100644 src/core/os_snline.cpp delete mode 100644 src/slist.c diff --git a/data/example.conf b/data/example.conf index aa7d9ab8b..0954b8d0d 100644 --- a/data/example.conf +++ b/data/example.conf @@ -603,7 +603,7 @@ options * * operserv/global operserv/news operserv/stats operserv/kick * operserv/mode operserv/session operserv/modlist operserv/ignore - * operserv/chankill operserv/akill operserv/sqline operserv/sgline + * operserv/chankill operserv/akill operserv/sqline operserv/snline * operserv/szline operserv/clearmodes operserv/staff operserv/defcon * operserv/modload operserv/jupe operserv/set operserv/noop * operserv/quit operserv/update operserv/reload operserv/restart @@ -636,7 +636,7 @@ opertype inherits = "Helper, Another Helper" /* What commands (see above) this opertype may use */ - commands = "chanserv/list chanserv/suspend chanserv/status chanserv/topic memoserv/staff nickserv/sendpass nickserv/resetpass nickserv/suspend operserv/mode operserv/chankill operserv/szline operserv/akill operserv/session operserv/clearmodes operserv/modlist operserv/sqline operser/staff operserv/kick operserv/ignore operserv/sgline" + commands = "chanserv/list chanserv/suspend chanserv/status chanserv/topic memoserv/staff nickserv/sendpass nickserv/resetpass nickserv/suspend operserv/mode operserv/chankill operserv/szline operserv/akill operserv/session operserv/clearmodes operserv/modlist operserv/sqline operserv/staff operserv/kick operserv/ignore operserv/snline" /* What privs (see above) this opertype has */ privs = "chanserv/auspex chanserv/no-register-limit memoserv/* nickserv/auxpex nickserv/confirm" @@ -1264,7 +1264,7 @@ operserv * The core modules to load for OperServ. This is a space separated list that corresponds * to the base names of the modules for OperServ. This directive is optional, but highly recommended. */ - modules = "os_help os_global os_stats os_staff os_mode os_kick os_clearmodes os_akill os_sgline os_sqline os_szline os_chanlist os_userlist os_news os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo" + modules = "os_help os_global os_stats os_staff os_mode os_kick os_clearmodes os_akill os_snline os_sqline os_szline os_chanlist os_userlist os_news os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo" /* * If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant @@ -1280,12 +1280,12 @@ operserv logmaxusers = yes /* - * These define the default expiration times for, respectively, AKILLs, CHANKILLs, SGLINEs, + * These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs, * SQLINEs, and SZLINEs. */ autokillexpiry = 30d chankillexpiry = 30d - sglineexpiry = 30d + snlineexpiry = 30d sqlineexpiry = 30d szlineexpiry = 30d @@ -1297,11 +1297,11 @@ operserv #akillonadd = yes /* - * If set, this option will make Services send an (SVS)KILL command immediately after SGLINE ADD. - * This eliminates the need for killingthe user after the SGLINE has been added. This directive + * If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD. + * This eliminates the need for killingthe user after the SNLINE has been added. This directive * is optional. */ - #killonsgline = yes + #killonsnline = yes /* * If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD. @@ -1321,13 +1321,13 @@ operserv * - osclearmodes: OperServ's CLEARMODES command was used * - oskick: OperServ's KICK command was used * - osakill: OperServ's AKILL command was used - * - ossgline: OperServ's SGLINE command was used + * - ossnline: OperServ's SNLINE command was used * - ossqline: OperServ's SQLINE command was used * - osszline: OperServ's SZLINE command was used * - osnoop: OperServ's NOOP command was used * - osjupe: OperServ's JUPE command was used * - akillexpire: An AKILL has expired - * - sglineexpire: An SGLINE has expired + * - snlineexpire: An SNLINE has expired * - sqlineexpire: An SQLINE has expired * - szlineexpire: An SZLINE has expired * - exceptionexpire: A session exception has expired @@ -1340,7 +1340,7 @@ operserv * * This directive is optional, if left blank, there will be no notifications. */ - notifications="osglobal osmode osclearmodes oskick osakill ossgline ossqline osszline osnoop osjupe getpass setpass forbid drop" + notifications="osglobal osmode osclearmodes oskick osakill ossnline ossqline osszline osnoop osjupe getpass setpass forbid drop" /* * Enables session limiting. Session limiting prevents users from connecting more than a certain diff --git a/data/tables.sql b/data/tables.sql index 23ba0ca50..deeef41cc 100644 --- a/data/tables.sql +++ b/data/tables.sql @@ -322,7 +322,7 @@ CREATE TABLE anope_os_core ( maxusercnt int(11) NOT NULL default '0', maxusertime int(10) unsigned NOT NULL default '0', akills_count int(11) NOT NULL default '0', - sglines_count int(11) NOT NULL default '0', + snlines_count int(11) NOT NULL default '0', sqlines_count int(11) NOT NULL default '0', szlines_count int(11) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -346,11 +346,11 @@ CREATE TABLE anope_os_exceptions ( -- -------------------------------------------------------- -- --- Table structure for table 'anope_os_sxlines' +-- Table structure for table 'anope_os_xlines' -- -DROP TABLE IF EXISTS anope_os_sxlines; -CREATE TABLE anope_os_sxlines ( +DROP TABLE IF EXISTS anope_os_xlines; +CREATE TABLE anope_os_xlines ( type varchar(20) NOT NULL, mask varchar(255) NOT NULL, xby text NOT NULL, diff --git a/docs/Changes b/docs/Changes index d88eae010..7786757fa 100644 --- a/docs/Changes +++ b/docs/Changes @@ -6,6 +6,7 @@ A Added official support for InspIRCd 2.0 A Prevent negaitve mode changes, kicks, bans, and autokicks from affecting people with the 'god' user mode (On UnrealIRCd, usermode +q) A Added nickserv/auxpex permission A Added nickserv ungroup command +A Renamed the SGLINE to be SNLINE Anope Version 1.9.2 -------------------- diff --git a/docs/Changes.conf b/docs/Changes.conf index 944238db6..03d012a14 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -6,6 +6,11 @@ SSL module added for SSL support opertype:inherits added to allow opertypes to inherit commands and privs from other opertypes ** MODIFIED CONFIGURATION DIRECTIVES ** +opertype:commands changed operserv/sgline to opserv/snline +operserv:modules changed os_sgline to os_snline +operserv:sglineexpiry changed to operserv:snlineexpiry +operserv:killonsgline changed to operserv:killonsnline +operserv:notifications ossgline changed ossnline ** DELETED CONFIGURATION DIRECTIVES ** diff --git a/docs/Changes.lang b/docs/Changes.lang index 4289ba295..701d4fff4 100644 --- a/docs/Changes.lang +++ b/docs/Changes.lang @@ -12,6 +12,31 @@ Anope Version 1.9.3 NICK_MAIL_TEXT NICK_SENDPASS CHAN_LEVEL_FOUNDER + OPER_STATS_SNLINE_COUNT + OPER_STATS_SNLINE_EXPIRE_DAY + OPER_STATS_SNLINE_EXPIRE_HOURS + OPER_STATS_SNLINE_EXPIRE_MINS + OPER_STATS_SNLINE_EXPIRE_MIN + OPER_STATS_SNLINE_EXPIRE_NONE + OPER_SNLINE_SYNTAX + OPER_SNLINE_UNSUPPORTED + OPER_SNLINE_EXISTS + OPER_SNLINE_ALREADY_COVERED + OPER_SNLINE_REACHED_LIMIT + OPER_SNLINE_ADDED + OPER_SNLINE_CHANGED + OPER_SNLINE_NOT_FOUND + OPER_SNLINE_NO_MATCH + OPER_SNLINE_DELETED + OPER_SNLINE_DELETED_ONE + OPER_SNLINE_DELETED_SEVERAL + OPER_SNLINE_LIST_EMPTY + OPER_SNLINE_LIST_HEADER + OPER_SNLINE_LIST_FORMAT + OPER_SNLINE_VIEW_HEADER + OPER_SNLINE_CLEAR + OPER_HELP_CMD_SNLINE + OPER_HELP_SNLINE *** Mod Strings: NICK_GLIST_REPLY @@ -34,6 +59,34 @@ Anope Version 1.9.3 NICK_SENDPASS_HEAD_3 NICK_SENDPASS_HEAD_4 NICK_SENDPASS_HEAD_5 +<<<<<<< HEAD + OPER_STATS_SGLINE_COUNT + OPER_STATS_SGLINE_EXPIRE_DAY + OPER_STATS_SGLINE_EXPIRE_HOURS + OPER_STATS_SGLINE_EXPIRE_MINS + OPER_STATS_SGLINE_EXPIRE_MIN + OPER_STATS_SGLINE_EXPIRE_NONE + OPER_SGLINE_SYNTAX + OPER_SGLINE_UNSUPPORTED + OPER_SGLINE_EXISTS + OPER_SGLINE_ALREADY_COVERED + OPER_SGLINE_REACHED_LIMIT + OPER_SGLINE_ADDED + OPER_SGLINE_CHANGED + OPER_SGLINE_NOT_FOUND + OPER_SGLINE_NO_MATCH + OPER_SGLINE_DELETED + OPER_SGLINE_DELETED_ONE + OPER_SGLINE_DELETED_SEVERAL + OPER_SGLINE_LIST_EMPTY + OPER_SGLINE_LIST_HEADER + OPER_SGLINE_LIST_FORMAT + OPER_SGLINE_VIEW_HEADER + OPER_SGLINE_CLEAR + OPER_HELP_CMD_SGLINE + OPER_HELP_SGLINE +======= +>>>>>>> 1.9.3-2 Anope Version 1.9.2 -------------------- diff --git a/docs/IRCD b/docs/IRCD index 52ee424bb..ad81c97f1 100644 --- a/docs/IRCD +++ b/docs/IRCD @@ -85,7 +85,7 @@ How To Add IRCd Support 6) VHOST: Can a user's host be changed on the fly? Enabling this allow HostServ online. Use 1 for yes, 0 for no. - 7) SGLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes, + 7) SNLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes, 0 for no. 8) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no. @@ -172,7 +172,7 @@ How To Add IRCd Support 35) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use 1 for yes, 0 for no. - 36) SGline Enforce: Does the IRCd enforce SGLINES for us or do we need to + 36) SGline Enforce: Does the IRCd enforce SNLINES for us or do we need to do so? Use 1 for yes, 0 for no. 37) Vhost Character: The character used to represent the vHost mode, if diff --git a/include/Makefile b/include/Makefile index 4c20fa502..de32199d3 100644 --- a/include/Makefile +++ b/include/Makefile @@ -7,9 +7,6 @@ version.h: Makefile version.sh services.h $(SRCS) services.h: sysconf.h config.h extern.h touch $@ -extern.h: slist.h - touch $@ - clean: (rm -f language.h) diff --git a/include/account.h b/include/account.h index 1a567c317..e44880c29 100644 --- a/include/account.h +++ b/include/account.h @@ -161,7 +161,7 @@ class CoreExport NickCore : public Extensible, public Flags /* Unsaved data */ time_t lastmail; /* Last time this nick record got a mail */ - SList aliases; /* List of aliases */ + std::list aliases; /* List of aliases */ /** Check whether this opertype has access to run the given command string. * @param cmdstr The string to check, e.g. botserv/set/private. diff --git a/include/config.h b/include/config.h index c6dbbefb8..dacf3db06 100644 --- a/include/config.h +++ b/include/config.h @@ -623,16 +623,16 @@ class ServerConfig time_t AutokillExpiry; /* Default expiry time for chan kills */ time_t ChankillExpiry; - /* Default expiry time for SGLine Expire */ - time_t SGLineExpiry; + /* Default expiry time for SNLine Expire */ + time_t SNLineExpiry; /* Default expiry time for SQLines */ time_t SQLineExpiry; /* Default expiry time for SZLine */ time_t SZLineExpiry; /* Actually akill the user when the akill is added */ bool AkillOnAdd; - /* Kill users on SGline */ - bool KillonSGline; + /* Kill users on SNLine */ + bool KillonSNline; /* Kill users on SQline */ bool KillonSQline; /* Send a WALLOPS/GLOBOPS when a user opers */ @@ -649,8 +649,8 @@ class ServerConfig bool WallOSKick; /* Send a WALLOPS/GLOBOPS when someone uses the AKILL command */ bool WallOSAkill; - /* Send a WALLOPS/GLOBOPS when someone uses the SGLINE command */ - bool WallOSSGLine; + /* Send a WALLOPS/GLOBOPS when someone uses the SNLINE command */ + bool WallOSSNLine; /* Send a WALLOPS/GLOBOPS when someone uses the SQLINE command */ bool WallOSSQLine; /* Send a WALLOPS/GLOBOPS when someone uses the SZLINE command */ @@ -661,8 +661,8 @@ class ServerConfig bool WallOSJupe; /* Send a WALLOPS/GLOBOPS when an akill expires */ bool WallAkillExpire; - /* Send a WALLOPS/GLOBOPS when SGLines expire */ - bool WallSGLineExpire; + /* Send a WALLOPS/GLOBOPS when SNLines expire */ + bool WallSNLineExpire; /* Send a WALLOPS/GLOBOPS when SQLines expire */ bool WallSQLineExpire; /* Send a WALLOPS/GLOBOPS when SZLines expire */ diff --git a/include/extern.h b/include/extern.h index 6f41c3977..1e88561e3 100644 --- a/include/extern.h +++ b/include/extern.h @@ -17,7 +17,6 @@ #define E extern CoreExport #define EI extern DllExport -#include "slist.h" #include "hashcomp.h" E void ModuleRunTimeDirCleanUp(); @@ -33,7 +32,6 @@ E IRCDProto *ircdproto; E void kill_user(const std::string &source, const std::string &user, const std::string &reason); E bool bad_password(User *u); -E void sqline(const std::string &mask, const std::string &reason); E void common_unban(ChannelInfo *ci, const std::string &nick); E BotInfo *BotServ; @@ -372,50 +370,6 @@ E NickCore *findcore(const std::string &nick); E NickCore *findcore(const ci::string &nick); E bool is_on_access(User *u, NickCore *nc); -/**** operserv.c ****/ - -E SList akills, sglines, sqlines, szlines; - -E int DefConModesSet; -E Flags DefConModesOn; -E Flags DefConModesOff; -E std::map DefConModesOnParams; -E bool SetDefConParam(ChannelModeName, std::string &); -E bool GetDefConParam(ChannelModeName, std::string *); -E void UnsetDefConParam(ChannelModeName); - -E void operserv(User *u, char *buf); -E void os_init(); - -E int add_akill(User *u, const char *mask, const char *by, const time_t expires, const char *reason); -E int check_akill(const char *nick, const char *username, const char *host, const char *vhost, const char *ip); -E void expire_akills(); -E void oper_global(char *nick, const char *fmt, ...); - -E int add_sgline(User *u, const char *mask, const char *by, time_t expires, const char *reason); -E int check_sgline(const char *nick, const char *realname); -E void expire_sglines(); - -E int add_sqline(User *u, const char *mask, const char *by, time_t expires, const char *reason); -E int check_sqline(const char *nick, int nick_change); -E void expire_sqlines(); -E int check_chan_sqline(const char *chan); - -E int add_szline(User * u, const char *mask, const char *by, - time_t expires, const char *reason); -E void expire_szlines(); -E int check_szline(const char *nick, char *ip); - -E void server_global(Server *s, const std::string &message); - -E std::vector News; - -E bool CheckDefCon(DefconLevel Level); -E bool CheckDefCon(int level, DefconLevel Level); -E void AddDefCon(int level, DefconLevel Level); -E void DelDefCon(int level, DefconLevel Level); -E std::vector > DefCon; - /**** process.c ****/ E int allow_ignore; @@ -463,19 +417,6 @@ E int exception_add(User * u, const char *mask, const int limit, const char *reason, const char *who, const time_t expires); -/**** slist.c ****/ -E int slist_add(SList *slist, void *item); -E void slist_clear(SList *slist, int free); -E int slist_delete(SList *slist, int index); -E int slist_delete_range(SList *slist, const char *range, slist_delcheckcb_t cb, ...); -E int slist_enum(SList *slist, const char *range, slist_enumcb_t cb, ...); -E int slist_full(SList *slist); -E int slist_indexof(SList *slist, void *item); -E void slist_init(SList *slist); -E void slist_pack(SList *slist); -E int slist_remove(SList *slist, void *item); -E int slist_setcapacity(SList *slist, int16 capacity); - /**** sockets.cpp ****/ E SocketEngine socketEngine; E int32 TotalRead; diff --git a/include/modules.h b/include/modules.h index 98dfd6d3e..963e07a4c 100644 --- a/include/modules.h +++ b/include/modules.h @@ -713,13 +713,13 @@ class CoreExport Module * @param ak The akill * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it */ - virtual EventReturn OnAddAkill(User *u, Akill *ak) { return EVENT_CONTINUE; } + virtual EventReturn OnAddAkill(User *u, XLine *ak) { return EVENT_CONTINUE; } /** Called before an akill is deleted * @param u The user removing the akill * @param ak The akill, can be NULL for all akills! */ - virtual void OnDelAkill(User *u, Akill *ak) { } + virtual void OnDelAkill(User *u, XLine *ak) { } /** Called after an exception has been added * @param u The user who added it @@ -734,20 +734,20 @@ class CoreExport Module */ virtual void OnExceptionDel(User *u, Exception *ex) { } - /** Called before a SXLine is added - * @param u The user adding the SXLine - * @param sx The SXLine - * @param Type The type of SXLine this is + /** Called before a XLine is added + * @param u The user adding the XLine + * @param sx The XLine + * @param Type The type of XLine this is * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it */ - virtual EventReturn OnAddSXLine(User *u, SXLine *sx, SXLineType Type) { return EVENT_CONTINUE; } + virtual EventReturn OnAddXLine(User *u, XLine *x, XLineType Type) { return EVENT_CONTINUE; } - /** Called before a SXLine is deleted - * @param u The user deleting the SXLine - * @param sx The SXLine, can be NULL for all SXLines - * @param Type The type of SXLine this is + /** Called before a XLine is deleted + * @param u The user deleting the XLine + * @param sx The XLine, can be NULL for all XLines + * @param Type The type of XLine this is */ - virtual void OnDelSXLine(User *u, SXLine *sx, SXLineType Type) { } + virtual void OnDelXLine(User *u, XLine *x, XLineType Type) { } /** Called when a server quits * @param server The server @@ -1118,7 +1118,7 @@ enum Implementation /* OperServ */ I_OnOperServHelp, I_OnDefconLevel, I_OnAddAkill, I_OnDelAkill, I_OnExceptionAdd, I_OnExceptionDel, - I_OnAddSXLine, I_OnDelSXLine, + I_OnAddXLine, I_OnDelXLine, /* Database */ I_OnPostLoadDatabases, I_OnSaveDatabase, I_OnLoadDatabase, diff --git a/include/operserv.h b/include/operserv.h new file mode 100644 index 000000000..ff2149372 --- /dev/null +++ b/include/operserv.h @@ -0,0 +1,231 @@ +/* OperServ support + * + * (C) 2008-2010 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + * $Id$ + * + */ + +extern CoreExport std::vector News; +extern CoreExport std::vector > DefCon; +extern CoreExport bool DefConModesSet; +extern CoreExport Flags DefConModesOn; +extern CoreExport Flags DefConModesOff; +extern CoreExport std::map DefConModesOnParams; + +class XLineManager; +extern CoreExport XLineManager *SGLine; +extern CoreExport XLineManager *SZLine; +extern CoreExport XLineManager *SQLine; +extern CoreExport XLineManager *SNLine; + +extern CoreExport bool SetDefConParam(ChannelModeName, std::string &); +extern CoreExport bool GetDefConParam(ChannelModeName, std::string &); +extern CoreExport void UnsetDefConParam(ChannelModeName); +extern CoreExport bool CheckDefCon(DefconLevel Level); +extern CoreExport bool CheckDefCon(int level, DefconLevel Level); +extern CoreExport void AddDefCon(int level, DefconLevel Level); +extern CoreExport void DelDefCon(int level, DefconLevel Level); + +extern CoreExport void operserv(User *u, char *buf); +extern CoreExport void os_init(); + +extern CoreExport void oper_global(char *nick, const char *fmt, ...); +extern CoreExport void server_global(Server *s, const std::string &message); + +enum XLineType +{ + X_SNLINE, + X_SQLINE, + X_SZLINE +}; + +struct XLine +{ + ci::string Mask; + ci::string By; + time_t Created; + time_t Expires; + std::string Reason; + + XLine(const ci::string &mask, const std::string &reason = ""); + + XLine(const ci::string &mask, const ci::string &by, const time_t expires, const std::string &reason); + + ci::string GetNick() const; + ci::string GetUser() const; + ci::string GetHost() const; +}; + +class CoreExport XLineManager +{ + private: + /* List of XLine managers we check users against in XLineManager::CheckAll */ + static std::list XLineManagers; + + protected: + /* List of XLines in this XLineManager */ + std::deque XLines; + public: + /** Constructor + */ + XLineManager(); + + /** Destructor + */ + virtual ~XLineManager(); + + /** Register a XLineManager, places it in XLineManagers for use in XLineManager::CheckAll + * It is important XLineManagers are registered in the proper order. Eg, if you had one akilling + * clients and one handing them free olines, you would want the akilling one first. This way if a client + * matches an entry on both of the XLineManagers, they would be akilled. + * @param xlm THe XLineManager + */ + static void RegisterXLineManager(XLineManager *xlm); + + /** Unregister a XLineManager + * @param xlm The XLineManager + */ + static void UnregisterXLineManager(XLineManager *xlm); + + /** Check a user against all known XLineManagers + * Wparam u The user + * @return A pair of the XLineManager the user was found in and the XLine they matched, both may be NULL for no match + */ + static std::pair CheckAll(User *u); + + /** Get the number of XLines in this XLineManager + * @return The number of XLines + */ + const size_t GetCount() const; + + /** Get the XLine list + * @return The list + */ + const std::deque& GetList() const; + + /** Add an entry to this XLineManager + * @param x The entry + */ + void AddXLine(XLine *x); + + /** Delete an entry from this XLineManager + * @param x The entry + * @return true if the entry was found and deleted, else false + */ + bool DelXLine(XLine *x); + + /** Gets an entry by index + * @param index The index + * @return The XLine, or NULL if the index is out of bounds + */ + XLine *GetEntry(unsigned index) const; + + /** Clear the XLine list + */ + void Clear(); + + /** Add an entry to this XLine Manager + * @param bi The bot error replies should be sent from + * @param u The user adding the XLine + * @param mask The mask of the XLine + * @param expires When this should expire + * @param reaosn The reason + * @return A pointer to the XLine + */ + virtual XLine *Add(BotInfo *bi, User *u, const ci::string &mask, time_t expires, const std::string &reason); + + /** Delete an XLine, eg, remove it from the IRCd. + * @param x The xline + */ + virtual void Del(XLine *x); + + /** Checks if a mask can/should be added to the XLineManager + * @param mask The mask + * @param expires When the mask would expire + * @return A pair of int and XLine*. + * 1 - Mask already exists + * 2 - Mask already exists, but the expiry time was changed + * 3 - Mask is already covered by another mask + * In each case the XLine it matches/is covered by is returned in XLine* + */ + std::pair CanAdd(const ci::string &mask, time_t expires); + + /** Checks if this list has an entry + * @param mask The mask + * @return The XLine the user matches, or NULL + */ + XLine *HasEntry(const ci::string &mask) const; + + /** Check a user against all of the xlines in this XLineManager + * @param u The user + * @return The xline the user marches, if any. Also calls OnMatch() + */ + virtual XLine *Check(User *u); + + /** Called when a user matches a xline in this XLineManager + * @param u The user + * @param x The XLine they match + */ + virtual void OnMatch(User *u, XLine *x); + + /** Called when an XLine expires + * @param x The xline + */ + virtual void OnExpire(XLine *x); +}; + +/* This is for AKILLS */ +class SGLineManager : public XLineManager +{ + public: + XLine *Add(BotInfo *bi, User *u, const ci::string &mask, time_t expires, const std::string &reason); + + void Del(XLine *x); + + void OnMatch(User *u, XLine *x); + + void OnExpire(XLine *x); +}; + +class SNLineManager : public XLineManager +{ + public: + XLine *Add(BotInfo *bi, User *u, const ci::string &mask, time_t expires, const std::string &reason); + + void Del(XLine *x); + + void OnMatch(User *u, XLine *x); + + void OnExpire(XLine *x); +}; + +class SQLineManager : public XLineManager +{ + public: + XLine *Add(BotInfo *bi, User *u, const ci::string &mask, time_t expires, const std::string &reason); + + void Del(XLine *x); + + void OnMatch(User *u, XLine *x); + + void OnExpire(XLine *x); + + static bool Check(Channel *c); +}; + +class SZLineManager : public XLineManager +{ + public: + XLine *Add(BotInfo *bi, User *u, const ci::string &mask, time_t expires, const std::string &reason); + + void Del(XLine *x); + + void OnMatch(User *u, XLine *x); + + void OnExpire(XLine *x); +}; + diff --git a/include/services.h b/include/services.h index 0a4648105..a84e6ae8c 100644 --- a/include/services.h +++ b/include/services.h @@ -202,7 +202,6 @@ extern int strncasecmp(const char *, const char *, size_t); /* Miscellaneous definitions. */ #include "hashcomp.h" -#include "slist.h" /* Pull in the various bits of STL */ #include @@ -359,7 +358,6 @@ struct Session; typedef struct bandata_ BanData; typedef struct mailinfo_ MailInfo; -typedef struct akill_ Akill; typedef struct exception_ Exception; #include "extensible.h" @@ -381,7 +379,7 @@ struct ircdvars_ { const char *botchanumode; /* Modes set when botserv joins a channel */ int svsnick; /* Supports SVSNICK */ int vhost; /* Supports vhost */ - int sgline; /* Supports SGline */ + int snline; /* Supports SNline */ int sqline; /* Supports SQline */ int szline; /* Supports SZline */ int numservargs; /* Number of Server Args */ @@ -780,39 +778,6 @@ struct mailinfo_ { /*************************************************************************/ -struct akill_ { - char *user; /* User part of the AKILL */ - char *host; /* Host part of the AKILL */ - - char *by; /* Who set the akill */ - char *reason; /* Why they got akilled */ - - time_t seton; /* When it was set */ - time_t expires; /* When it expires */ -}; - -/*************************************************************************/ - -/* Structure for OperServ SGLINE and SZLINE commands */ - -enum SXLineType -{ - SX_SGLINE, - SX_SQLINE, - SX_SZLINE -}; - -struct SXLine { - char *mask; - char *by; - char *reason; - time_t seton; - time_t expires; -}; - - -/************************************************************************/ - struct exception_ { char *mask; /* Hosts to which this exception applies */ int limit; /* Session limit for exception */ @@ -906,6 +871,7 @@ struct Uplink; class ServerConfig; #include "extern.h" +#include "operserv.h" #include "mail.h" #include "servers.h" #include "config.h" @@ -933,8 +899,8 @@ class CoreExport IRCDProto virtual void SendSVSNOOP(const char *, int) { } virtual void SendTopic(BotInfo *, Channel *, const char *, const char *) = 0; virtual void SendVhostDel(User *) { } - virtual void SendAkill(Akill *) = 0; - virtual void SendAkillDel(Akill *) = 0; + virtual void SendAkill(XLine *) = 0; + virtual void SendAkillDel(XLine *) = 0; virtual void SendSVSKill(BotInfo *source, User *user, const char *fmt, ...); virtual void SendSVSMode(User *, int, const char **) = 0; virtual void SendMode(BotInfo *bi, Channel *dest, const char *fmt, ...); @@ -959,11 +925,11 @@ class CoreExport IRCDProto virtual void SendPing(const char *servname, const char *who); virtual void SendPong(const char *servname, const char *who); virtual void SendJoin(BotInfo *bi, const char *, time_t) = 0; - virtual void SendSQLineDel(const std::string &) = 0; + virtual void SendSQLineDel(XLine *x) = 0; virtual void SendInvite(BotInfo *bi, const char *chan, const char *nick); virtual void SendPart(BotInfo *bi, Channel *chan, const char *fmt, ...); virtual void SendGlobops(BotInfo *source, const char *fmt, ...); - virtual void SendSQLine(const std::string &, const std::string &) = 0; + virtual void SendSQLine(XLine *x) = 0; virtual void SendSquit(const char *servname, const char *message); virtual void SendSVSO(const char *, const char *, const char *) { } virtual void SendChangeBotNick(BotInfo *bi, const char *newnick); @@ -972,10 +938,10 @@ class CoreExport IRCDProto virtual void SendConnect() = 0; virtual void SendSVSHold(const char *) { } virtual void SendSVSHoldDel(const char *) { } - virtual void SendSGLineDel(SXLine *) { } - virtual void SendSZLineDel(SXLine *) { } - virtual void SendSZLine(SXLine *) { } - virtual void SendSGLine(SXLine *) { } + virtual void SendSGLineDel(XLine *) { } + virtual void SendSZLineDel(XLine *) { } + virtual void SendSZLine(XLine *) { } + virtual void SendSGLine(XLine *) { } virtual void SendBanDel(Channel *, const std::string &) { } virtual void SendSVSModeChan(Channel *, const char *, const char *) { } virtual void SendUnregisteredNick(User *) { } @@ -1064,8 +1030,8 @@ class CoreExport Anope { public: /** Check whether two strings match. - * @param mask The pattern to check (e.g. foo*bar) * @param str The string to check against the pattern (e.g. foobar) + * @param mask The pattern to check (e.g. foo*bar) * @param case_sensitive Whether or not the match is case sensitive, default false. */ static bool Match(const std::string &str, const std::string &mask, bool case_sensitive = false); @@ -1162,7 +1128,7 @@ class ChanServTimer : public Timer void Tick(time_t); }; -/** A class to process numbered lists (passed to most DEL commands). +/** A class to process numbered lists (passed to most DEL/LIST/VIEW commands). * The function HandleNumber is called for every number in the list. Note that * it *always* gets called in descending order. This is so deleting the index passed * to the function from an array will not cause the other indexes passed to the function @@ -1178,12 +1144,25 @@ class NumberList */ NumberList(const std::string &list); + /** Destructor, does nothing + */ virtual ~NumberList(); + /** Should be called after the constructors are done running. This calls the callbacks. + */ void Process(); + /** Called with a number from the list + * @param Number The number + */ virtual void HandleNumber(unsigned Number); + /** Called when there is an error with the numbered list + * Return false to immediatly stop processing the list and return + * This is all done before we start calling HandleNumber, so no numbers will have been processed yet + * @param The list + * @return false to stop processing + */ virtual bool InvalidRange(const std::string &list); }; diff --git a/include/slist.h b/include/slist.h deleted file mode 100644 index 3377cd48f..000000000 --- a/include/slist.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Header for Services list handler. - * - * (C) 2003-2010 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -#ifndef SLIST_H -#define SLIST_H - -typedef struct slist_ SList; -typedef struct slistopts_ SListOpts; - -struct slist_ { - void **list; - - int16 count; /* Total entries of the list */ - int16 capacity; /* Capacity of the list */ - int16 limit; /* Maximum possible entries on the list */ - - SListOpts *opts; -}; - -struct slistopts_ { - int32 flags; /* Flags for the list. See below. */ - - int (*compareitem) (SList *slist, void *item1, void *item2); /* Called to compare two items */ - int (*isequal) (SList *slist, void *item1, void *item2); /* Called by slist_indexof. item1 can be an arbitrary pointer. */ - void (*freeitem) (SList *slist, void *item); /* Called when an item is removed */ -}; - -#define SLIST_DEFAULT_LIMIT 32767 - -#define SLISTF_NODUP 0x00000001 /* No duplicates in the list. */ -#define SLISTF_SORT 0x00000002 /* Automatically sort the list. Used with compareitem member. */ - -/* Note that number is the index in the array + 1 */ -typedef int (*slist_enumcb_t) (SList *slist, int number, void *item, va_list args); -/* Callback to know whether we can delete the entry. */ -typedef int (*slist_delcheckcb_t) (SList *slist, void *item, va_list args); - -#endif /* SLIST_H */ - diff --git a/lang/cat.l b/lang/cat.l index b662ab0e0..116d42037 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -2575,22 +2575,22 @@ OPER_STATS_AKILL_EXPIRE_MIN Temps d'expiració per defecte de AKILL: 1 minut OPER_STATS_AKILL_EXPIRE_NONE Temps d'expiració per defecte de AKILL: Sense expiració -OPER_STATS_SGLINE_COUNT - Numero actual de SGLINEs: %d -OPER_STATS_SGLINE_EXPIRE_DAYS - Temps d'expiració per defecte de SGLINE: %d dies -OPER_STATS_SGLINE_EXPIRE_DAY - Temps d'expiració per defecte de SGLINE: 1 dia -OPER_STATS_SGLINE_EXPIRE_HOURS - Temps d'expiració per defecte de SGLINE: %d hores -OPER_STATS_SGLINE_EXPIRE_HOUR - Temps d'expiració per defecte de SGLINE: 1 hora -OPER_STATS_SGLINE_EXPIRE_MINS - Temps d'expiració per defecte de SGLINE: %d minuts -OPER_STATS_SGLINE_EXPIRE_MIN - Temps d'expiració per defecte de SGLINE: 1 minut -OPER_STATS_SGLINE_EXPIRE_NONE - Temps d'expiració per defecte de SGLINE: Sense expiració +OPER_STATS_SNLINE_COUNT + Numero actual de SNLINEs: %d +OPER_STATS_SNLINE_EXPIRE_DAYS + Temps d'expiració per defecte de SNLINE: %d dies +OPER_STATS_SNLINE_EXPIRE_DAY + Temps d'expiració per defecte de SNLINE: 1 dia +OPER_STATS_SNLINE_EXPIRE_HOURS + Temps d'expiració per defecte de SNLINE: %d hores +OPER_STATS_SNLINE_EXPIRE_HOUR + Temps d'expiració per defecte de SNLINE: 1 hora +OPER_STATS_SNLINE_EXPIRE_MINS + Temps d'expiració per defecte de SNLINE: %d minuts +OPER_STATS_SNLINE_EXPIRE_MIN + Temps d'expiració per defecte de SNLINE: 1 minut +OPER_STATS_SNLINE_EXPIRE_NONE + Temps d'expiració per defecte de SNLINE: Sense expiració OPER_STATS_SQLINE_COUNT Numero actual de SQLINEs: %d OPER_STATS_SQLINE_EXPIRE_DAYS @@ -2718,49 +2718,49 @@ OPER_AKILL_VIEW_FORMAT OPER_AKILL_CLEAR La llista de AKILLs ha estat netegada. -# SGLINE responses +# SNLINE responses OPER_CHANKILL_SYNTAX CHANKILL [+expiry] {#channel} [reason] -# SGLINE responses -OPER_SGLINE_SYNTAX - SGLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiració] {mascara | llista}[:raó]] -OPER_SGLINE_UNSUPPORTED - Ho sento, SGLINE no esta disponible en aquesta xarxa. -OPER_SGLINE_EXISTS - %s ja existeix a la llista de SGLINEs. -OPER_SGLINE_ALREADY_COVERED +# SNLINE responses +OPER_SNLINE_SYNTAX + SNLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiració] {mascara | llista}[:raó]] +OPER_SNLINE_UNSUPPORTED + Ho sento, SNLINE no esta disponible en aquesta xarxa. +OPER_SNLINE_EXISTS + %s ja existeix a la llista de SNLINEs. +OPER_SNLINE_ALREADY_COVERED %s ja esta cobert per %s. -OPER_SGLINE_REACHED_LIMIT - Ho sento, sols pots tenir %d SGLINEs. -OPER_SGLINE_ADDED - %s afegit a la llista de SGLINEs. -OPER_SGLINE_CHANGED +OPER_SNLINE_REACHED_LIMIT + Ho sento, sols pots tenir %d SNLINEs. +OPER_SNLINE_ADDED + %s afegit a la llista de SNLINEs. +OPER_SNLINE_CHANGED Temps d'expiració per a %s canviat. -OPER_SGLINE_NOT_FOUND - %s no trobat a a la llista de SGLINEs. -OPER_SGLINE_NO_MATCH - No existeixen instàncies similars a la llista de SGLINEs. -OPER_SGLINE_DELETED - %s esborrat de la llista de SGLINEs. -OPER_SGLINE_DELETED_ONE - 1 instància esborrada de la llista de SGLINEs. -OPER_SGLINE_DELETED_SEVERAL - %d instàncies esborrades de la llista de SGLINEs. -OPER_SGLINE_LIST_EMPTY - La llista de SGLINEs esta buida. -OPER_SGLINE_LIST_HEADER - Llista actual de SGLINEs: +OPER_SNLINE_NOT_FOUND + %s no trobat a a la llista de SNLINEs. +OPER_SNLINE_NO_MATCH + No existeixen instàncies similars a la llista de SNLINEs. +OPER_SNLINE_DELETED + %s esborrat de la llista de SNLINEs. +OPER_SNLINE_DELETED_ONE + 1 instància esborrada de la llista de SNLINEs. +OPER_SNLINE_DELETED_SEVERAL + %d instàncies esborrades de la llista de SNLINEs. +OPER_SNLINE_LIST_EMPTY + La llista de SNLINEs esta buida. +OPER_SNLINE_LIST_HEADER + Llista actual de SNLINEs: Num Mascara Raó -OPER_SGLINE_LIST_FORMAT +OPER_SNLINE_LIST_FORMAT %3d %-32s %s -OPER_SGLINE_VIEW_HEADER - Llista actual de SGLINEs: +OPER_SNLINE_VIEW_HEADER + Llista actual de SNLINEs: # number, mask, set-by, set-time, expires, reason -OPER_SGLINE_VIEW_FORMAT +OPER_SNLINE_VIEW_FORMAT %3d %s (per %s en %s; %s) %s -OPER_SGLINE_CLEAR - La llista de SGLINEs ha estat netegada. +OPER_SNLINE_CLEAR + La llista de SNLINEs ha estat netegada. # SQLINE responses OPER_SQLINE_SYNTAX @@ -5516,8 +5516,8 @@ OPER_HELP_CMD_KILLCLONES KILLCLONES Mata tots els usuaris en un host OPER_HELP_CMD_AKILL AKILL Manipula la llista AKILL -OPER_HELP_CMD_SGLINE - SGLINE Manipula la llista SGLINE +OPER_HELP_CMD_SNLINE + SNLINE Manipula la llista SNLINE OPER_HELP_CMD_SQLINE SQLINE Manipula la llista SQLINE OPER_HELP_CMD_SZLINE @@ -5726,56 +5726,56 @@ OPER_HELP_AKILL Limitat a operadors de serveis. -OPER_HELP_SGLINE - Sintàxi: SGLINE ADD [+expiració] mascara:raó - SGLINE DEL {mascara | nom | llista} - SGLINE LIST [mascara | llista] - SGLINE VIEW [mascara | llista] - SGLINE CLEAR +OPER_HELP_SNLINE + Sintàxi: SNLINE ADD [+expiració] mascara:raó + SNLINE DEL {mascara | nom | llista} + SNLINE LIST [mascara | llista] + SNLINE VIEW [mascara | llista] + SNLINE CLEAR Permet als operadors de serveis manipular la llista - de SGLINES. Si un usuari amb un nom real concordant - amb una mascara SGLINE s'intenta connectar, els serveis + de SNLINES. Si un usuari amb un nom real concordant + amb una mascara SNLINE s'intenta connectar, els serveis l'impediran aconseguir una sessió d'IRC. - SGLINE ADD afegeix la mascara de nom real especificada a la - llista de SGLINES per la raó especificada (obligatori). + SNLINE ADD afegeix la mascara de nom real especificada a la + llista de SNLINES per la raó especificada (obligatori). expiració es especificada com un sencer seguit de d (dies), h (hores), o m (minuts). Combinacions (com 1h30m) no estan permesses. Si l'especificació de la unitat no es especificada, per defecte són dies (és a dir +30 nomès - significa 30 dies). Per afegir una SGLINE que no caduqui, + significa 30 dies). Per afegir una SNLINE que no caduqui, utilitza +0. Si la mascara de nom real especificada comença amb +, el temp d'expiració ha de ser especificat, encara que sigui el mateix que el per defecte. El temps actual d'expiració - per defecte per SGLINES pot ser consultat amb la comanda + per defecte per SNLINES pot ser consultat amb la comanda STATS AKILL. Nota: Ja que la mascara de nom real pot contenir espais, el separador entre aquest i la raó es un signe de dos punts. - La comanda SGLINE DEL esborra la mascara especificada de la - llista de SGLINES si esta present. Si s'especifica una llista de + La comanda SNLINE DEL esborra la mascara especificada de la + llista de SNLINES si esta present. Si s'especifica una llista de instàncies, aquestes instàncies son esborrades. (Veure l'exemple per LIST especificat més endavant.) - La comanda SGLINE LIST mostra la llista de SGLINES. Si + La comanda SNLINE LIST mostra la llista de SNLINES. Si s'especifica una mascara, nomès les instàncies concordant amb la mascara són mostrades. Si s'especifica una llista de instàncies, nomès aquestes instàncies son mostrades; per exemple: - SGLINE LIST 2-5,7-9 - Llista instàncies de SGLINES enumerades de 2 a 5 i de 7 + SNLINE LIST 2-5,7-9 + Llista instàncies de SNLINES enumerades de 2 a 5 i de 7 a 9. - SGLINE VIEW es una versió més verbal que SGLINE LIST, - i mostrara qui va fegir la SGLINE, la data en la que va + SNLINE VIEW es una versió més verbal que SNLINE LIST, + i mostrara qui va fegir la SNLINE, la data en la que va ser afegida, i quan caducara, a més de la mascara de nom real i la raó. - SGLINE CLEAR neteja totes les instàncies de la llista de - SGLINES. + SNLINE CLEAR neteja totes les instàncies de la llista de + SNLINES. Limitat a operadors de serveis. diff --git a/lang/de.l b/lang/de.l index d655be91d..8a27c900d 100644 --- a/lang/de.l +++ b/lang/de.l @@ -2546,22 +2546,22 @@ OPER_STATS_AKILL_EXPIRE_MIN Standard Auslaufzeit von AKILLs: 1 Minute OPER_STATS_AKILL_EXPIRE_NONE Standard Auslaufzeit von AKILLs: Kein Auslauf, permanent -OPER_STATS_SGLINE_COUNT - Aktuelle Anzahl von SGLINEs: %d -OPER_STATS_SGLINE_EXPIRE_DAYS - Standard Auslaufzeit von SGLINEs: %d Tage -OPER_STATS_SGLINE_EXPIRE_DAY - Standard Auslaufzeit von SGLINEs: 1 Tag -OPER_STATS_SGLINE_EXPIRE_HOURS - Standard Auslaufzeit von SGLINEs: %d Stunden -OPER_STATS_SGLINE_EXPIRE_HOUR - Standard Auslaufzeit von SGLINEs: 1 Stunde -OPER_STATS_SGLINE_EXPIRE_MINS - Standard Auslaufzeit von SGLINEs: %d Minuten -OPER_STATS_SGLINE_EXPIRE_MIN - Standard Auslaufzeit von SGLINEs: 1 Minute -OPER_STATS_SGLINE_EXPIRE_NONE - Standard Auslaufzeit von SGLINEs: Kein Auslauf, permanent +OPER_STATS_SNLINE_COUNT + Aktuelle Anzahl von SNLINEs: %d +OPER_STATS_SNLINE_EXPIRE_DAYS + Standard Auslaufzeit von SNLINEs: %d Tage +OPER_STATS_SNLINE_EXPIRE_DAY + Standard Auslaufzeit von SNLINEs: 1 Tag +OPER_STATS_SNLINE_EXPIRE_HOURS + Standard Auslaufzeit von SNLINEs: %d Stunden +OPER_STATS_SNLINE_EXPIRE_HOUR + Standard Auslaufzeit von SNLINEs: 1 Stunde +OPER_STATS_SNLINE_EXPIRE_MINS + Standard Auslaufzeit von SNLINEs: %d Minuten +OPER_STATS_SNLINE_EXPIRE_MIN + Standard Auslaufzeit von SNLINEs: 1 Minute +OPER_STATS_SNLINE_EXPIRE_NONE + Standard Auslaufzeit von SNLINEs: Kein Auslauf, permanent OPER_STATS_SQLINE_COUNT Aktuelle Anzahl von SQLINEs: %d OPER_STATS_SQLINE_EXPIRE_DAYS @@ -2687,49 +2687,49 @@ OPER_AKILL_VIEW_FORMAT OPER_AKILL_CLEAR Die AKILL-Liste wurde geleert. -# SGLINE responses +# SNLINE responses OPER_CHANKILL_SYNTAX CHANKILL [+Zeit] {Channel} [Grund] -# SGLINE responses -OPER_SGLINE_SYNTAX - SGLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+Zeit] {Hostmask | entry-liste}[:Grund]] -OPER_SGLINE_UNSUPPORTED - SGLINE ist in diesem Netz nicht verfügbar. -OPER_SGLINE_EXISTS - %s existiert bereits auf der SGLINE-Liste. -OPER_SGLINE_ALREADY_COVERED +# SNLINE responses +OPER_SNLINE_SYNTAX + SNLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+Zeit] {Hostmask | entry-liste}[:Grund]] +OPER_SNLINE_UNSUPPORTED + SNLINE ist in diesem Netz nicht verfügbar. +OPER_SNLINE_EXISTS + %s existiert bereits auf der SNLINE-Liste. +OPER_SNLINE_ALREADY_COVERED %s wird bereits durch %s getroffen. -OPER_SGLINE_REACHED_LIMIT - Du kannst nur %d SGLINE's haben. -OPER_SGLINE_ADDED - %s wurde zur SGLINE-Liste hinzugefügt. -OPER_SGLINE_CHANGED +OPER_SNLINE_REACHED_LIMIT + Du kannst nur %d SNLINE's haben. +OPER_SNLINE_ADDED + %s wurde zur SNLINE-Liste hinzugefügt. +OPER_SNLINE_CHANGED Auslaufzeit von %s geändert. -OPER_SGLINE_NOT_FOUND - %s wurde nicht auf der SGLINE-Liste gefunden. -OPER_SGLINE_NO_MATCH - Keine entsprechenden Einträge auf der SGLINE-Liste. -OPER_SGLINE_DELETED - %s wurde von der SGLINE-Liste entfernt. -OPER_SGLINE_DELETED_ONE - Es wurde 1 Eintrag aus der SGLINE-Liste entfernt. -OPER_SGLINE_DELETED_SEVERAL - Es wurden %d Einträge aus der SGLINE-Liste entfernt. -OPER_SGLINE_LIST_EMPTY - Die SGLINE-Liste ist leer. -OPER_SGLINE_LIST_HEADER - Aktuelle SGLINE-Liste: +OPER_SNLINE_NOT_FOUND + %s wurde nicht auf der SNLINE-Liste gefunden. +OPER_SNLINE_NO_MATCH + Keine entsprechenden Einträge auf der SNLINE-Liste. +OPER_SNLINE_DELETED + %s wurde von der SNLINE-Liste entfernt. +OPER_SNLINE_DELETED_ONE + Es wurde 1 Eintrag aus der SNLINE-Liste entfernt. +OPER_SNLINE_DELETED_SEVERAL + Es wurden %d Einträge aus der SNLINE-Liste entfernt. +OPER_SNLINE_LIST_EMPTY + Die SNLINE-Liste ist leer. +OPER_SNLINE_LIST_HEADER + Aktuelle SNLINE-Liste: Nummer Maske Grund -OPER_SGLINE_LIST_FORMAT +OPER_SNLINE_LIST_FORMAT %3d %-32s %s -OPER_SGLINE_VIEW_HEADER - Aktuelle SGLINE-Liste: +OPER_SNLINE_VIEW_HEADER + Aktuelle SNLINE-Liste: # number, mask, set-by, set-time, expires, reason -OPER_SGLINE_VIEW_FORMAT +OPER_SNLINE_VIEW_FORMAT %3d %s (von %s am %s, %s) %s -OPER_SGLINE_CLEAR - Die SGLINE-Liste wurde geleert. +OPER_SNLINE_CLEAR + Die SNLINE-Liste wurde geleert. # SZLINE responses OPER_SQLINE_SYNTAX @@ -5555,8 +5555,8 @@ OPER_HELP_CMD_KILLCLONES KILLCLONES Alle User mit einem bestimmten Host killen OPER_HELP_CMD_AKILL AKILL Die AutoKill-Liste bearbeiten -OPER_HELP_CMD_SGLINE - SGLINE Die SGLINE-Liste bearbeiten +OPER_HELP_CMD_SNLINE + SNLINE Die SNLINE-Liste bearbeiten OPER_HELP_CMD_SQLINE SQLINE Die SQLINE-Liste bearbeiten OPER_HELP_CMD_SZLINE @@ -5765,21 +5765,21 @@ OPER_HELP_AKILL AKILL CLEAR entfernt alle Einträge aus der AKILL-Liste. -OPER_HELP_SGLINE - Syntax: SGLINE ADD [+Zeit] Maske:Grund - SGLINE DEL {Maske | entry-num | Liste} - SGLINE LIST [Maske | Liste] - SGLINE VIEW [Maske | Liste] - SGLINE CLEAR +OPER_HELP_SNLINE + Syntax: SNLINE ADD [+Zeit] Maske:Grund + SNLINE DEL {Maske | entry-num | Liste} + SNLINE LIST [Maske | Liste] + SNLINE VIEW [Maske | Liste] + SNLINE CLEAR - Erlaubt Services Operatoren die SGLINE-Liste zu + Erlaubt Services Operatoren die SNLINE-Liste zu bearbeiten. Versucht ein User dessen Realname auf - einen Eintrag in der SGLINE-Liste trifft zu verbinden, + einen Eintrag in der SNLINE-Liste trifft zu verbinden, werden die Services ihn die verbindung auf das IRC Netz nicht ausführen lassen. - SGLINE ADD fügt die angegebene Realnamen-Maske mit - dem Grund (muss angegeben werden) zur SGLINE-Liste + SNLINE ADD fügt die angegebene Realnamen-Maske mit + dem Grund (muss angegeben werden) zur SNLINE-Liste hinzu. Mit Hilfe von Zeit lässt sich eine bestimmte Auslaufzeit dieses Eintrags definieren. Zeit wird durch eine Ganzzahl angegeben, gefolgt von @@ -5787,39 +5787,39 @@ OPER_HELP_SGLINE d (Tage), h (Stunden), oder m (Minuten). Kombinationen (wie zum Beispiel 1h30m) sind nicht zulässig. Wird kein Buchstabe angegeben, wird von Tagen ausgegangen (also +30 - bedeutet dann z.B. 30 Tage). Um einen SGLINE-Eintrag zu + bedeutet dann z.B. 30 Tage). Um einen SNLINE-Eintrag zu erstellen, der nicht ausläuft, benutze +0. Beginnt die Realnamen-Maske mit einem +, an, muss eine Auslaufzeit (expiry) definiert werden, auch wenn es die Standard-Zeit ist. Die Standard-Auslaufzeit für eine - SGLINE kann man unter STATS AKILL finden. + SNLINE kann man unter STATS AKILL finden. Beachte: Da die Realnamen-Maske Leerzeichen enthalten kann, ist das Trennzeichen zwischen der Maske und dem Grund ein Doppelpunkt. - Das SGLINE DEL Befehl entfernt die angegebene Maske - von der SGLINE-Liste, sofern ein solcher Eintag existiert. + Das SNLINE DEL Befehl entfernt die angegebene Maske + von der SNLINE-Liste, sofern ein solcher Eintag existiert. Wird eine Liste von Nummern angegeben, werden diese Einträge entfernt. (Siehe das Beispiel für LIST weiter unten.) - Mit Hilfe von SGLINE LIST wird die SGLINE-Liste + Mit Hilfe von SNLINE LIST wird die SNLINE-Liste angezeigt. Werden Platzhalter (Wildcards) in der Maske angegeben, werden nur die entsprechenden Einträge angezeigt. Die Ausgabe lässt sich ebenfalls durch einen Zahlenbereich begrenzen, wie das Beispiel zeigt: - SGLINE LIST 2-5,7-9 + SNLINE LIST 2-5,7-9 Zeigt nur die Einträge 2 bis 5 und 7 bis 9. - SGLINE VIEW ist eine ausführlichere Version des - SGLINE LIST Befehls und zeigt zusätzlich, wer einen + SNLINE VIEW ist eine ausführlichere Version des + SNLINE LIST Befehls und zeigt zusätzlich, wer einen Eintrag wann erstellt hat, wann er ausläuft und natürlich die user@host Maske mit dem Grund. - SGLINE CLEAR entfernt alle Einträge aus der - SGLINE-Liste. + SNLINE CLEAR entfernt alle Einträge aus der + SNLINE-Liste. OPER_HELP_SQLINE Syntax: SQLINE ADD [+Zeit] Maske Grund @@ -5838,7 +5838,7 @@ OPER_HELP_SQLINE die dieses Feature unterstützen). SQLINE ADD fügt den angegeben Nicknamen mit dem Grund (muss - angegeben werden) zur SGLINE-Liste hinzu. ^_Zeit^_ wird + angegeben werden) zur SNLINE-Liste hinzu. ^_Zeit^_ wird durch eine Ganzzahl angegeben, gefolgt von einem Buchstaben: d (Tage), h (Stunden), oder m (Minuten). Kombinationen sind nicht erlaubt. Wird kein Buchstabe angegeben, diff --git a/lang/en_us.l b/lang/en_us.l index 8f1e9c9f0..3a88e10e5 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -2497,22 +2497,22 @@ OPER_STATS_AKILL_EXPIRE_MIN Default AKILL expiry time: 1 minute OPER_STATS_AKILL_EXPIRE_NONE Default AKILL expiry time: No expiration -OPER_STATS_SGLINE_COUNT - Current number of SGLINEs: %d -OPER_STATS_SGLINE_EXPIRE_DAYS - Default SGLINE expiry time: %d days -OPER_STATS_SGLINE_EXPIRE_DAY - Default SGLINE expiry time: 1 day -OPER_STATS_SGLINE_EXPIRE_HOURS - Default SGLINE expiry time: %d hours -OPER_STATS_SGLINE_EXPIRE_HOUR - Default SGLINE expiry time: 1 hour -OPER_STATS_SGLINE_EXPIRE_MINS - Default SGLINE expiry time: %d minutes -OPER_STATS_SGLINE_EXPIRE_MIN - Default SGLINE expiry time: 1 minute -OPER_STATS_SGLINE_EXPIRE_NONE - Default SGLINE expiry time: No expiration +OPER_STATS_SNLINE_COUNT + Current number of SNLINEs: %d +OPER_STATS_SNLINE_EXPIRE_DAYS + Default SNLINE expiry time: %d days +OPER_STATS_SNLINE_EXPIRE_DAY + Default SNLINE expiry time: 1 day +OPER_STATS_SNLINE_EXPIRE_HOURS + Default SNLINE expiry time: %d hours +OPER_STATS_SNLINE_EXPIRE_HOUR + Default SNLINE expiry time: 1 hour +OPER_STATS_SNLINE_EXPIRE_MINS + Default SNLINE expiry time: %d minutes +OPER_STATS_SNLINE_EXPIRE_MIN + Default SNLINE expiry time: 1 minute +OPER_STATS_SNLINE_EXPIRE_NONE + Default SNLINE expiry time: No expiration OPER_STATS_SQLINE_COUNT Current number of SQLINEs: %d OPER_STATS_SQLINE_EXPIRE_DAYS @@ -2635,46 +2635,46 @@ OPER_AKILL_CLEAR The AKILL list has been cleared. OPER_CHANKILL_SYNTAX CHANKILL [+expiry] {#channel} [reason] -# SGLINE responses -OPER_SGLINE_SYNTAX - SGLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiry] {mask | entry-list}[:reason]] -OPER_SGLINE_UNSUPPORTED - Sorry, SGLINE is not available on this network. -OPER_SGLINE_EXISTS - %s already exists on the SGLINE list. -OPER_SGLINE_ALREADY_COVERED +# SNLINE responses +OPER_SNLINE_SYNTAX + SNLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiry] {mask | entry-list}[:reason]] +OPER_SNLINE_UNSUPPORTED + Sorry, SNLINE is not available on this network. +OPER_SNLINE_EXISTS + %s already exists on the SNLINE list. +OPER_SNLINE_ALREADY_COVERED %s is already covered by %s. -OPER_SGLINE_REACHED_LIMIT - Sorry, you can only have %d SGLINEs. -OPER_SGLINE_ADDED - %s added to the SGLINE list. -OPER_SGLINE_CHANGED +OPER_SNLINE_REACHED_LIMIT + Sorry, you can only have %d SNLINEs. +OPER_SNLINE_ADDED + %s added to the SNLINE list. +OPER_SNLINE_CHANGED Expiry time of %s changed. -OPER_SGLINE_NOT_FOUND - %s not found on the SGLINE list. -OPER_SGLINE_NO_MATCH - No matching entries on the SGLINE list. -OPER_SGLINE_DELETED - %s deleted from the SGLINE list. -OPER_SGLINE_DELETED_ONE - Deleted 1 entry from the SGLINE list. -OPER_SGLINE_DELETED_SEVERAL - Deleted %d entries from the SGLINE list. -OPER_SGLINE_LIST_EMPTY - SGLINE list is empty. -OPER_SGLINE_LIST_HEADER - Current SGLINE list: +OPER_SNLINE_NOT_FOUND + %s not found on the SNLINE list. +OPER_SNLINE_NO_MATCH + No matching entries on the SNLINE list. +OPER_SNLINE_DELETED + %s deleted from the SNLINE list. +OPER_SNLINE_DELETED_ONE + Deleted 1 entry from the SNLINE list. +OPER_SNLINE_DELETED_SEVERAL + Deleted %d entries from the SNLINE list. +OPER_SNLINE_LIST_EMPTY + SNLINE list is empty. +OPER_SNLINE_LIST_HEADER + Current SNLINE list: Num Mask Reason -OPER_SGLINE_LIST_FORMAT +OPER_SNLINE_LIST_FORMAT %3d %-32s %s -OPER_SGLINE_VIEW_HEADER - Current SGLINE list: +OPER_SNLINE_VIEW_HEADER + Current SNLINE list: # number, mask, set-by, set-time, expires, reason -OPER_SGLINE_VIEW_FORMAT +OPER_SNLINE_VIEW_FORMAT %3d %s (by %s on %s; %s) %s -OPER_SGLINE_CLEAR - The SGLINE list has been cleared. +OPER_SNLINE_CLEAR + The SNLINE list has been cleared. # SQLINE responses OPER_SQLINE_SYNTAX @@ -5287,8 +5287,8 @@ OPER_HELP_CMD_KILLCLONES KILLCLONES Kill all users that have a certain host OPER_HELP_CMD_AKILL AKILL Manipulate the AKILL list -OPER_HELP_CMD_SGLINE - SGLINE Manipulate the SGLINE list +OPER_HELP_CMD_SNLINE + SNLINE Manipulate the SNLINE list OPER_HELP_CMD_SQLINE SQLINE Manipulate the SQLINE list OPER_HELP_CMD_SZLINE @@ -5488,51 +5488,51 @@ OPER_HELP_AKILL AKILL CLEAR clears all entries of the AKILL list. -OPER_HELP_SGLINE - Syntax: SGLINE ADD [+expiry] mask:reason - SGLINE DEL {mask | entry-num | list} - SGLINE LIST [mask | list] - SGLINE VIEW [mask | list] - SGLINE CLEAR +OPER_HELP_SNLINE + Syntax: SNLINE ADD [+expiry] mask:reason + SNLINE DEL {mask | entry-num | list} + SNLINE LIST [mask | list] + SNLINE VIEW [mask | list] + SNLINE CLEAR - Allows Services operators to manipulate the SGLINE list. If - a user with a realname matching an SGLINE mask attempts to + Allows Services operators to manipulate the SNLINE list. If + a user with a realname matching an SNLINE mask attempts to connect, Services will not allow it to pursue his IRC session. - SGLINE ADD adds the given realname mask to the SGLINE + SNLINE ADD adds the given realname mask to the SNLINE list for the given reason (which must be given). expiry is specified as an integer followed by one of d (days), h (hours), or m (minutes). Combinations (such as 1h30m) are not permitted. If a unit specifier is not included, the default is days (so +30 by itself means 30 - days). To add an SGLINE which does not expire, use +0. If the + days). To add an SNLINE which does not expire, use +0. If the realname mask to be added starts with a +, an expiry time must be given, even if it is the same as the default. The - current SGLINE default expiry time can be found with the + current SNLINE default expiry time can be found with the STATS AKILL command. Note: because the realname mask may contain spaces, the separator between it and the reason is a colon. - The SGLINE DEL command removes the given mask from the - SGLINE list if it is present. If a list of entry numbers is + The SNLINE DEL command removes the given mask from the + SNLINE list if it is present. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.) - The SGLINE LIST command displays the SGLINE list. + The SNLINE LIST command displays the SNLINE list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example: - SGLINE LIST 2-5,7-9 - Lists SGLINE entries numbered 2 through 5 and 7 + SNLINE LIST 2-5,7-9 + Lists SNLINE entries numbered 2 through 5 and 7 through 9. - SGLINE VIEW is a more verbose version of SGLINE LIST, and - will show who added an SGLINE, the date it was added, and when + SNLINE VIEW is a more verbose version of SNLINE LIST, and + will show who added an SNLINE, the date it was added, and when it expires, as well as the realname mask and reason. - SGLINE CLEAR clears all entries of the SGLINE list. + SNLINE CLEAR clears all entries of the SNLINE list. OPER_HELP_SQLINE Syntax: SQLINE ADD [+expiry] mask reason diff --git a/lang/es.l b/lang/es.l index ba4eb8cc4..1dfc3581f 100644 --- a/lang/es.l +++ b/lang/es.l @@ -2546,22 +2546,22 @@ OPER_STATS_AKILL_EXPIRE_MIN Tiempo de expiracion por defecto de AKILL: 1 minuto OPER_STATS_AKILL_EXPIRE_NONE Tiempo de expiracion por defecto de AKILL: Sin expiracion -OPER_STATS_SGLINE_COUNT - Numero actual de SGLINEs: %d -OPER_STATS_SGLINE_EXPIRE_DAYS - Tiempo de expiracion por defecto de SGLINE: %d dias -OPER_STATS_SGLINE_EXPIRE_DAY - Tiempo de expiracion por defecto de SGLINE: 1 dia -OPER_STATS_SGLINE_EXPIRE_HOURS - Tiempo de expiracion por defecto de SGLINE: %d horas -OPER_STATS_SGLINE_EXPIRE_HOUR - Tiempo de expiracion por defecto de SGLINE: 1 hora -OPER_STATS_SGLINE_EXPIRE_MINS - Tiempo de expiracion por defecto de SGLINE: %d minutos -OPER_STATS_SGLINE_EXPIRE_MIN - Tiempo de expiracion por defecto de SGLINE: 1 minuto -OPER_STATS_SGLINE_EXPIRE_NONE - Tiempo de expiracion por defecto de SGLINE: Sin expiracion +OPER_STATS_SNLINE_COUNT + Numero actual de SNLINEs: %d +OPER_STATS_SNLINE_EXPIRE_DAYS + Tiempo de expiracion por defecto de SNLINE: %d dias +OPER_STATS_SNLINE_EXPIRE_DAY + Tiempo de expiracion por defecto de SNLINE: 1 dia +OPER_STATS_SNLINE_EXPIRE_HOURS + Tiempo de expiracion por defecto de SNLINE: %d horas +OPER_STATS_SNLINE_EXPIRE_HOUR + Tiempo de expiracion por defecto de SNLINE: 1 hora +OPER_STATS_SNLINE_EXPIRE_MINS + Tiempo de expiracion por defecto de SNLINE: %d minutos +OPER_STATS_SNLINE_EXPIRE_MIN + Tiempo de expiracion por defecto de SNLINE: 1 minuto +OPER_STATS_SNLINE_EXPIRE_NONE + Tiempo de expiracion por defecto de SNLINE: Sin expiracion OPER_STATS_SQLINE_COUNT Numero actual de SQLINEs: %d OPER_STATS_SQLINE_EXPIRE_DAYS @@ -2689,49 +2689,49 @@ OPER_AKILL_VIEW_FORMAT OPER_AKILL_CLEAR La lista de AKILLs ha sido limpiada. -# SGLINE responses +# SNLINE responses OPER_CHANKILL_SYNTAX CHANKILL [+expiry] {#channel} [reason] -# SGLINE responses -OPER_SGLINE_SYNTAX - SGLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiracion] {mascara | lista}[:razon]] -OPER_SGLINE_UNSUPPORTED - Lo siento, SGLINE no esta disponible en esta red. -OPER_SGLINE_EXISTS - %s ya existe en la lista de SGLINEs. -OPER_SGLINE_ALREADY_COVERED +# SNLINE responses +OPER_SNLINE_SYNTAX + SNLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+expiracion] {mascara | lista}[:razon]] +OPER_SNLINE_UNSUPPORTED + Lo siento, SNLINE no esta disponible en esta red. +OPER_SNLINE_EXISTS + %s ya existe en la lista de SNLINEs. +OPER_SNLINE_ALREADY_COVERED %s ya esta cubierto por %s. -OPER_SGLINE_REACHED_LIMIT - Lo siento, solo puedes tener %d SGLINEs. -OPER_SGLINE_ADDED - %s añadido a la lista de SGLINEs. -OPER_SGLINE_CHANGED +OPER_SNLINE_REACHED_LIMIT + Lo siento, solo puedes tener %d SNLINEs. +OPER_SNLINE_ADDED + %s añadido a la lista de SNLINEs. +OPER_SNLINE_CHANGED Tiempo de expiracion para %s cambiado. -OPER_SGLINE_NOT_FOUND - %s no encontrado en la lista de SGLINEs. -OPER_SGLINE_NO_MATCH - No existen instancias similares en la lista de SGLINEs. -OPER_SGLINE_DELETED - %s borrado de la lista de SGLINEs. -OPER_SGLINE_DELETED_ONE - 1 instancia borrada de la lista de SGLINEs. -OPER_SGLINE_DELETED_SEVERAL - %d instancias borradas de la lista de SGLINEs. -OPER_SGLINE_LIST_EMPTY - La lista de SGLINEs esta vacia. -OPER_SGLINE_LIST_HEADER - Lista actual de SGLINEs: +OPER_SNLINE_NOT_FOUND + %s no encontrado en la lista de SNLINEs. +OPER_SNLINE_NO_MATCH + No existen instancias similares en la lista de SNLINEs. +OPER_SNLINE_DELETED + %s borrado de la lista de SNLINEs. +OPER_SNLINE_DELETED_ONE + 1 instancia borrada de la lista de SNLINEs. +OPER_SNLINE_DELETED_SEVERAL + %d instancias borradas de la lista de SNLINEs. +OPER_SNLINE_LIST_EMPTY + La lista de SNLINEs esta vacia. +OPER_SNLINE_LIST_HEADER + Lista actual de SNLINEs: Num Mascara Razon -OPER_SGLINE_LIST_FORMAT +OPER_SNLINE_LIST_FORMAT %3d %-32s %s -OPER_SGLINE_VIEW_HEADER - Lista actual de SGLINEs: +OPER_SNLINE_VIEW_HEADER + Lista actual de SNLINEs: # number, mask, set-by, set-time, expires, reason -OPER_SGLINE_VIEW_FORMAT +OPER_SNLINE_VIEW_FORMAT %3d %s (por %s en %s; %s) %s -OPER_SGLINE_CLEAR - La lista de SGLINEs ha sido limpiada. +OPER_SNLINE_CLEAR + La lista de SNLINEs ha sido limpiada. # SQLINE responses OPER_SQLINE_SYNTAX @@ -5485,8 +548