From e6447fa2c40270d2e2435229127dd970194b47d9 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 3 Jun 2010 23:09:22 -0400 Subject: Added in a subcommand system and switched ns_set and ns_saset to use it --- data/example.conf | 10 +- include/commands.h | 15 +- include/hashcomp.h | 3 +- include/services.h | 2 +- lang/cat.l | 32 ++- lang/de.l | 33 ++- lang/en_us.l | 39 ++- lang/es.l | 36 ++- lang/fr.l | 34 ++- lang/gr.l | 32 ++- lang/hun.l | 32 ++- lang/it.l | 34 ++- lang/nl.l | 34 ++- lang/pl.l | 33 ++- lang/pt.l | 32 ++- lang/ru.l | 33 ++- lang/tr.l | 31 ++- src/botserv.cpp | 2 +- src/chanserv.cpp | 2 +- src/command.cpp | 19 +- src/commands.cpp | 23 +- src/core/ns_saset.cpp | 579 +++++++++-------------------------------- src/core/ns_saset_noexpire.cpp | 87 +++++++ src/core/ns_set.cpp | 523 ++++++++----------------------------- src/core/ns_set_autoop.cpp | 131 ++++++++++ src/core/ns_set_email.cpp | 160 ++++++++++++ src/core/ns_set_greet.cpp | 129 +++++++++ src/core/ns_set_hide.cpp | 200 ++++++++++++++ src/core/ns_set_icq.cpp | 136 ++++++++++ src/core/ns_set_kill.cpp | 183 +++++++++++++ src/core/ns_set_language.cpp | 143 ++++++++++ src/core/ns_set_message.cpp | 149 +++++++++++ src/core/ns_set_private.cpp | 137 ++++++++++ src/core/ns_set_secure.cpp | 137 ++++++++++ src/core/ns_set_url.cpp | 128 +++++++++ src/hostserv.cpp | 2 +- src/memoserv.cpp | 2 +- src/nickserv.cpp | 2 +- src/operserv.cpp | 2 +- src/protocol/inspircd11.cpp | 2 +- src/protocol/inspircd12.cpp | 2 +- src/protocol/inspircd20.cpp | 314 +++++++++++----------- src/protocol/unreal32.cpp | 6 +- src/users.cpp | 2 +- 44 files changed, 2568 insertions(+), 1099 deletions(-) create mode 100644 src/core/ns_saset_noexpire.cpp create mode 100644 src/core/ns_set_autoop.cpp create mode 100644 src/core/ns_set_email.cpp create mode 100644 src/core/ns_set_greet.cpp create mode 100644 src/core/ns_set_hide.cpp create mode 100644 src/core/ns_set_icq.cpp create mode 100644 src/core/ns_set_kill.cpp create mode 100644 src/core/ns_set_language.cpp create mode 100644 src/core/ns_set_message.cpp create mode 100644 src/core/ns_set_private.cpp create mode 100644 src/core/ns_set_secure.cpp create mode 100644 src/core/ns_set_url.cpp diff --git a/data/example.conf b/data/example.conf index 0954b8d0d..0a018a393 100644 --- a/data/example.conf +++ b/data/example.conf @@ -596,8 +596,10 @@ options * * memoserv/sendall memoserv/staff * - * nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend - * nickserv/resetpass + * nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend + * nickserv/resetpass nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet + * nickserv/saset/icq nickserv/saset/kill nickserv/saset/language nickserv/saset/message + * nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire * * hostserv/set - Can add/modify/delete any vhost * @@ -648,7 +650,7 @@ opertype inherits = "Services Operator" - commands = "chanserv/access/list chanserv/drop chanserv/forbid chansev/getkey chanserv/getkey chanserv/set/noexpire memoserv/sendall nickserv/getemail operserv/global operserv/news operserv/jupe operserv/svsnick operserv/stats operserv/oline operserv/defcon operserv/noop operserv/umode" + commands = "chanserv/access/list chanserv/drop chanserv/forbid chansev/getkey chanserv/getkey chanserv/set/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/global operserv/news operserv/jupe operserv/svsnick operserv/stats operserv/oline operserv/defcon operserv/noop operserv/umode" privs = "*" } @@ -782,7 +784,7 @@ nickserv * The core modules to load for NickServ. This is a space separated list that corresponds * to the base names of the modules for NickServ. This directive is optional, but highly recommended. */ - modules = "ns_help ns_register ns_group ns_identify ns_access ns_set ns_saset ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend ns_resetpass" + modules = "ns_help ns_register ns_group ns_identify ns_access ns_set ns_saset ns_set_autoop ns_set_email ns_set_greet ns_set_icq ns_set_kill ns_set_language ns_set_message ns_set_private ns_set_secure ns_set_url ns_saset_noexpire ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend ns_resetpass" /* * Force users to give an e-mail address when they register a nick. This directive diff --git a/include/commands.h b/include/commands.h index 9e597204e..327d65736 100644 --- a/include/commands.h +++ b/include/commands.h @@ -23,7 +23,7 @@ class Command; typedef std::map CommandMap; /** The return value from commands. - * */ + */ enum CommandReturn { MOD_CONT, @@ -32,7 +32,8 @@ enum CommandReturn extern CoreExport Command *FindCommand(BotInfo *bi, const ci::string &cmd); extern CoreExport void mod_help_cmd(BotInfo *bi, User *u, const ci::string &cmd); -extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, const ci::string &cmd); +extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, const std::string &message); +extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, Command *c, const ci::string &command, const ci::string &message); enum CommandFlag { @@ -101,6 +102,16 @@ class CoreExport Command : public Flags * @param reststr The permission required to successfully execute this command */ void SetPermission(const std::string &reststr); + + /** Add a subcommand to this command + * @param c The command + */ + virtual bool AddSubcommand(Command *c); + + /** Delete a subcommand from this command + * @param cname The subcommand name + */ + virtual bool DelSubcommand(const ci::string &cname); }; #endif diff --git a/include/hashcomp.h b/include/hashcomp.h index a0d456b40..6d4530dc6 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -16,7 +16,8 @@ #include #ifndef _WIN32 - #ifdef HASHMAP_DEPRECATED /* If gcc ver > 4.3 */ +// #ifdef HASHMAP_DEPRECATED /* If gcc ver > 4.3 */ + #if 1 /* GCC4.3+ has deprecated hash_map and uses tr1. But of course, uses a different include to MSVC. */ #include #define unordered_map_namespace std::tr1 diff --git a/include/services.h b/include/services.h index 9a7356bd2..4994984e0 100644 --- a/include/services.h +++ b/include/services.h @@ -52,7 +52,7 @@ #include /* for umask() on some systems */ #include - +#include #include #ifndef _WIN32 diff --git a/lang/cat.l b/lang/cat.l index 116d42037..bd2c34d8a 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -3617,28 +3617,42 @@ NICK_HELP_ACCESS ACCESS LIST Mostra la llista d'accés actual. -NICK_HELP_SET +NICK_HELP_SET_HEAD Sintaxis: SET Opció parametres Estableix varies opcions per a nicknames. Opció pot ser una de: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Estableix el display del teu grup amb serveis +NICK_HELP_CMD_SET_PASSWORD PASSWORD Estableix la clau del teu nickname +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Estableix el llenguatge amb el que els serveis t'enviaran missatges +NICK_HELP_CMD_SET_URL URL Associa una URL amb el teu nickname +NICK_HELP_CMD_SET_EMAIL EMAIL Associa un E-mail amb el teu nickname +NICK_HELP_CMD_SET_ICQ ICQ Associa un numero ICQ amb el teu nickname +NICK_HELP_CMD_SET_GREET GREET Associa un salutació amb el teu nickname +NICK_HELP_CMD_SET_KILL KILL Activa o desactiva la protecció +NICK_HELP_CMD_SET_SECURE SECURE Activa o desactiva la seguretat de nickname +NICK_HELP_CMD_SET_PRIVATE PRIVATE Preveu el teu nickname d'apareixer en un %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Oculta algunes parts de la teva informació +NICK_HELP_CMD_SET_MSG MSG canvia el metode de comunicació amb els serveis +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Per utilitzar aquest comanda, has d'identificar-te primer utilitzant la teva clau (%R%S HELP IDENTIFY @@ -3757,26 +3771,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/de.l b/lang/de.l index 8a27c900d..f457eccc0 100644 --- a/lang/de.l +++ b/lang/de.l @@ -3594,34 +3594,48 @@ NICK_HELP_ACCESS ACCESS LIST Zeigt die aktuelle Zugriffsliste an. -NICK_HELP_SET +NICK_HELP_SET_HEAD Syntax: SET Option Parameter Stellt verschiedene Optionen zu deinem Nicknamen ein. Option kann eines der folgenden Werte sein: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Ändert den "Ursprung" deiner Gruppe +NICK_HELP_CMD_SET_PASSWORD PASSWORD Setzt das Passwort deines Nicknamens neu +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Stellt die Sprache ein, in der dir die Services antworten sollen. +NICK_HELP_CMD_SET_URL URL Verbindet eine URL mit deinem Nicknamen +NICK_HELP_CMD_SET_ICQ ICQ Trägt deine ICQ-Nummer unter den Infos zu deinem Nicknamen ein. +NICK_HELP_CMD_SET_MSG MSG Ändert die Methode, wie die Services mit dir kommunizieren +NICK_HELP_CMD_SET_EMAIL EMAIL Verbindet eine öffentliche eMail-Adresse mit deinem Nicknamen +NICK_HELP_CMD_SET_GREET GREET Stellt eine Begrüssungsmeldung für deinen Nicknamen ein. +NICK_HELP_CMD_SET_KILL KILL Stellt Kill-Schutz an oder aus. +NICK_HELP_CMD_SET_SECURE SECURE Aktiviert/Deaktiviert den Sicherheitsmodus für deinen Nicknamen +NICK_HELP_CMD_SET_PRIVATE PRIVATE Verhindert das Erscheinen deines Nicknamens auf der Liste von %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Versteckt bestimmte Informationen deines Nicknamens +NICK_HELP_CMD_SET_AUTOOP AUTOOP Sollten Dir die Services automatisch Op-Status geben. +NICK_HELP_SET_TAIL Wenn du eines dieser Optionen nutzen willst, musst du dich vorher identifizeren. @@ -3758,31 +3772,46 @@ NICK_HELP_SET_AUTOOP erlaubt es ChanServ Dir automatisch Op-Status zu geben, wenn Du die Channels betrittst. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Setzt verschiedene Einstellungen für den Nicknamen. Gültig für option ist: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Setzt einen Nicknamen als Ursprung der Nickgruppe +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Setzt das Passwort eines Nicknamens +NICK_HELP_CMD_SASET_URL URL Fügt eine URL dem Nicknamen hinzu +NICK_HELP_CMD_SASET_EMAIL EMAIL Fügt eine Emailadresse dem Nicknamen hinzu +NICK_HELP_CMD_SASET_ICQ ICQ Fügt eine ICQ Nummer dem Nicknamen hinzu +NICK_HELP_CMD_SASET_GREET GREET Fügt eine Begrüssungsnachricht dem Nicknamen hinzu +NICK_HELP_CMD_SASET_KILL KILL Schützt den Nicknamen durch Identifikationszwang +NICK_HELP_CMD_SASET_SECURE SECURE Schaltet die Identifikationssicherheitsfunktion an oder aus +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Verhindert, dass der Nickname im Befehl %R%S LIST auftaucht +NICK_HELP_CMD_SASET_HIDE HIDE Versteckt bestimmte, dem Nicknamen zugeordnete, Informationen +NICK_HELP_CMD_SASET_MSG MSG Bestimmt die Art wie die Services Nachrichten senden +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Verhindert, dass der Nickname nach einer bestimmten Zeit verfällt +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Stellt die Sprache ein, in der die Services dem Nicknamen antworten sollen. +NICK_HELP_CMD_SASET_AUTOOP AUTOOP Sollten die Services dem Nick automatisch seinen Op-Status geben. +NICK_HELP_SASET_TAIL Mit %R%S HELP SASET option können mehr Informationen zu den Einstellungen angefordert werden. Die Einstellungen betreffen den diff --git a/lang/en_us.l b/lang/en_us.l index 3a88e10e5..fca68c14b 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -3483,27 +3483,41 @@ NICK_HELP_ACCESS ACCESS LIST Displays the current access list. -NICK_HELP_SET +NICK_HELP_SET_HEAD Syntax: SET option parameters Sets various nickname options. option can be one of: - + +NICK_HELP_CMD_SET_DISPLAY DISPLAY Set the display of your group in Services +NICK_HELP_CMD_SET_PASSWORD PASSWORD Set your nickname password +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to you +NICK_HELP_CMD_SET_URL URL Associate a URL with your nickname +NICK_HELP_CMD_SET_EMAIL EMAIL Associate an E-mail address with your nickname +NICK_HELP_CMD_SET_ICQ ICQ Associate an ICQ number with your nickname +NICK_HELP_CMD_SET_GREET GREET Associate a greet message with your nickname +NICK_HELP_CMD_SET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SET_PRIVATE PRIVATE Prevent your nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. - + +NICK_HELP_SET_TAIL In order to use this command, you must first identify with your password (%R%S HELP IDENTIFY for more information). @@ -3621,27 +3635,42 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: - + +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_AUTOOP AUTOOP Turn autoop on or off +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/es.l b/lang/es.l index 1dfc3581f..3f79f3d06 100644 --- a/lang/es.l +++ b/lang/es.l @@ -3589,29 +3589,43 @@ NICK_HELP_ACCESS ACCESS LIST Muestra la lista de acceso actual. -NICK_HELP_SET +NICK_HELP_SET_HEAD Sintaxis: SET opcion parametros Setea varias opciones para nicknames. opcion puede ser una de: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Setea el display de tu grupo con Servicios +NICK_HELP_CMD_SET_PASSWORD PASSWORD Setea la clave de tu nickname +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Setea el lenguaje con el que Servicios te enviara mensajes +NICK_HELP_CMD_SET_URL URL Asocia una URL con tu nickname +NICK_HELP_CMD_SET_EMAIL EMAIL Asocia un E-mail con tu nickname +NICK_HELP_CMD_SET_ICQ ICQ Asocia un numero ICQ con tu nickname +NICK_HELP_CMD_SET_GREET GREET Asocia un saludo con tu nickname +NICK_HELP_CMD_SET_KILL KILL Enciende o apaga la proteccion +NICK_HELP_CMD_SET_SECURE SECURE Enciende o apaga la seguridad de nickname +NICK_HELP_CMD_SET_PRIVATE PRIVATE Previene tu nickname de aparecer en un %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Esconde algunas partes de tu informacion +NICK_HELP_CMD_SET_MSG MSG Cambia el metodo de comunicacion con Servicios +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. - + +NICK_HELP_SET_TAIL Para usar este comando, debes primero identificarte con Servicios usando tu clave (%R%S HELP IDENTIFY para mayor informacion). @@ -3729,26 +3743,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: - + +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/fr.l b/lang/fr.l index d7480f079..b034e1fef 100644 --- a/lang/fr.l +++ b/lang/fr.l @@ -3644,27 +3644,41 @@ NICK_HELP_ACCESS ACCESS LIST Affiche votre liste d'accès. -NICK_HELP_SET +NICK_HELP_SET_HEAD Syntaxe: SET option paramètres Configure diverses options du pseudo. option peut être: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Change l'affichage de votre groupe dans les services +NICK_HELP_CMD_SET_PASSWORD PASSWORD Change le mot de passe de votre pseudo +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Change la langue dans laquelle les Services vous envoient leurs messages +NICK_HELP_CMD_SET_URL URL Associe une adresse de site à votre pseudo +NICK_HELP_CMD_SET_EMAIL EMAIL Associe une e-mail à votre pseudo +NICK_HELP_CMD_SET_ICQ ICQ Associe un numéro ICQ à votre pseudo +NICK_HELP_CMD_SET_GREET GREET Associe un message d'accueil à votre pseudo +NICK_HELP_CMD_SET_KILL KILL Active ou désactive la protection +NICK_HELP_CMD_SET_SECURE SECURE Active ou désactive la sécurité du pseudo +NICK_HELP_CMD_SET_PRIVATE PRIVATE Empêche votre pseudo d'être affiché par %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Cache certaines parties des informations du pseudo +NICK_HELP_CMD_SET_MSG MSG Change le mode de communication des Services +NICK_HELP_CMD_SET_AUTOOP AUTOOP Demande à Services de vous rendre automatiquement OP. +NICK_HELP_SET_TAIL Pour utiliser cette commande, vous devez d'abord vous identifier avec votre mot de passe (%R%S HELP @@ -3783,26 +3797,40 @@ NICK_HELP_SET_AUTOOP Positionnez sur ON pour permettre à ChanServ de le faire quand vous entrez dans un canal. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntaxe: SASET pseudo option parametres. Configure plusieurs options sur un pseudo. option doit être l'une ci-dessous: - + +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Affiche les pseudos du groupe du pseudo donné +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Change le mot de passe du pseudo donné +NICK_HELP_CMD_SASET_URL URL Associe une url au pseudo donné +NICK_HELP_CMD_SASET_EMAIL EMAIL Associe une email au pseudo donné +NICK_HELP_CMD_SASET_ICQ ICQ Associe un compte ICQ au pseudo donné +NICK_HELP_CMD_SASET_GREET GREET Associe un message d'accueil au pseudo donné +NICK_HELP_CMD_SASET_KILL KILL Active ou désactive l'option kill du pseudo donné +NICK_HELP_CMD_SASET_SECURE SECURE Active ou désactive la securité du pseudo donné +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Empêche le pseudo d'apparaître dans un %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Cache certaines informations personnelles du pseudo +NICK_HELP_CMD_SASET_MSG MSG Change le mode de communication des Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Empêche le pseudo d'expirer +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Défini la langue que Services utilisera dans les messages qu'il vous envoie. +NICK_HELP_SASET_TAIL Taper %R%S HELP SASET option pour plus d'informations sur une option spécifique. L'option devra être mise avec le pseudo diff --git a/lang/gr.l b/lang/gr.l index a851bc048..38922a876 100644 --- a/lang/gr.l +++ b/lang/gr.l @@ -3617,26 +3617,40 @@ NICK_HELP_ACCESS ACCESS LIST Åìöáíßæåé ôçí ôñÝ÷ïõóá ëßóôá ðñüóâáóçò. -NICK_HELP_SET +NICK_HELP_SET_HEAD Óýíôáîç: SET option parameters ÁëëÜæåé äéÜöïñåò åðéëïãÝò ôïõ øåõäùíýìïõ. Ç åðéëïãÞ ìðïñåß íá åßíáé: +NICK_HELP_CMD_SET_DISPLAY DISPLAY ÁëëÜæåé ôçí ëßóôá ôùí ïìÜäùí +NICK_HELP_CMD_SET_PASSWORD PASSWORD ÁëëÜæåé ôïí êùäéêü ôïõ øåõäùíýìïõ óáò +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE ÁëëÜæåé ôç ãëþóóá ðïõ ÷ñçóéìïðïéïýí ïé õðçñåóßåò üôáí ôéò ÷ñçóéìïðïéåßôå +NICK_HELP_CMD_SET_URL URL Óõó÷åôßæåé Ýíá URL ìå ôï øåõäþíõìü óáò +NICK_HELP_CMD_SET_EMAIL EMAIL Óõó÷åôßæåé ìßá äéåýèõíóç e-mail ìå ôï øåõäþíõìü óáò +NICK_HELP_CMD_SET_ICQ ICQ Óõó÷åôßæåé Ýíá íïýìåñï ICQ ìå ôï øåõäþíõìü óáò +NICK_HELP_CMD_SET_GREET GREET Óõó÷åôßæåé Ýíá ìÞíõìá ÷áéñåôéóìïý ìå ôï øåõäþíõìü óáò +NICK_HELP_CMD_SET_KILL KILL Åíåñãïðïéåß/áðåíåñãïðïéåß ôçí ðñïóôáóßá ìå áðïóýíäåóç +NICK_HELP_CMD_SET_SECURE SECURE Åíåñãïðïéåß/áðåíåñãïðïéåß ôç ëåéôïõñãßá áóöÜëåéáò +NICK_HELP_CMD_SET_PRIVATE PRIVATE Åìðïäßæåé ôï øåõäþíõìü óáò íá åìöáíßæåôáé ìå ôçí åíôïëÞ %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Áðïêñýðôåé óõãêåêñéìÝíá ôìÞìáôá ðëçñïöïñéþí ôïõ øåõäùíýìïõ +NICK_HELP_CMD_SET_MSG MSG ÁëëÜæåé ôçí ìÝèïäï åðéêïéíùíßáò ìå ôéò õðçñåóßåò +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Ãéá íá ÷ñçóéìïðïéÞóåôå áõôÞ ôçí åíôïëÞ, ðñÝðåé ðñþôá íá áíáãíùñéóôåßôå ìå ôïí êùäéêü óáò (ãéá ðåñéóóüôåñåò ðëçñïöïñßåò, @@ -3760,26 +3774,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/hun.l b/lang/hun.l index 113b9b94b..3eb1d2785 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -3542,24 +3542,38 @@ NICK_HELP_ACCESS ACCESS LIST Megmutatja a hozzáférési listát. -NICK_HELP_SET +NICK_HELP_SET_HEAD Syntax: SET opció paraméterek Beállítható nicknév opciók. Az opció ezek egyike lehet: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Set the display of your group in Services +NICK_HELP_CMD_SET_PASSWORD PASSWORD Set your nickname password +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE A szervíz nyelvezetének megválasztása +NICK_HELP_CMD_SET_URL URL Egy URL társítása a nicknevedhez +NICK_HELP_CMD_SET_EMAIL EMAIL Egy E-mail cím társítása a nicknevedhez +NICK_HELP_CMD_SET_ICQ ICQ ICQ szám társítása a nicknevedhez +NICK_HELP_CMD_SET_GREET GREET Köszöntõ üzenet társítása a nicknevedhez +NICK_HELP_CMD_SET_KILL KILL A kill védelem be-,kikapcsolása +NICK_HELP_CMD_SET_SECURE SECURE A nickneved védelmének be-,kikapcsolása +NICK_HELP_CMD_SET_PRIVATE PRIVATE A nickneved %R%S LIST -ból való elrejtése +NICK_HELP_CMD_SET_HIDE HIDE A nicknévhez tartozó információk elrejtése +NICK_HELP_CMD_SET_MSG MSG Megváltoztatja a szervízzel való kommunikációt +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Ezen parancs kiadása elõtt, azonositanod kell magad, mint a nick tulajdonosa az IDENTIFY parancsot használva, írd @@ -3678,26 +3692,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/it.l b/lang/it.l index ff7b611ab..db3346afc 100644 --- a/lang/it.l +++ b/lang/it.l @@ -3498,25 +3498,39 @@ NICK_HELP_ACCESS ACCESS LIST Visualizza la lista di accesso attuale. -NICK_HELP_SET +NICK_HELP_SET_HEAD Sintassi: SET opzione parametri Imposta varie opzioni del nick. opzione può essere una delle seguenti: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Imposta il nome del tuo gruppo +NICK_HELP_CMD_SET_EMAIL EMAIL Associa un indirizzo e-mail al tuo nick +NICK_HELP_CMD_SET_GREET GREET Associa un messaggio di saluto al tuo nick +NICK_HELP_CMD_SET_HIDE HIDE Nasconde alcune informazioni sul tuo nick +NICK_HELP_CMD_SET_ICQ ICQ Associa un numero ICQ al tuo nick +NICK_HELP_CMD_SET_KILL KILL Attiva o disattiva la protezione +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Imposta la lingua utilizzata dai Services +NICK_HELP_CMD_SET_MSG MSG Cambia il metodo di comunicazione usato dai Services +NICK_HELP_CMD_SET_PASSWORD PASSWORD Imposta la password del tuo nick +NICK_HELP_CMD_SET_PRIVATE PRIVATE Nasconde il nick dalla lista (%R%S LIST) +NICK_HELP_CMD_SET_SECURE SECURE Attiva o disattiva la sicurezza +NICK_HELP_CMD_SET_URL URL Associa un URL al tuo nick +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Per usare questo comando, devi prima identificarti con la tua password (digita %R%S HELP IDENTIFY per @@ -3633,26 +3647,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Sintassi: SASET nickname opzione parametri. Imposta varie opzioni del nick. opzione può essere una delle seguenti: - + +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Imposta il nome del gruppo +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Imposta la password del nick +NICK_HELP_CMD_SASET_URL URL Associa un URL al nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associa un indirizzo e-mail al nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associa un numero ICQ al nickname +NICK_HELP_CMD_SASET_GREET GREET Associa un messaggio di saluto al nickname +NICK_HELP_CMD_SASET_KILL KILL Attiva o disattiva la protezione +NICK_HELP_CMD_SASET_SECURE SECURE Attiva o disattiva la sicurezza +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Nasconde il nick dalla lista (%R%S LIST) +NICK_HELP_CMD_SASET_HIDE HIDE Nsconde alcune informazioni sul nick +NICK_HELP_CMD_SASET_MSG MSG Cambia il metodo di comunicazione usato dai servizi +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Evita che il nickname scada +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Digita %R%S HELP SASET opzione per maggiori informazioni su un'opzione specifica. Le opzioni verranno impostate sul diff --git a/lang/nl.l b/lang/nl.l index 44e2ecd9c..bfb20edaf 100644 --- a/lang/nl.l +++ b/lang/nl.l @@ -3569,26 +3569,40 @@ NICK_HELP_ACCESS ACCESS LIST Geeft de huidige toegangslijst weer. -NICK_HELP_SET +NICK_HELP_SET_HEAD Gebruik: SET optie parameters Stelt verscheidene nick opties in. option kan zijn: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Stel de weergave van je groep in Services in +NICK_HELP_CMD_SET_PASSWORD PASSWORD Verander het wachtwoord voor je nick +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Selecteer de taal die Services zal gebruiken voor het versturen van berichten naar jou +NICK_HELP_CMD_SET_URL URL Associeer een URL met je nick +NICK_HELP_CMD_SET_EMAIL EMAIL Associeer een E-mail adres met je nick +NICK_HELP_CMD_SET_ICQ ICQ Associeer een ICQ nummer met je nick +NICK_HELP_CMD_SET_GREET GREET Associeer een begroeting met je nick +NICK_HELP_CMD_SET_KILL KILL Zet bescherming aan of uit +NICK_HELP_CMD_SET_SECURE SECURE Zet nickname beveiliging aan of uit +NICK_HELP_CMD_SET_PRIVATE PRIVATE Zorgt ervoor dat je nick niet verschijnt in een %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Verberg verschillende soorten nick informatie +NICK_HELP_CMD_SET_MSG MSG Verander de communicatiemanier van Services +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Om dit commando te gebruiken moet je je eerst identificeren met je wachtwoord (%R%S HELP IDENTIFY voor meer @@ -3705,26 +3719,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: - + +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/pl.l b/lang/pl.l index e96bb89bf..2e5685ca9 100644 --- a/lang/pl.l +++ b/lang/pl.l @@ -4551,26 +4551,40 @@ NICK_HELP_ACCESS ACCESS LIST Wy¶wietla aktualn± listê dostêpu. -NICK_HELP_SET +NICK_HELP_SET_HEAD Sk³adnia: SET opcja parametry Ustawia ró¿ne opcje nicka. Dostêpne opcje to: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Ustawia nick reprezentuj±cy grupê nicków +NICK_HELP_CMD_SET_PASSWORD PASSWORD Ustawia has³o do nicka +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Ustawia jêzyk w którym serwisy bêd± wysy³a³y komunikaty +NICK_HELP_CMD_SET_URL URL Przypisuje adres www do nicka +NICK_HELP_CMD_SET_EMAIL EMAIL Przypisuje adres e-mail do nicka +NICK_HELP_CMD_SET_ICQ ICQ Przypisuje numer ICQ do nicka +NICK_HELP_CMD_SET_GREET GREET Przypisuje komunikat powitalny do nicka +NICK_HELP_CMD_SET_KILL KILL W³±cza lub wy³±cza ochronê nicka +NICK_HELP_CMD_SET_SECURE SECURE W³±cza lub wy³±cza bezpieczeñstwo nicka +NICK_HELP_CMD_SET_PRIVATE PRIVATE Zapobiega wy¶wietlaniu nicka po wydaniu polecenia: %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Ukrywa poszczególne informacje o nicku +NICK_HELP_CMD_SET_MSG MSG Zmienia sposób komunikacji serwisów +NICK_HELP_CMD_SET_AUTOOP AUTOOP W³±cza lub wy³±cza automatyczne opowanie +NICK_HELP_SET_TAIL Aby u¿yæ tej komendy musisz siê zidentyfikowaæ z u¿yciem Twojego has³a. Aby uzyskaæ wiêcej informacji wpisz: @@ -4691,28 +4705,43 @@ NICK_HELP_SET_AUTOOP W³±cza lub wy³±cza automatyczne nadawanie uprawnieñ przy wchodzeniu na kana³. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Sk³adnia: SASET nick opcja parametry. Ustawia ró¿ne opcje nicka wskazanemu u¿ytkownikowi. Dostêpne opcje to: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Ustawia nick reprezentuj±cy grupê nicków +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Ustawia has³o do nicka +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Ustawia jêzyk w którym serwisy bêd± wysy³a³y komunikaty +NICK_HELP_CMD_SASET_URL URL Przypisuje adres www do nicka +NICK_HELP_CMD_SASET_EMAIL EMAIL Przypisuje adres e-mail do nicka +NICK_HELP_CMD_SASET_ICQ ICQ Przypisuje numer ICQ do nicka +NICK_HELP_CMD_SASET_GREET GREET Przypisuje komunikat powitalny do nicka +NICK_HELP_CMD_SASET_KILL KILL W³±cza lub wy³±cza ochronê nicka +NICK_HELP_CMD_SASET_SECURE SECURE W³±cza lub wy³±cza bezpieczeñstwo nicka +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Zapobiega wy¶wietlaniu nicka po wydaniu polecenia: %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Ukrywa poszczególne informacje o nicku +NICK_HELP_CMD_SASET_MSG MSG Zmienia sposób komunikacji serwisów +NICK_HELP_CMD_SASET_AUTOOP AUTOOP W³±cza lub wy³±cza automatyczne opowanie +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Zapobiega wyga¶niêciu nicka +NICK_HELP_SASET_TAIL Aby uzyskaæ wiêcej informacji o danej opcji wpisz: %R%S HELP SASET opcja diff --git a/lang/pt.l b/lang/pt.l index d8cdc4890..cdb25ebec 100644 --- a/lang/pt.l +++ b/lang/pt.l @@ -3516,25 +3516,39 @@ NICK_HELP_ACCESS ACCESS LIST Mostra a lista de acesso atual. -NICK_HELP_SET +NICK_HELP_SET_HEAD Sintaxe: SET opção parâmetros Ajusta várias opções de nick. A opção pode ser: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Mostra o seu grupo nos Services +NICK_HELP_CMD_SET_PASSWORD PASSWORD Ajusta a senha do seu nick +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Ajusta a linguagem dos Services quando mensagens são enviadas à você +NICK_HELP_CMD_SET_URL URL Associa um endereço URL com seu nick +NICK_HELP_CMD_SET_EMAIL EMAIL Associa um endereço de e-mail ao seu nick +NICK_HELP_CMD_SET_ICQ ICQ Associa um número de ICQ ao seu nick +NICK_HELP_CMD_SET_GREET GREET Associa uma mensgem de entrada ao seu nick +NICK_HELP_CMD_SET_KILL KILL Ativa/Desativa a proteção de kill para o seu nick +NICK_HELP_CMD_SET_SECURE SECURE Ativa/Desativa os recursos de segurança para o seu nick +NICK_HELP_CMD_SET_PRIVATE PRIVATE Previne seu nick de aparecer em um %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE Esconde certas informações sobre seu nick +NICK_HELP_CMD_SET_MSG MSG Altera o método de comunicação dos Services +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Para usar este comando, você deve primeiro se identificar com sua senha (%R%S HELP IDENTIFY para maiores @@ -3657,26 +3671,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/lang/ru.l b/lang/ru.l index 24de90060..4b77e7180 100644 --- a/lang/ru.l +++ b/lang/ru.l @@ -3511,26 +3511,40 @@ NICK_HELP_ACCESS ACCESS LIST âûâîäèò òåêóùèé ñïèñîê "äîâåðåííûõ" õîñòìàñîê. -NICK_HELP_SET +NICK_HELP_SET_HEAD Ñèíòàêñèñ: SET îïöèÿ ïàðàìåòðû Êîìàíäà SET ïîçâîëÿåò âàì íàñòðîèòü ðàçëè÷íûå îïöèè íèêà. Ñïèñîê îïöèé: +NICK_HELP_CMD_SET_DISPLAY DISPLAY óñòàíîâêà ãëàâíîãî íèêà ãðóïïû +NICK_HELP_CMD_SET_PASSWORD PASSWORD èçìåíåíèå òåêóùåãî ïàðîëÿ íà íèê +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE âûáîð ÿçûêà, ïîñðåäñòâîì êîòîðîãî ñåðâèñû áóäóò ñ âàìè îáùàòüñÿ +NICK_HELP_CMD_SET_URL URL óñòàíîâêà URL-àäðåñà íà íèê +NICK_HELP_CMD_SET_EMAIL EMAIL óñòàíîâêà email-àäðåñà íà íèê +NICK_HELP_CMD_SET_ICQ ICQ óñòàíîâêà ICQ-íîìåðà íà íèê +NICK_HELP_CMD_SET_GREET GREET óñòàíîâêà ïðèâåòñòâåííîãî ñîîáùåíèÿ +NICK_HELP_CMD_SET_KILL KILL àêòèâèðîâàíèå/äåàêòèâèðîâàíèå ðåæèìà çàùèòû +NICK_HELP_CMD_SET_SECURE SECURE àêòèâèðîâàíèå/äåàêòèâèðîâàíèå ðåæèìà áåçîïàñíîñòè +NICK_HELP_CMD_SET_PRIVATE PRIVATE ñêðûòèå âàøåãî íèêà â ñïèñêå íèêîâ ïî %R%S LIST +NICK_HELP_CMD_SET_HIDE HIDE ñêðûòèå ðàçëè÷íîé èíôîðìàöèè î âàøåì íèêå +NICK_HELP_CMD_SET_MSG MSG âûáîð ìåòîäà îáùåíèÿ ñåðâèñîâ ñ âàìè +NICK_HELP_CMD_SET_AUTOOP AUTOOP àêòèâèðîâàíèå/äåàêòèâèðîâàíèå àâòîñòàòóñà +NICK_HELP_SET_TAIL ×òîáû ïîëó÷èòü ñïðàâî÷íóþ èíôîðìàöèþ ïî îòäåëüíî âçÿòîé îïöèè âîñïîëüçóéòåñü êîìàíäîé %R%S HELP SET îïöèÿ @@ -3665,27 +3679,42 @@ NICK_HELP_SET_AUTOOP Óêàæèòå ON, åñëè õîòèòå ÷òî áû ñåðâèñû àâòîìàòè÷åñêè äàâàëè âàì ñòàòóñ ïðè âõîäå íà êàíàë. Ñîîòâåòñòâåííî OFF - äëÿ îòêëþ÷åíèÿ. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Ñèíòàêñèñ: SASET íèê îïöèÿ ïàðàìåòðû. Ïîçâîëÿåò Àäìèíèñòðàòîðàì ñåðâèñîâ íàñòðàèâàòü êàêèå-ëèáî îïöèè äëÿ óêàçàííîãî íèêà áåç èäåíòèôèêàöèè ê íåìó. Ñïèñîê îïöèè: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY óñòàíîâêà ãëàâíîãî íèêà ãðóïïû +NICK_HELP_CMD_SASET_PASSWORD PASSWORD èçìåíåíèå òåêóùåãî ïàðîëÿ íà íèê +NICK_HELP_CMD_SASET_URL URL óñòàíîâêà URL-àäðåñà íà íèê +NICK_HELP_CMD_SASET_EMAIL EMAIL óñòàíîâêà email-àäðåñà íà íèê +NICK_HELP_CMD_SASET_ICQ ICQ óñòàíîâêà ICQ-íîìåðà íà íèê +NICK_HELP_CMD_SASET_GREET GREET óñòàíîâêà ïðèâåòñòâåííîãî ñîîáùåíèÿ +NICK_HELP_CMD_SASET_KILL KILL àêòèâèðîâàíèå/äåàêòèâèðîâàíèå ðåæèìà çàùèòû +NICK_HELP_CMD_SASET_SECURE SECURE àêòèâèðîâàíèå/äåàêòèâèðîâàíèå ðåæèìà áåçîïàñíîñòè +NICK_HELP_CMD_SASET_PRIVATE PRIVATE ñêðûòèå íèêà â ñïèñêå íèêîâ ïî %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE ñêðûòèå ðàçëè÷íîé èíôîðìàöèè î íèêå +NICK_HELP_CMD_SASET_MSG MSG âûáîð ìåòîäà îáùåíèÿ ñåðâèñîâ ñ íèêîì +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE óñòàíîâêà íà íèê ò.í. ðåæèìà 'íå-èñòå÷åíèÿ' +NICK_HELP_CMD_SASET_AUTOOP AUTOOP àêòèâèðîâàíèå/äåàêòèâèðîâàíèå ðåæèìà àâòîñòàòóñà +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE âûáîð ÿçûêà, ïîñðåäñòâîì êîòîðîãî ñåðâèñû áóäóò ñ óêàçàííûì íèêîì. +NICK_HELP_SASET_TAIL ×òîáû ïîëó÷èòü ñïðàâî÷íóþ èíôîðìàöèþ ïî îòäåëüíî âçÿòîé îïöèè âîñïîëüçóéòåñü êîìàíäîé %R%S HELP SASET îïöèÿ diff --git a/lang/tr.l b/lang/tr.l index bf0b0c95d..78408a9aa 100644 --- a/lang/tr.l +++ b/lang/tr.l @@ -3614,26 +3614,39 @@ NICK_HELP_ACCESS ACCESS LIST Mevcut access listesini görüntüler. -NICK_HELP_SET +NICK_HELP_SET_HEAD Kullanýmý: SET özellik parametre Çeþitli nick özelliklerini ayarlar. özellik þunlardan biri olabilir: +NICK_HELP_CMD_SET_DISPLAY DISPLAY Grubunuzun servislerde nasýl görüneceðini ayarlar +NICK_HELP_CMD_SET_PASSWORD PASSWORD Nickinize þifre belirtir +NICK_HELP_CMD_SET_LANGUAGE LANGUAGE Servislerin size hitap edeceði dili belirler +NICK_HELP_CMD_SET_URL URL Nickinizle bir URL yi iliþkilendirir +NICK_HELP_CMD_SET_EMAIL EMAIL Nickinizle bir email adresini iliþkilendirir +NICK_HELP_CMD_SET_ICQ ICQ Nickinizle bir ICQ numarasýný iliþikilendirir +NICK_HELP_CMD_SET_GREET GREET Nickiniz için bir karþýlama mesajý belirler +NICK_HELP_CMD_SET_KILL KILL Korumayý açar kapatýr +NICK_HELP_CMD_SET_SECURE SECURE Nick güvenliðini açar kapatýr +NICK_HELP_CMD_SET_PRIVATE PRIVATE Nickinizin %R%S LIST yazýldýðýnda görünmesini engeller +NICK_HELP_CMD_SET_HIDE HIDE Nickinizle ilgili bazý bilgileri saklar +NICK_HELP_CMD_SET_AUTOOP AUTOOP Should services op you automatically. +NICK_HELP_SET_TAIL Bu komutu kullanabilmek için önce, þifrenizle kendinizi tanýtmanýz gerekir (Daha fazla bilgi için @@ -3750,26 +3763,40 @@ NICK_HELP_SET_AUTOOP Sets whether you will be opped automatically. Set to ON to allow ChanServ to op you automatically when entering channels. -NICK_HELP_SASET +NICK_HELP_SASET_HEAD Syntax: SASET nickname option parameters. Sets various nickname options. option can be one of: +NICK_HELP_CMD_SASET_DISPLAY DISPLAY Set the display of the group in Services +NICK_HELP_CMD_SASET_PASSWORD PASSWORD Set the nickname password +NICK_HELP_CMD_SASET_URL URL Associate a URL with the nickname +NICK_HELP_CMD_SASET_EMAIL EMAIL Associate an E-mail address with the nickname +NICK_HELP_CMD_SASET_ICQ ICQ Associate an ICQ number with the nickname +NICK_HELP_CMD_SASET_GREET GREET Associate a greet message with the nickname +NICK_HELP_CMD_SASET_KILL KILL Turn protection on or off +NICK_HELP_CMD_SASET_SECURE SECURE Turn nickname security on or off +NICK_HELP_CMD_SASET_PRIVATE PRIVATE Prevent the nickname from appearing in a %R%S LIST +NICK_HELP_CMD_SASET_HIDE HIDE Hide certain pieces of nickname information +NICK_HELP_CMD_SASET_MSG MSG Change the communication method of Services +NICK_HELP_CMD_SASET_NOEXPIRE NOEXPIRE Prevent the nickname from expiring +NICK_HELP_CMD_SASET_LANGUAGE LANGUAGE Set the language Services will use when sending messages to nickname +NICK_HELP_SASET_TAIL Type %R%S HELP SASET option for more information on a specific option. The options will be set on the given diff --git a/src/botserv.cpp b/src/botserv.cpp index 7f64c0c63..2dd96706d 100644 --- a/src/botserv.cpp +++ b/src/botserv.cpp @@ -85,7 +85,7 @@ void botserv(User *u, BotInfo *bi, const std::string &buf) } else { - mod_run_cmd(bi, u, buf.c_str()); + mod_run_cmd(bi, u, buf); } } diff --git a/src/chanserv.cpp b/src/chanserv.cpp index 256909bb9..10acd3731 100644 --- a/src/chanserv.cpp +++ b/src/chanserv.cpp @@ -273,7 +273,7 @@ void chanserv(User *u, const std::string &buf) } else { - mod_run_cmd(ChanServ, u, buf.c_str()); + mod_run_cmd(ChanServ, u, buf); } } diff --git a/src/command.cpp b/src/command.cpp index 7fd5975ef..922f298c3 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -20,16 +20,31 @@ Command::~Command() { } -CommandReturn Command::Execute(User *u, const std::vector &) { return MOD_CONT; } +CommandReturn Command::Execute(User *u, const std::vector &) +{ + return MOD_CONT; +} void Command::OnServHelp(User *u) { } bool Command::OnHelp(User *u, const ci::string &subcommand) { return false; } -void Command::OnSyntaxError(User *u, const ci::string &subcommand) { } +void Command::OnSyntaxError(User *u, const ci::string &subcommand) +{ +} void Command::SetPermission(const std::string &reststr) { this->permission = reststr; } +bool Command::AddSubcommand(Command *c) +{ + return false; +} + +bool Command::DelSubcommand(const ci::string &cname) +{ + return false; +} + diff --git a/src/commands.cpp b/src/commands.cpp index 3226bff59..f066b2885 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -29,22 +29,26 @@ Command *FindCommand(BotInfo *bi, const ci::string &name) return NULL; } -void mod_run_cmd(BotInfo *bi, User *u, const ci::string &message) +void mod_run_cmd(BotInfo *bi, User *u, const std::string &message) { - if (!bi || !u || message.empty()) - return; - - spacesepstream sep(message); - ci::string command; + spacesepstream sep(ci::string(message.c_str())); + ci::string cmd; - if (!sep.GetToken(command)) + if (sep.GetToken(cmd)) + { + mod_run_cmd(bi, u, FindCommand(bi, cmd), cmd, sep.GetRemaining().c_str()); + } +} + +void mod_run_cmd(BotInfo *bi, User *u, Command *c, const ci::string &command, const ci::string &message) +{ + if (!bi || !u) return; - Command *c = FindCommand(bi, command); CommandReturn ret = MOD_CONT; EventReturn MOD_RESULT; - FOREACH_RESULT(I_OnPreCommandRun, OnPreCommandRun(u, bi, command, sep.GetRemaining().c_str(), c)); + FOREACH_RESULT(I_OnPreCommandRun, OnPreCommandRun(u, bi, command, message, c)); if (MOD_RESULT == EVENT_STOP) return; @@ -67,6 +71,7 @@ void mod_run_cmd(BotInfo *bi, User *u, const ci::string &message) std::vector params; ci::string curparam, endparam; + spacesepstream sep(message); while (sep.GetToken(curparam)) { // - 1 because params[0] corresponds with a maxparam of 1. diff --git a/src/core/ns_saset.cpp b/src/core/ns_saset.cpp index c2e5831bd..ccc6be928 100644 --- a/src/core/ns_saset.cpp +++ b/src/core/ns_saset.cpp @@ -16,559 +16,223 @@ class CommandNSSASet : public Command { -private: - CommandReturn DoSetDisplay(User *u, const std::vector ¶ms, NickCore *nc) + std::map subcommands; + public: + CommandNSSASet(const ci::string &cname) : Command(cname, 2, 4) { - ci::string param = params.size() > 2 ? params[2] : ""; - - if (param.empty()) - { - this->OnSyntaxError(u, "DISPLAY"); - return MOD_CONT; - } - - /* First check whether param is a valid nick of the group */ - NickAlias *na = findnick(param); - - if (!na || na->nc != nc) - { - notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_INVALID, nc->display); - return MOD_CONT; - } - - change_core_display(nc, param.c_str()); - notice_lang(Config.s_NickServ, u, NICK_SASET_DISPLAY_CHANGED, nc->display); - return MOD_CONT; } - CommandReturn DoSetPassword(User *u, const std::vector ¶ms, NickCore *nc) + ~CommandNSSASet() { - ci::string param = params.size() > 2 ? params[2] : ""; - std::string buf, tmp_pass; - - if (param.empty()) + for (std::map::const_iterator it = this->subcommands.begin(); it != this->subcommands.end(); ++it) { - this->OnSyntaxError(u, "PASSWORD"); - return MOD_CONT; + delete it->second; } - - int len = param.size(); - - if (Config.NSSecureAdmins && u->Account() != nc && nc->IsServicesOper()) - { - notice_lang(Config.s_NickServ, u, ACCESS_DENIED); - return MOD_CONT; - } - else if (nc->display == param || (Config.StrictPasswords && len < 5)) - { - notice_lang(Config.s_NickServ, u, MORE_OBSCURE_PASSWORD); - return MOD_CONT; - } - else if (len > Config.PassLen) - { - notice_lang(Config.s_NickServ, u, PASSWORD_TOO_LONG); - return MOD_CONT; - } - buf = param.c_str(); /* conversion from ci::string to std::string */ - if (enc_encrypt(buf, nc->pass)) - { - Alog() << Config.s_NickServ << ": Failed to encrypt password for " << nc->display << " (set)"; - notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_FAILED, nc->display); - return MOD_CONT; - } - - if (enc_decrypt(nc->pass, tmp_pass) == 1) - notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, nc->display, tmp_pass.c_str()); - else - notice_lang(Config.s_NickServ, u, NICK_SASET_PASSWORD_CHANGED, nc->display); - - Alog() << Config.s_NickServ << ": " << u->GetMask() << " used SASET PASSWORD on " << nc->display << " (e-mail: "<< (nc->email ? nc->email : "none") << ")"; - if (Config.WallSetpass) - ircdproto->SendGlobops(NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick.c_str(), nc->display); - return MOD_CONT; - } - - CommandReturn DoSetUrl(User *u, const std::vector ¶ms, NickCore *nc) - { - const char *param = params.size() > 2 ? params[2].c_str() : NULL; - - if (nc->url) - delete [] nc->url; - - if (param) - { - nc->url = sstrdup(param); - notice_lang(Config.s_NickServ, u, NICK_SASET_URL_CHANGED, nc->display, param); - } - else - { - nc->url = NULL; - notice_lang(Config.s_NickServ, u, NICK_SASET_URL_UNSET, nc->display); - } - return MOD_CONT; + this->subcommands.clear(); } - CommandReturn DoSetEmail(User *u, const std::vector ¶ms, NickCore *nc) + CommandReturn Execute(User *u, const std::vector ¶ms) { - const char *param = params.size() > 2 ? params[2].c_str() : NULL; + const char *nick = params[0].c_str(); + ci::string cmd = params[1]; - if (!param && Config.NSForceEmail) - { - notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_UNSET_IMPOSSIBLE); - return MOD_CONT; - } - else if (Config.NSSecureAdmins && u->Account() != nc && nc->IsServicesOper()) - { - notice_lang(Config.s_NickServ, u, ACCESS_DENIED); - return MOD_CONT; - } - else if (param && !MailValidate(param)) + if (readonly) { - notice_lang(Config.s_NickServ, u, MAIL_X_INVALID, param); + notice_lang(Config.s_NickServ, u, NICK_SASET_DISABLED); return MOD_CONT; } - Alog() << Config.s_NickServ << ": " << u->GetMask() << " used SASET EMAIL on " << nc->display << " (e-mail: " << (nc->email ? nc->email : "none") << ")"; - - if (nc->email) - delete [] nc->email; - - if (param) - { - nc->email = sstrdup(param); - notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_CHANGED, nc->display, param); - } + NickAlias *na = findnick(nick); + if (!na) + notice_lang(Config.s_NickServ, u, NICK_SASET_BAD_NICK, nick); + else if (na->HasFlag(NS_FORBIDDEN)) + notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick); + else if (na->nc->HasFlag(NI_SUSPENDED)) + notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick); else { - nc->email = NULL; - notice_lang(Config.s_NickServ, u, NICK_SASET_EMAIL_UNSET, nc->display); - } - return MOD_CONT; - } + Command *c = this->FindCommand(params[1]); - CommandReturn DoSetICQ(User *u, const std::vector ¶ms, NickCore *nc) - { - const char *param = params.size() > 2 ? params[2].c_str() : NULL; - - if (param) - { - int32 tmp = atol(param); - if (!tmp) - notice_lang(Config.s_NickServ, u, NICK_SASET_ICQ_INVALID, param); + if (c) + { + ci::string cmdparams = na->nc->display; + for (std::vector::const_iterator it = params.begin() + 1; it != params.end(); ++it) + cmdparams += " " + *it; + mod_run_cmd(NickServ, u, c, params[1], cmdparams); + } else { - nc->icq = tmp; - notice_lang(Config.s_NickServ, u, NICK_SASET_ICQ_CHANGED, nc->display, param); + notice_lang(Config.s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd.c_str()); } } - else - { - nc->icq = 0; - notice_lang(Config.s_NickServ, u, NICK_SASET_ICQ_UNSET, nc->display); - } + return MOD_CONT; } - CommandReturn DoSetGreet(User *u, const std::vector ¶ms, NickCore *nc) + bool OnHelp(User *u, const ci::string &subcommand) { - const char *param = params.size() > 2 ? params[2].c_str() : NULL; - - if (nc->greet) - delete [] nc->greet; - - if (param) + if (subcommand.empty()) { - char buf[BUFSIZE]; - const char *rest = params.size() > 3 ? params[3].c_str() : NULL; - - snprintf(buf, sizeof(buf), "%s%s%s", param, rest ? " " : "", rest ? rest : ""); - - nc->greet = sstrdup(buf); - notice_lang(Config.s_NickServ, u, NICK_SASET_GREET_CHANGED, nc->display, buf); + notice_help(Config.s_NickServ, u, NICK_HELP_SASET_HEAD); + for (std::map::iterator it = this->subcommands.begin(); it != this->subcommands.end(); ++it) + it->second->OnServHelp(u); + notice_help(Config.s_NickServ, u, NICK_HELP_SASET_TAIL); + return true; } else { - nc->greet = NULL; - notice_lang(Config.s_NickServ, u, NICK_SASET_GREET_UNSET, nc->display); - } - return MOD_CONT; - } - - CommandReturn DoSetKill(User *u, const std::vector ¶ms, NickCore *nc) - { - ci::string param = params.size() > 2 ? params[2] : ""; - - if (param.empty()) - { - this->OnSyntaxError(u, "KILL"); - return MOD_CONT; - } + Command *c = this->FindCommand(subcommand); - if (param == "ON") - { - nc->SetFlag(NI_KILLPROTECT); - nc->UnsetFlag(NI_KILL_QUICK); - nc->UnsetFlag(NI_KILL_IMMED); - notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_ON, nc->display); - } - else if (param == "QUICK") - { - nc->SetFlag(NI_KILLPROTECT); - nc->SetFlag(NI_KILL_QUICK); - nc->UnsetFlag(NI_KILL_IMMED); - notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_QUICK, nc->display); - } - else if (param == "IMMED") - { - if (Config.NSAllowKillImmed) + if (c) { - nc->SetFlag(NI_KILLPROTECT); - nc->SetFlag(NI_KILL_IMMED); - nc->UnsetFlag(NI_KILL_QUICK); - notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_IMMED, nc->display); + return c->OnHelp(u, subcommand); } - else - notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_IMMED_DISABLED); - } - else if (param == "OFF") - { - nc->UnsetFlag(NI_KILLPROTECT); - nc->UnsetFlag(NI_KILL_QUICK); - nc->UnsetFlag(NI_KILL_IMMED); - notice_lang(Config.s_NickServ, u, NICK_SASET_KILL_OFF, nc->display); } - else - syntax_error(Config.s_NickServ, u, "SASET KILL", Config.NSAllowKillImmed ? NICK_SASET_KILL_IMMED_SYNTAX : NICK_SASET_KILL_SYNTAX); - return MOD_CONT; + + return false; } - CommandReturn DoSetSecure(User *u, const std::vector ¶ms, NickCore *nc) + void OnSyntaxError(User *u, const ci::string &subcommand) { - ci::string param = params.size() > 2 ? params[2] : ""; - - if (param.empty()) - { - this->OnSyntaxError(u, "SECURE"); - return MOD_CONT; - } - - if (param == "ON") - { - nc->SetFlag(NI_SECURE); - notice_lang(Config.s_NickServ, u, NICK_SASET_SECURE_ON, nc->display); - } - else if (param == "OFF") - { - nc->UnsetFlag(NI_SECURE); - notice_lang(Config.s_NickServ, u, NICK_SASET_SECURE_OFF, nc->display); - } - else - syntax_error(Config.s_NickServ, u, "SASET SECURE", NICK_SASET_SECURE_SYNTAX); - return MOD_CONT; + syntax_error(Config.s_NickServ, u, "SASET", NICK_SASET_SYNTAX); } - CommandReturn DoSetPrivate(User *u, const std::vector ¶ms, NickCore *nc) + void OnServHelp(User *u) { - ci::string param = params.size() > 2 ? params[2] : ""; - - if (param.empty()) - { - this->OnSyntaxError(u, "PRIVATE"); - return MOD_CONT; - } - - if (param == "ON") - { - nc->SetFlag(NI_PRIVATE); - notice_lang(Config.s_NickServ, u, NICK_SASET_PRIVATE_ON, nc->display); - } - else if (param == "OFF") - { - nc->UnsetFlag(NI_PRIVATE); - notice_lang(Config.s_NickServ, u, NICK_SASET_PRIVATE_OFF, nc->display); - } - else - syntax_error(Config.s_NickServ, u, "SASET PRIVATE", NICK_SASET_PRIVATE_SYNTAX); - return MOD_CONT; + notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_SASET); } - CommandReturn DoSetMsg(User *u, const std::vector ¶ms, NickCore *nc) + bool AddSubcommand(Command *c) { - ci::string param = params.size() > 2 ? params[2] : ""; - - if (param.empty()) - { - this->OnSyntaxError(u, "MSG"); - return MOD_CONT; - } - - if (!Config.UsePrivmsg) - { - notice_lang(Config.s_NickServ, u, NICK_SASET_OPTION_DISABLED, "MSG"); - return MOD_CONT; - } + return this->subcommands.insert(std::make_pair(c->name, c)).second; + } - if (param == "ON") - { - nc->SetFlag(NI_MSG); - notice_lang(Config.s_NickServ, u, NICK_SASET_MSG_ON, nc->display); - } - else if (param == "OFF") - { - nc->UnsetFlag(NI_MSG); - notice_lang(Config.s_NickServ, u, NICK_SASET_MSG_OFF, nc->display); - } - else - syntax_error(Config.s_NickServ, u, "SASET MSG", NICK_SASET_MSG_SYNTAX); - return MOD_CONT; + bool DelSubcommand(const ci::string &command) + { + return this->subcommands.erase(command); } - CommandReturn DoSetHide(User *u, const std::vector ¶ms, NickCore *nc) + Command *FindCommand(const ci::string &subcommand) { - ci::string param = params.size() > 2 ? params[2] : ""; + std::map::const_iterator it = this->subcommands.find(subcommand); - if (param.empty()) + if (it != this->subcommands.end()) { - this->OnSyntaxError(u, "HIDE"); - return MOD_CONT; + return it->second; } - int onmsg, offmsg; - NickCoreFlag flag; - - if (param == "EMAIL") - { - flag = NI_HIDE_EMAIL; - onmsg = NICK_SASET_HIDE_EMAIL_ON; - offmsg = NICK_SASET_HIDE_EMAIL_OFF; - } - else if (param == "USERMASK") - { - flag = NI_HIDE_MASK; - onmsg = NICK_SASET_HIDE_MASK_ON; - offmsg = NICK_SASET_HIDE_MASK_OFF; - } - else if (param == "STATUS") - { - flag = NI_HIDE_STATUS; - onmsg = NICK_SASET_HIDE_STATUS_ON; - offmsg = NICK_SASET_HIDE_STATUS_OFF; - } - else if (param == "QUIT") - { - flag = NI_HIDE_QUIT; - onmsg = NICK_SASE