summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/nickserv.example.conf1
-rw-r--r--include/config.h1
-rw-r--r--include/extensible.h4
-rw-r--r--include/language.h2
-rw-r--r--language/anope.fr_FR.po143
-rw-r--r--modules/commands/ns_set.cpp2
-rw-r--r--modules/commands/os_mode.cpp4
-rw-r--r--modules/commands/os_reload.cpp5
-rw-r--r--modules/protocol/bahamut.cpp2
-rw-r--r--modules/protocol/hybrid.cpp2
-rw-r--r--modules/protocol/ngircd.cpp2
-rw-r--r--modules/protocol/plexus.cpp5
-rw-r--r--modules/protocol/ratbox.cpp2
-rw-r--r--src/config.cpp70
-rw-r--r--src/extensible.cpp3
-rw-r--r--src/init.cpp4
-rw-r--r--src/users.cpp20
17 files changed, 155 insertions, 117 deletions
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf
index a53a7146b..87804e0fa 100644
--- a/data/nickserv.example.conf
+++ b/data/nickserv.example.conf
@@ -102,6 +102,7 @@ module
* - hide_quit: Hide's the nick's last quit message
* - memo_signon: Notify user if they have a new memo when they sign into the nick
* - memo_receive: Notify user if they have a new memo as soon as it's received
+ * - memo_mail: Notify user if they have a new memo by mail
* - autoop: User will be automatically opped in channels they enter and have access to
* - msg: Services messages will be sent as PRIVMSGs instead of NOTICEs, requires
* options:useprivmsg to be enabled as well
diff --git a/include/config.h b/include/config.h
index 3d0133409..585c681fb 100644
--- a/include/config.h
+++ b/include/config.h
@@ -131,6 +131,7 @@ namespace Configuration
~Conf();
void LoadConf(File &file);
+ void Post(Conf *old);
Block *GetModule(Module *);
Block *GetModule(const Anope::string &name);
diff --git a/include/extensible.h b/include/extensible.h
index ef429b919..7f392ab8a 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -175,6 +175,8 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
T t;
if (data[this->name] >> t)
this->Set(e, t);
+ else
+ this->Unset(e);
}
};
@@ -195,6 +197,8 @@ class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
data[this->name] >> b;
if (b)
this->Set(e);
+ else
+ this->Unset(e);
}
};
diff --git a/include/language.h b/include/language.h
index 55726b8d6..0aaa5ac9c 100644
--- a/include/language.h
+++ b/include/language.h
@@ -107,7 +107,7 @@ namespace Language
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_INFO_HEADER _("Information for channel \002%s\002:")
-#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except have been removed.")
+#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s.\n" \
"Type \002%s%s READ %s %d\002 to read it.")
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
diff --git a/language/anope.fr_FR.po b/language/anope.fr_FR.po
index 97d86d913..0bff261a7 100644
--- a/language/anope.fr_FR.po
+++ b/language/anope.fr_FR.po
@@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-03-23 08:55-0400\n"
-"PO-Revision-Date: 2013-12-29 23:48+0100\n"
-"Last-Translator: Harakiri <harakiri@overstack.fr>\n"
+"PO-Revision-Date: 2014-04-09 07:45+0100\n"
+"Last-Translator: Jyzee <jyzee.git@gmail.com>\n"
"Language-Team: French\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Poedit 1.5.7\n"
+"X-Generator: Poedit 1.5.5\n"
#: modules/commands/os_forbid.cpp:312
#, c-format
@@ -26,7 +26,7 @@ msgstr "%d canaux vidés et %d canaux supprimés."
#: modules/commands/os_forbid.cpp:253
#, c-format
msgid "%d nickname(s) dropped."
-msgstr " %d pseudos effacé(s)."
+msgstr "%d pseudo(s) effacé(s)."
#: modules/commands/cs_xop.cpp:220
#, c-format
@@ -363,14 +363,14 @@ msgid "%s is not on the ignore list."
msgstr "%s n'a pas été trouvé dans la liste des ignorés."
#: modules/commands/cs_status.cpp:75
-#, fuzzy, c-format
+#, c-format
msgid "%s is on the auto kick list of %s (%s)."
-msgstr "%s ajouté à la liste de kicks automatiques (%s)."
+msgstr "%s est dans la liste de kicks automatiques de %s (%s)."
#: modules/commands/cs_status.cpp:53
-#, fuzzy, c-format
+#, c-format
msgid "%s is the founder of %s."
-msgstr "%s est le propriétaire du canal."
+msgstr "%s est le propriétaire de %s."
#: modules/commands/cs_status.cpp:64
#, c-format
@@ -387,9 +387,9 @@ msgstr ""
"l'exception n'a pas été supprimée."
#: modules/commands/cs_status.cpp:81
-#, fuzzy, c-format
+#, c-format
msgid "%s matches auto kick entry %s on %s (%s)."
-msgstr "%s correspond à l'entrée d'auto kick %s (%s)"
+msgstr "%s correspond à l'entrée d'auto kick %s sur %s (%s)."
#: modules/commands/cs_xop.cpp:358
#, c-format
@@ -575,9 +575,8 @@ msgid "[auto-memo] The memo you sent to %s has been viewed."
msgstr "[auto-memo] Le mémo que vous avez envoyé a %s a été vu."
#: modules/commands/ns_group.cpp:78
-#, fuzzy
msgid "[target] [password]"
-msgstr "cible motdepasse"
+msgstr "[cible] [motdepasse]"
#: modules/commands/ns_set.cpp:433
msgid "address"
@@ -1585,9 +1584,9 @@ msgid "%c%c%s has been unlocked from %s."
msgstr "%c%c%s n'est plus forcé par %s."
#: modules/commands/cs_clone.cpp:141
-#, fuzzy, c-format
+#, c-format
msgid "%d access entries from %s have been cloned to %s."
-msgstr "Tous les accès de %s ont été clonées pour %s."
+msgstr "%d accès de %s ont été clonés sur %s."
#: modules/commands/bs_botlist.cpp:56
#, c-format
@@ -1813,7 +1812,7 @@ msgstr "%s pour %s retiré"
#: modules/commands/ns_ajoin.cpp:176
#, c-format
msgid "%s had an invalid key specified, and was thus ignored."
-msgstr ""
+msgstr "%s avait une clé de canal invalide spécifiée, et a été ignoré."
#: modules/commands/ms_info.cpp:111
#, c-format
@@ -2197,9 +2196,8 @@ msgid "ADD [nickname] mask"
msgstr "ADD [pseudo] masque"
#: modules/commands/ns_cert.cpp:258
-#, fuzzy
msgid "ADD [nickname] [fingerprint]"
-msgstr "ADD [pseudo] fingerprint"
+msgstr "ADD [pseudo] [fingerprint]"
#: modules/commands/os_akill.cpp:375 modules/commands/os_sxline.cpp:651
msgid "ADD [+expiry] mask reason"
@@ -2867,7 +2865,6 @@ msgstr ""
"par cela de manière permanente."
#: modules/commands/os_config.cpp:127
-#, fuzzy
msgid ""
"Allows you to change and view configuration settings.\n"
"Settings changed by this command are temporary and will not be reflected\n"
@@ -2878,12 +2875,13 @@ msgid ""
" MODIFY nickserv forcemail no"
msgstr ""
"Vous autorise à modifier et voir les paramètres de configuration.\n"
-"Les paramètres modifiés par cette commande, le sont temporairement\n"
+"Les paramètres modifiés par cette commande le sont temporairement\n"
"et ne seront pas répercutés dans le fichier de configuration, ils seront "
"perdus\n"
-"si Anope est arrêté, redémarré ou que la commande RELOAD est utilisée.\n"
+"si Anope est arrêté, redémarré ou que la configuration est rechargée.\n"
"\n"
-"Exemple : MODIFY nickserv forcemail no"
+"Exemple :\n"
+" MODIFY nickserv forcemail no"
#: modules/commands/ns_set.cpp:966
msgid ""
@@ -3402,9 +3400,9 @@ msgstr ""
"utilisez la commande."
#: modules/commands/cs_clone.cpp:55
-#, fuzzy, c-format
+#, c-format
msgid "Cannot clone channel %s to itself!"
-msgstr "Le bot n'est pas sur le canal %s."
+msgstr "Impossible de cloner le canal %s sur lui-même !"
#: modules/commands/ns_register.cpp:301
msgid "Cannot send mail now; please retry a little later."
@@ -3706,10 +3704,9 @@ msgid "Chanstats"
msgstr "Chanstats"
#: modules/extra/stats/m_chanstats.cpp:94
-#, fuzzy, c-format
+#, c-format
msgid "Chanstats statistics are now disabled for %s"
-msgstr ""
-"Les statistiques chanstats sont maintenant desactivées pour votre nick."
+msgstr "Les statistiques chanstats sont maintenant désactivées pour %s."
#: modules/extra/stats/m_chanstats.cpp:43
msgid "Chanstats statistics are now disabled for this channel."
@@ -3721,9 +3718,9 @@ msgstr ""
"Les statistiques chanstats sont maintenant desactivées pour votre nick."
#: modules/extra/stats/m_chanstats.cpp:85
-#, fuzzy, c-format
+#, c-format
msgid "Chanstats statistics are now enabled for %s"
-msgstr "Les statistiques chanstats sont maintenant activées pour votre nick."
+msgstr "Les statistiques chanstats sont maintenant activées pour %s."
#: modules/extra/stats/m_chanstats.cpp:36
msgid "Chanstats statistics are now enabled for this channel."
@@ -4914,9 +4911,9 @@ msgid "Fingerprint %s already present on %s's certificate list."
msgstr "Le fingerprint %s existe déjà dans la liste de certificats de %s."
#: modules/commands/ns_cert.cpp:198
-#, fuzzy, c-format
+#, c-format
msgid "Fingerprint %s is already in use."
-msgstr "%s est déjà dans %s."
+msgstr "L'empreinte %s est déjà utilisée."
#: modules/commands/cs_flags.cpp:301
msgid "Flags"
@@ -5732,7 +5729,7 @@ msgid "MOVE num position"
msgstr "MOVE num position"
#: modules/commands/cs_mode.cpp:719
-#, fuzzy, c-format
+#, c-format
msgid ""
"Mainly controls mode locks and mode access (which is different from channel "
"access)\n"
@@ -5772,9 +5769,9 @@ msgstr ""
"bloqués\n"
"d'un canal. Si un mode est activé ou désactivé, les services n'autoriseront "
"pas la modification de\n"
-"ce mode. La commande SET videra tous les modes existants et définira le "
-"nouveau mode donné\n"
-"tandis que ADD et DEL modifient le mode bloqué existant.\n"
+"ce mode. La commande SET videra tous les modes existants et définira le(s) "
+"nouveau(x) mode(s) donné(s)\n"
+"tandis que ADD et DEL modifient les modes bloqués existants.\n"
"Exemple :\n"
" MODE #canal LOCK ADD +bmnt *!*@*aol*\n"
" \n"
@@ -5787,13 +5784,14 @@ msgstr ""
" Donne le statut voice à tous les utilisateurs du canal.\n"
" \n"
" MODE #canal SET -b ~c:*\n"
-" Vide tous les bans étendus qui commencent par ~c:\n"
+" Supprime tous les bans étendus qui commencent par ~c:\n"
" \n"
"La commande %s CLEAR est une façon simple de vider les modes d'un canal. "
"quoi\n"
"peut être un ban, une exception, les statuts d'opérateurs, halfop, voice, ou "
"un outrepassement\n"
-"d'invite. Si quoi n'est pas donné, alors tous les modes sont vidés."
+"d'invite. Si quoi n'est pas donné, alors tous les modes basiques sont "
+"supprimés."
#: modules/commands/cs_akick.cpp:422
msgid "Maintain the AutoKick list"
@@ -6081,9 +6079,9 @@ msgid "Mode"
msgstr "Mode"
#: modules/commands/cs_mode.cpp:664
-#, fuzzy, c-format
+#, c-format
msgid "Mode %s is not a status or list mode."
-msgstr "%s n'a pas été trouvé dans la liste des ignorés."
+msgstr "Le mode %s n'est pas un mode de statut ou de liste."
#: modules/commands/cs_mode.cpp:987
msgid "Mode lock"
@@ -6207,14 +6205,12 @@ msgid "Module %s unloaded."
msgstr "Module %s déchargé."
#: modules/commands/os_config.cpp:88
-#, fuzzy
msgid "Module Name"
-msgstr "Module %s chargé."
+msgstr "Nom du module"
#: modules/commands/os_config.cpp:112
-#, fuzzy
msgid "Module settings:"
-msgstr "paramètres %s :"
+msgstr "Paramètres du module :"
#: modules/commands/os_modinfo.cpp:32
#, c-format
@@ -7204,9 +7200,8 @@ msgstr ""
"requête est prise en compte."
#: modules/commands/ns_register.cpp:281
-#, fuzzy
msgid "Resend registration confirmation email"
-msgstr "Recharge le fichier de configuration des Services"
+msgstr "Renvoyer l'e-mail de confirmation d'enregistrement"
#: modules/commands/cs_set.cpp:632
msgid "Restrict access to the channel"
@@ -7340,10 +7335,11 @@ msgid "SET server.name option value"
msgstr "SET nom.du.serveur option valeur"
#: modules/commands/ns_cert.cpp:371
-#, fuzzy, c-format
+#, c-format
msgid "SSL certificate fingerprint accepted, you are now identified to %s."
msgstr ""
-"Fingerprint de certificat SSL accepté - vous êtes maintenant identifié."
+"Empreinte de certificat SSL acceptée, vous êtes maintenant identifié(e) en "
+"tant que %s."
#: modules/commands/ns_cert.cpp:382
msgid "SSL certificate fingerprint accepted, you are now identified."
@@ -7680,7 +7676,7 @@ msgstr "Services actifs : %s"
#: modules/commands/ns_set.cpp:258
#, c-format
msgid "Services will from now on set status modes on %s in channels."
-msgstr "Les services ne définiront plus de statuts sur les canaux pour %s."
+msgstr "Les services définiront désormais des statuts pour %s sur les canaux."
#: modules/commands/cs_set.cpp:111
#, c-format
@@ -7692,7 +7688,9 @@ msgstr ""
#: modules/commands/ns_set.cpp:264
#, c-format
msgid "Services will no longer set status modes on %s in channels."
-msgstr "Les services ne donneront plus de statuts utilisateurs sur %s."
+msgstr ""
+"Les services ne définiront plus des statuts utilisateurs pour %s sur les "
+"canaux."
#: modules/commands/cs_set.cpp:105
#, c-format
@@ -7730,7 +7728,7 @@ msgstr "La limitation de sessions est désactivée."
#: modules/commands/os_stats.cpp:188
#, c-format
msgid "Sessions: %lu entries, %lu buckets, longest chain is %d"
-msgstr "Sessions : %lu entrrées, %lu seaux, la plus longue chaine est %d"
+msgstr "Sessions : %lu entrées, %lu seaux, la plus longue chaine est %d"
#: modules/commands/ns_set.cpp:71
msgid "Set SET-options on another nickname"
@@ -8956,7 +8954,7 @@ msgid "The IMMED option is not available on this network."
msgstr "L'option IMMED n'est pas disponible sur ce réseau."
#: modules/commands/cs_access.cpp:807
-#, fuzzy, c-format
+#, c-format
msgid ""
"The LEVELS command allows fine control over the meaning of\n"
"the numeric access levels used for channels. With this\n"
@@ -8985,7 +8983,7 @@ msgstr ""
"SET FOUNDER, ainsi que cette commande,\n"
"sont toujours réservées au propriétaire du canal.)\n"
"\n"
-"LEVELS SET permet au niveaux d'accès pour une fonction ou un\n"
+"LEVELS SET permet au niveau d'accès pour une fonction ou un\n"
"groupe de fonctions d'être changé. LEVELS DISABLE (ou DIS\n"
"en abrégé) désactive une fonction automatique ou empêche l'accès\n"
"à une fonction par quiconque incluant le propriétaire du canal (même si "
@@ -8994,10 +8992,9 @@ msgstr ""
"\n"
"LEVELS LIST montre les niveaux actuels pour chaque fonction\n"
"ou groupe de fonctions. LEVELS RESET réinitialise les niveaux\n"
-"avec les valeurs par défaut d'un canal fraichement créé \n"
-"(consultez HELP ACCESS LEVELS).\n"
+"avec les valeurs par défaut d'un canal fraichement créé.\n"
"\n"
-"Pour une liste de caractéristiques et fonctions pour lesquels\n"
+"Pour une liste de caractéristiques et fonctions pour lesquelles\n"
"des niveaux peuvent être définis, consultez HELP LEVELS DESC."
#: modules/commands/cs_flags.cpp:428
@@ -9152,14 +9149,16 @@ msgstr ""
"pré-definies pour protéger durant une attaque sur le réseau."
#: modules/ns_maxemail.cpp:30
-#, fuzzy, c-format
+#, c-format
msgid "The email address %s has reached its usage limit of %d users."
-msgstr "L'adresse e-mail donnée a atteint la limite de %d utilisateurs."
+msgstr ""
+"L'adresse e-mail %s a atteint sa limite d'utilisation de %d utilisateurs."
#: modules/ns_maxemail.cpp:28
-#, fuzzy, c-format
+#, c-format
msgid "The email address %s has reached its usage limit of 1 user."
-msgstr "L'adresse e-mail donnée a atteint la limite d'un seul utilisateur."
+msgstr ""
+"L'adresse e-mail %s a atteint sa limite d'utilisation d'un utilisateur."
#: modules/commands/cs_entrymsg.cpp:142
#, c-format
@@ -9364,9 +9363,9 @@ msgid "There is no such configuration block %s."
msgstr "Il n'y a pas de bloc de configuration %s."
#: modules/commands/cs_mode.cpp:658
-#, fuzzy, c-format
+#, c-format
msgid "There is no such mode %s."
-msgstr "Il n'y a pas d'OPER news."
+msgstr "Il n'y a pas de mode %s."
#: modules/commands/ms_set.cpp:52
msgid "There's no email address set for your nick."
@@ -9375,7 +9374,7 @@ msgstr "Vous n'avez configuré aucune adresse email pour votre pseudo."
#: modules/commands/os_forbid.cpp:292 modules/commands/os_forbid.cpp:484
#, c-format
msgid "This channel has been forbidden: %s"
-msgstr "Ce canal a été interdit, : %s"
+msgstr "Ce canal a été interdit : %s"
#: modules/commands/cs_suspend.cpp:121
msgid "This channel has been suspended."
@@ -9633,6 +9632,7 @@ msgstr ""
"de modifier les accès du canal."
#: modules/commands/ns_group.cpp:273
+#, c-format
msgid ""
"This command ungroups your nick, or if given, the specificed nick,\n"
"from the group it is in. The ungrouped nick keeps its registration\n"
@@ -9641,10 +9641,10 @@ msgid ""
"your group."
msgstr ""
"Cette commande dé-groupe votre pseudo, ou si fourni, le pseudo spécifié,\n"
-"du groupe dans lequel il est. Le pseudo non groupé garde son temps\n"
+"du groupe dans lequel il est. Le pseudo dé-groupé garde sa date\n"
"d'enregistrement, son mot de passe, e-mail, message d'accueil, sa langue\n"
"Tout le reste est réinitialisé. Vous ne pouvez pas vous dé-grouper\n"
-"vous-même s'il n'y a qu'un nick dans votre groupe."
+"vous-même s'il n'y a qu'un pseudo dans votre groupe."
#: modules/commands/os_module.cpp:168
msgid "This command unloads the module named modname."
@@ -9653,6 +9653,7 @@ msgstr "Cette commande dé-charge le module nommé nom-module."
#: modules/commands/ns_register.cpp:322
msgid "This command will resend you the registration confirmation email."
msgstr ""
+"Cette commande vous renverra l'e-mail de confirmation d'enregistrement."
#: include/language.h:91
#, c-format
@@ -10350,9 +10351,8 @@ msgid "You are not permitted to change your memo limit."
msgstr "Vous n'êtes pas autorisé à changer votre limite de mémos."
#: modules/commands/ns_cert.cpp:183
-#, fuzzy
msgid "You are not using a client certificate."
-msgstr "Vous n'êtes pas identifié."
+msgstr "Vous n'utilisez pas de certificat client."
#: modules/commands/os_set.cpp:85
msgid "You are now a super admin."
@@ -10531,9 +10531,9 @@ msgstr ""
"Tapez %s%s READ %d pour le lire."
#: modules/commands/cs_invite.cpp:76
-#, fuzzy, c-format
+#, c-format
msgid "You have been invited to %s by %s."
-msgstr "Vous avez été invité à rejoindre %s."
+msgstr "Vous avez été invité à rejoindre %s par %s."
#: modules/commands/cs_invite.cpp:81
#, c-format
@@ -10597,10 +10597,8 @@ msgstr ""
"Vous ne pouvez pas changer l'adresse e-mail d'autres Services Operators."
#: modules/commands/ns_set.cpp:454
-#, fuzzy
msgid "You may not change the email of an unconfirmed account."
-msgstr ""
-"Vous ne pouvez pas changer l'adresse e-mail d'autres Services Operators."
+msgstr "Vous ne pouvez pas changer l'adresse e-mail d'un compte non confirmé."
#: modules/commands/ns_set.cpp:191
msgid "You may not change the password of other Services Operators."
@@ -10752,9 +10750,9 @@ msgid "Your account is already confirmed."
msgstr "Votre compte est déjà confirmé."
#: modules/commands/ns_register.cpp:365
-#, fuzzy, c-format
+#, c-format
msgid "Your account will expire, if not confirmed, in %s."
-msgstr "En cas de non confirmation, votre compte expirera dans %s"
+msgstr "En cas de non confirmation, votre compte expirera dans %s."
#: modules/commands/ns_set.cpp:1247
#, c-format
@@ -10766,7 +10764,6 @@ msgid "Your email address is not allowed, choose a different one."
msgstr "Votre adress e-mail n'est pas autorisée, merci d'en choisir une autre."
#: modules/commands/ns_register.cpp:360
-#, fuzzy
msgid ""
"Your email address is not confirmed. To confirm it, follow the instructions "
"that were emailed to you."
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 984f1d002..e0d0299a3 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -122,7 +122,7 @@ class CommandNSSetPassword : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- const Anope::string &param = params[1];
+ const Anope::string &param = params[0];
unsigned len = param.length();
if (Anope::ReadOnly)
diff --git a/modules/commands/os_mode.cpp b/modules/commands/os_mode.cpp
index 4d94759df..9a5d8c41f 100644
--- a/modules/commands/os_mode.cpp
+++ b/modules/commands/os_mode.cpp
@@ -89,7 +89,9 @@ class CommandOSMode : public Command
Anope::string param, param_log;
if (cm->type != MODE_REGULAR)
{
- if (!sep.GetToken(param))
+ if (cm->type == MODE_PARAM && !add && anope_dynamic_static_cast<ChannelModeParam *>(cm)->minus_no_arg)
+ ;
+ else if (!sep.GetToken(param))
continue;
param_log = param;
diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp
index 647f187b4..b5705d611 100644
--- a/modules/commands/os_reload.cpp
+++ b/modules/commands/os_reload.cpp
@@ -26,8 +26,11 @@ class CommandOSReload : public Command
Log(LOG_ADMIN, source, this);
Configuration::Conf *new_config = new Configuration::Conf();
- delete Config;
+ Configuration::Conf *old = Config;
Config = new_config;
+ Config->Post(old);
+ delete old;
+
source.Reply(_("Services' configuration has been reloaded."));
}
catch (const ConfigException &ex)
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 3b829d336..a67f4dc0d 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -523,7 +523,7 @@ class ProtoBahamut : public Module
ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i'));
ModeManager::AddChannelMode(new ChannelModeFlood('f', false));
ModeManager::AddChannelMode(new ChannelModeKey('k'));
- ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true));
ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm'));
ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n'));
ModeManager::AddChannelMode(new ChannelMode("PRIVATE", 'p'));
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index 9dd906387..116f56a84 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -633,7 +633,7 @@ class ProtoHybrid : public Module
ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 2));
/* l/k */
- ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true));
ModeManager::AddChannelMode(new ChannelModeKey('k'));
/* Add channel modes */
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index a18f8f770..5832da62f 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -651,7 +651,7 @@ class ProtongIRCd : public Module
/* Add channel modes */
ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i'));
ModeManager::AddChannelMode(new ChannelModeKey('k'));
- ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true));
ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm'));
ModeManager::AddChannelMode(new ChannelMode("REGMODERATED", 'M'));
ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n'));
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index 0e22ba6c0..6e2930757 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -334,8 +334,9 @@ class ProtoPlexus : public Module
ModeManager::AddUserMode(new UserMode("INVIS", 'i'));
ModeManager::AddUserMode(new UserModeOperOnly("LOCOPS", 'l'));
ModeManager::AddUserMode(new UserMode("OPER", 'o'));
- ModeManager::AddUserMode(new UserMode("PRIV", 'p'));
ModeManager::AddUserMode(new UserModeOperOnly("NETADMIN", 'N'));
+ ModeManager::AddUserMode(new UserMode("PRIV", 'p'));
+ ModeManager::AddUserMode(new UserMode("ROUTING", 'q'));
ModeManager::AddUserMode(new UserModeNoone("REGISTERED", 'r'));
ModeManager::AddUserMode(new UserMode("REGPRIV", 'R'));
ModeManager::AddUserMode(new UserModeOperOnly("SNOMASK", 's'));
@@ -359,7 +360,7 @@ class ProtoPlexus : public Module
ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '~', 4));
/* l/k */
- ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true));
ModeManager::AddChannelMode(new ChannelModeKey('k'));
/* Add channel modes */
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index ec946c391..8a88e74a3 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -274,7 +274,7 @@ class ProtoRatbox : public Module
ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 1));
/* l/k */
- ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l', true));
ModeManager::AddChannelMode(new ChannelModeKey('k'));
/* channel modes */
diff --git a/src/config.cpp b/src/config.cpp
index 7e918e079..2fb38107b 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -538,48 +538,58 @@ Conf::Conf() : Block("")
/* always enable icase and optimize */
if (regex_flags)
regex_flags |= std::regex::icase | std::regex::optimize;
+}
- /* apply changes from an older config? */
- if (Config)
+Conf::~Conf()
+{
+ for (unsigned i = 0; i < MyOperTypes.size(); ++i)
+ delete MyOperTypes[i];
+ for (unsigned i = 0; i < Opers.size(); ++i)
+ delete Opers[i];
+}
+
+void Conf::Post(Conf *old)
+{
+ /* Apply module changes */
+ for (unsigned i = 0; i < old->ModulesAutoLoad.size(); ++i)
+ if (std::find(this->ModulesAutoLoad.begin(), this->ModulesAutoLoad.end(), old->ModulesAutoLoad[i]) == this->ModulesAutoLoad.end())
+ ModuleManager::UnloadModule(ModuleManager::FindModule(old->ModulesAutoLoad[i]), NULL);
+ for (unsigned i = 0; i < this->ModulesAutoLoad.size(); ++i)
+ if (std::find(old->ModulesAutoLoad.begin(), old->ModulesAutoLoad.end(), this->ModulesAutoLoad[i]) == old->ModulesAutoLoad.end())
+ ModuleManager::LoadModule(this->ModulesAutoLoad[i], NULL);
+
+ /* Apply opertype changes, as non-conf opers still point to the old oper types */
+ for (unsigned i = Oper::opers.size(); i > 0; --i)
{
- /* Apply module chnages */
- for (unsigned i = 0; i < Config->ModulesAutoLoad.size(); ++i)
- if (std::find(this->ModulesAutoLoad.begin(), this->ModulesAutoLoad.end(), Config->ModulesAutoLoad[i]) == this->ModulesAutoLoad.end())
- ModuleManager::UnloadModule(ModuleManager::FindModule(Config->ModulesAutoLoad[i]), NULL);
- for (unsigned i = 0; i < this->ModulesAutoLoad.size(); ++i)
- if (std::find(Config->ModulesAutoLoad.begin(), Config->ModulesAutoLoad.end(), this->ModulesAutoLoad[i]) == Config->ModulesAutoLoad.end())
- ModuleManager::LoadModule(this->ModulesAutoLoad[i], NULL);
-
- /* Apply opertype changes, as non-conf opers still point to the old oper types */
- for (unsigned i = Oper::opers.size(); i > 0; --i)
+ Oper *o = Oper::opers[i - 1];
+
+ /* Oper's type is in the old config, so update it */
+ if (std::find(old->MyOperTypes.begin(), old->MyOperTypes.end(), o->ot) != old->MyOperTypes.end())
{
- Oper *o = Oper::opers[i - 1];
+ OperType *ot = o->ot;
+ o->ot = NULL;
+
+ for (unsigned j = 0; j < MyOperTypes.size(); ++j)
+ if (ot->GetName() == MyOperTypes[j]->GetName())
+ o->ot = MyOperTypes[j];
- /* Oper's type is in the old config, so update it */
- if (std::find(Config->MyOperTypes.begin(), Config->MyOperTypes.end(), o->ot) != Config->MyOperTypes.end())
+ if (o->ot == NULL)
{
- OperType *ot = o->ot;
- o->ot = NULL;
+ /* Oper block has lost type */
+ std::vector<Oper *>::iterator it = std::find(old->Opers.begin(), old->Opers.end(), o);
+ if (it != old->Opers.end())
+ old->Opers.erase(it);
- for (unsigned j = 0; j < MyOperTypes.size(); ++j)
- if (ot->GetName() == MyOperTypes[j]->GetName())
- o->ot = MyOperTypes[j];
+ it = std::find(this->Opers.begin(), this->Opers.end(), o);
+ if (it != this->Opers.end())
+ this->Opers.erase(it);
- if (o->ot == NULL)
- delete o; /* Oper block has lost type */
+ delete o;
}
}
}
}
-Conf::~Conf()
-{
- for (unsigned i = 0; i < MyOperTypes.size(); ++i)
- delete MyOperTypes[i];
- for (unsigned i = 0; i < Opers.size(); ++i)
- delete Opers[i];
-}
-
Block *Conf::GetModule(Module *m)
{
if (!m)
diff --git a/src/extensible.cpp b/src/extensible.cpp
index 552ad5d2b..37206f7c1 100644
--- a/src/extensible.cpp
+++ b/src/extensible.cpp
@@ -49,9 +49,6 @@ void Extensible::ExtensibleSerialize(const Extensible *e, const Serializable *s,
void Extensible::ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data)
{
- while (!e->extension_items.empty())
- (*e->extension_items.begin())->Unset(e);
-
for (std::set<ExtensibleBase *>::iterator it = extensible_items.begin(); it != extensible_items.end(); ++it)
{
ExtensibleBase *eb = *it;
diff --git a/src/init.cpp b/src/init.cpp
index d31f79767..9b6b42c86 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -127,8 +127,10 @@ void Anope::HandleSignal()
try
{
Configuration::Conf *new_config = new Configuration::Conf();
- delete Config;
+ Configuration::Conf *old = Config;
Config = new_config;
+ Config->Post(old);
+ delete old;
}
catch (const ConfigException &ex)
{
diff --git a/src/users.cpp b/src/users.cpp
index 3b874c0f2..81fd13a33 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -537,8 +537,28 @@ void User::SetModeInternal(const MessageSource &source, UserMode *um, const Anop
this->modes[um->name] = param;
if (um->name == "OPER")
+ {
++OperCount;
+ if (this->IsServicesOper())
+ {
+ if (!this->nc->o->ot->modes.empty())
+ {
+ this->SetModes(NULL, "%s", this->nc->o->ot->modes.c_str());
+ this->SendMessage(Me, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str());
+ UserMode *oper = ModeManager::FindUserModeByName("OPER");
+ if (oper && !this->HasMode("OPER") && this->nc->o->ot->modes.find(oper->mchar) != Anope::string::npos)
+ IRCD->SendOper(this);
+ }
+ if (IRCD->CanSetVHost && !this->nc->o->vhost.empty())
+ {
+ this->SendMessage(Me, "Changing your vhost to \002%s\002", this->nc->o->vhost.c_str());
+ this->SetDisplayedHost(this->nc->o->vhost);
+ IRCD->SendVhost(this, "", this->nc->o->vhost);
+ }
+ }
+ }
+
if (um->name == "CLOAK" || um->name == "VHOST")
this->UpdateHost();