diff options
-rw-r--r-- | docs/Changes | 1 | ||||
-rw-r--r-- | docs/Changes.lang | 5 | ||||
-rw-r--r-- | lang/cat.l | 19 | ||||
-rw-r--r-- | lang/de.l | 19 | ||||
-rw-r--r-- | lang/en_us.l | 19 | ||||
-rw-r--r-- | lang/es.l | 19 | ||||
-rw-r--r-- | lang/fr.l | 19 | ||||
-rw-r--r-- | lang/gr.l | 21 | ||||
-rw-r--r-- | lang/hun.l | 19 | ||||
-rw-r--r-- | lang/it.l | 19 | ||||
-rw-r--r-- | lang/nl.l | 19 | ||||
-rw-r--r-- | lang/pl.l | 22 | ||||
-rw-r--r-- | lang/pt.l | 19 | ||||
-rw-r--r-- | lang/ru.l | 19 | ||||
-rw-r--r-- | lang/tr.l | 19 | ||||
-rw-r--r-- | src/core/ns_group.c | 68 |
16 files changed, 322 insertions, 4 deletions
diff --git a/docs/Changes b/docs/Changes index 74018210a..d88eae010 100644 --- a/docs/Changes +++ b/docs/Changes @@ -5,6 +5,7 @@ A Added SSL support 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 Anope Version 1.9.2 -------------------- diff --git a/docs/Changes.lang b/docs/Changes.lang index 51c418cdf..5d576780f 100644 --- a/docs/Changes.lang +++ b/docs/Changes.lang @@ -3,6 +3,11 @@ Anope Version 1.9.3 *** New Strings: NICK_GLIST_REPLY_NOEXPIRE NICK_SERVADMIN_HELP_INFO + NICK_UNGROUP_ONE_NICK + NICK_UNGROUP_NOT_IN_GROUP + NICK_UNGROUP_SUCCESSFUL + NICK_UNGROUP_SUCCESSFUL + NICK_HELP_CMD_UNGROUP *** Mod Strings: NICK_GLIST_REPLY diff --git a/lang/cat.l b/lang/cat.l index f44bb1e9b..48cb0bbbc 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -373,6 +373,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Ara ets membre en el grup de %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY clau @@ -3410,6 +3418,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registra un nickname NICK_HELP_CMD_GROUP GROUP Ingresa en un grup +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Per identificar-te amb la teva clau NICK_HELP_CMD_ACCESS @@ -3541,6 +3551,15 @@ NICK_HELP_GROUP Tingues en compte: tots els nicks en un grup comparteixen la mateixa clau. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Sintaxis: IDENTIFY clau @@ -391,6 +391,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Du bist jetzt in der Gruppe %s vertreten. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY Passwort @@ -3365,6 +3373,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registriert einen Nicknamen NICK_HELP_CMD_GROUP GROUP Verwaltung von Nickname-Gruppierungen +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Identifizierung des Nicknames NICK_HELP_CMD_ACCESS @@ -3512,6 +3522,15 @@ NICK_HELP_GROUP Achtung: Alle Mitglieder einer Gruppe haben dasselbe Passwort. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Syntax: IDENTIFY Passwort diff --git a/lang/en_us.l b/lang/en_us.l index 581f53e7d..11cfffc84 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -363,6 +363,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED You are now in the group of %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY password @@ -3271,6 +3279,8 @@ NICK_HELP_CMD_REGISTER REGISTER Register a nickname NICK_HELP_CMD_GROUP GROUP Join a group +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Identify yourself with your password NICK_HELP_CMD_ACCESS @@ -3405,6 +3415,15 @@ NICK_HELP_GROUP Note: all the nicknames of a group have the same password. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Syntax: IDENTIFY password @@ -375,6 +375,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Ahora eres miembro en el grupo de %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY clave @@ -3382,6 +3390,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registra un nickname NICK_HELP_CMD_GROUP GROUP Ingresa a un grupo +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Para identificarte con tu clave NICK_HELP_CMD_ACCESS @@ -3513,6 +3523,15 @@ NICK_HELP_GROUP Ten en cuenta: todos los nicks en un grupo comparten la misma clave. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Sintaxis: IDENTIFY clave @@ -377,6 +377,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Vous êtes maintenant dans le groupe de %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY motdepasse @@ -3431,6 +3439,8 @@ NICK_HELP_CMD_REGISTER REGISTER Enregistre un pseudo NICK_HELP_CMD_GROUP GROUP Joint un groupe +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Vous identifie avec votre mot de passe NICK_HELP_CMD_ACCESS @@ -3575,6 +3585,15 @@ NICK_HELP_IDENTIFY mot de passe est celui que vous avez donné avec la commande REGISTER. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_UPDATE Syntax: UPDATE @@ -371,6 +371,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Åßóáé ôþñá ìÝóá óôçí ïìÜäá ôïõ %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY ^_êùäéêü^_ @@ -3402,6 +3410,8 @@ NICK_HELP_CMD_REGISTER REGISTER Êáôï÷õñþíåé Ýíá øåõäþíõìï NICK_HELP_CMD_GROUP GROUP ÌðÝíåôå óå ïìÜäá øåõäþíõìïõ +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Óáò áíáãíùñßæåé ìå ôç ÷ñÞóç êùäéêïý NICK_HELP_CMD_ACCESS @@ -3538,7 +3548,16 @@ NICK_HELP_GROUP Óçìåßùóç: üëá ôá øåõäþíõìá ðïõ áíÞêïõí óôçí ßäéá ïìÜäá Ý÷ïõí ôïí ßäéï êùäéêü. - + +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Óýíôáîç: IDENTIFY êùäéêü diff --git a/lang/hun.l b/lang/hun.l index 88db8b0f0..815e5b57b 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -377,6 +377,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Mostantól tagja vagy a %scsoportnak. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY válaszok NICK_IDENTIFY_SYNTAX IDENTIFY jelszó @@ -3336,6 +3344,8 @@ NICK_HELP_CMD_REGISTER REGISTER Nicknév regisztráció NICK_HELP_CMD_GROUP GROUP Csatlakozás egy csoporthoz +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Jelszavas azonosítás NICK_HELP_CMD_ACCESS @@ -3474,6 +3484,15 @@ NICK_HELP_IDENTIFY nicknek. Jelszónak ugyanannak kell lennie amit a regisztrációnál megadtál, vagy amire módosítottad. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_UPDATE Syntax: UPDATE @@ -365,6 +365,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Adesso sei nel gruppo di %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY password @@ -3287,6 +3295,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registra un nick NICK_HELP_CMD_GROUP GROUP Entra in un gruppo +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Ti identifica per il tuo nick NICK_HELP_CMD_ACCESS @@ -3420,6 +3430,15 @@ NICK_HELP_GROUP Nota: tutti i nick di un gruppo hanno la stessa password. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Sintassi: IDENTIFY password @@ -374,6 +374,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Je zit nu in de group van %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY wachtwoord @@ -3363,6 +3371,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registreer een nickname NICK_HELP_CMD_GROUP GROUP Bij een groep aanmelden +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Jezelf identificeren met je wachtwoord NICK_HELP_CMD_ACCESS @@ -3495,6 +3505,15 @@ NICK_HELP_GROUP Opmerking: alle nicks in een groep hebben hetzelfde wachtwoord. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Gebruik: IDENTIFY wachtwoord @@ -454,6 +454,16 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Nale¿ysz teraz do grupy %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. + +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. + +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY has³o @@ -4330,6 +4340,9 @@ NICK_HELP_CMD_REGISTER NICK_HELP_CMD_GROUP GROUP Do³±cza nick do wskazanej grupy +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group + NICK_HELP_CMD_IDENTIFY IDENTIFY Identyfikuje w³a¶ciciela nicka @@ -4486,6 +4499,15 @@ NICK_HELP_GROUP Uwaga: wszystkie nicki w grupie maj± to samo has³o. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Sk³adnia: IDENTIFY has³o @@ -379,6 +379,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Você é agora um membro do grupo %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY senha @@ -3310,6 +3318,8 @@ NICK_HELP_CMD_REGISTER REGISTER Registra um nick NICK_HELP_CMD_GROUP GROUP Se junta a um grupo +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Identifica seu nick com sua senha NICK_HELP_CMD_ACCESS @@ -3440,6 +3450,15 @@ NICK_HELP_GROUP Atenção: todos os nicks do grupo terão a mesma senha. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Sintaxe: IDENTIFY senha @@ -369,6 +369,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED Âû óñïåøíî âíåñåíû â ãðóïïó %s. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY ïàðîëü @@ -3305,6 +3313,8 @@ NICK_HELP_CMD_REGISTER REGISTER Ðåãèñòðàöèÿ íèêà NICK_HELP_CMD_GROUP GROUP Îáúåäèíåíèå íèêîâ â ãðóïïû +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Èäåíòèôèêàöèÿ ê íèêó â êà÷åñòâå âëàäåëüöà NICK_HELP_CMD_ACCESS @@ -3435,6 +3445,15 @@ NICK_HELP_GROUP íèêàê íåìîæåò. Ïðèìå÷àíèå 2: ó âñåõ íèêîâ â ãðóïïå - åäèíûé ïàðîëü. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Ñèíòàêñèñ: IDENTIFY ïàðîëü @@ -375,6 +375,14 @@ NICK_GROUP_TOO_MANY NICK_GROUP_JOINED %s grubuna dahil edildiniz. +# UNGROUP responses +NICK_UNGROUP_ONE_NICK + Your nick is not grouped to anything, you can't ungroup it. +NICK_UNGROUP_NOT_IN_GROUP + The nick %s is not in your group. +NICK_UNGROUP_SUCCESSFUL + Nick %s has been ungrouped from %s. + # IDENTIFY responses NICK_IDENTIFY_SYNTAX IDENTIFY þifreniz @@ -3404,6 +3412,8 @@ NICK_HELP_CMD_REGISTER REGISTER Nickinizi kaydeder NICK_HELP_CMD_GROUP GROUP Bir gruba dahil eder +NICK_HELP_CMD_UNGROUP + UNGROUP Remove a nick from a group NICK_HELP_CMD_IDENTIFY IDENTIFY Þifrenizle nickinizi tanýtýr NICK_HELP_CMD_ACCESS @@ -3536,6 +3546,15 @@ NICK_HELP_GROUP Not: bir gruptaki tüm nickler bir þifreye sahip olurlar. +NICK_HELP_UNGROUP + Syntax: UNGROUP [nick] + + This command ungroups your nick, or if given, the specificed nick, + from the group it is in. The ungrouped nick keeps its registration + time, password, email, greet, language, url, and icq. Everything + else is reset. You may not ungroup yourself if there is only one + nick in your group. + NICK_HELP_IDENTIFY Kullanýmý: IDENTIFY þifreniz diff --git a/src/core/ns_group.c b/src/core/ns_group.c index dab27af27..e74b69e2e 100644 --- a/src/core/ns_group.c +++ b/src/core/ns_group.c @@ -51,9 +51,7 @@ class CommandNSGroup : public Command { for (it = Config.Opers.begin(); it != Config.Opers.end(); ++it) { - std::string nick = it->first; - - if (stristr(u->nick.c_str(), nick.c_str()) && !is_oper(u)) + if (!is_oper(u) && u->nick.find(it->first) != std::string::npos) { notice_lang(Config.s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick.c_str()); return MOD_CONT; @@ -153,6 +151,67 @@ class CommandNSGroup : public Command } }; +class CommandNSUngroup : public Command +{ + public: + CommandNSUngroup() : Command("UNGROUP", 0, 1) + { + } + + CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms) + { + const char *nick = params.size() ? params[0].c_str() : NULL; + NickAlias *na = nick ? findnick(nick) : findnick(u->nick); + + if (u->Account()->aliases.count == 1) + notice_lang(Config.s_NickServ, u, NICK_UNGROUP_ONE_NICK); + else if (!na) + notice_lang(Config.s_NickServ, u, NICK_X_NOT_REGISTERED, nick ? nick : u->nick.c_str()); + else if (na->nc != u->Account()) + notice_lang(Config.s_NickServ, u, NICK_UNGROUP_NOT_IN_GROUP, na->nick); + else + { + NickCore *oldcore = na->nc; + + slist_remove(&oldcore->aliases, na); + if (!stricmp(oldcore->display, na->nick)) + { + change_core_display(oldcore); + } + + na->nc = new NickCore(na->nick); + slist_add(&na->nc->aliases, na); + + na->nc->pass = oldcore->pass; + if (oldcore->email) + na->nc->email = sstrdup(oldcore->email); + if (oldcore->greet) + na->nc->greet = sstrdup(oldcore->greet); + na->nc->icq = oldcore->icq; + if (oldcore->url) + na->nc->url = sstrdup(oldcore->url); + na->nc->language = oldcore->language; + + notice_lang(Config.s_NickServ, u, NICK_UNGROUP_SUCCESSFUL, na->nick, oldcore->display); + + User *user = finduser(na->nick); + if (user) + { + /* The user on the nick who was ungrouped may be identified to the old group, set -r */ + user->RemoveMode(findbot(Config.s_NickServ), UMODE_REGISTERED); + } + } + + return MOD_CONT; + } + + bool OnHelp(User *u, const ci::string &subcommand) + { + notice_help(Config.s_NickServ, u, NICK_HELP_UNGROUP); + return true; + } +}; + class CommandNSGList : public Command { public: @@ -218,13 +277,16 @@ class NSGroup : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSGroup()); + this->AddCommand(NICKSERV, new CommandNSUngroup()); this->AddCommand(NICKSERV, new CommandNSGList()); ModuleManager::Attach(I_OnNickServHelp, this); } + void OnNickServHelp(User *u) { notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GROUP); + notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_UNGROUP); notice_lang(Config.s_NickServ, u, NICK_HELP_CMD_GLIST); } }; |