diff options
author | Adam <Adam@anope.org> | 2011-07-26 05:44:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-07-26 05:44:14 -0400 |
commit | e8c00b9e8b1b88a6307d8d093258e3e8d37ce1c0 (patch) | |
tree | ee98147c5bfb39518da67650e1886fc1a12f432f | |
parent | 023d4b44eccf4e1f51f07a596f02d32c892e63df (diff) |
A few small fixes
-rw-r--r-- | data/commands.example.conf | 1 | ||||
-rw-r--r-- | include/language.h | 6 | ||||
-rw-r--r-- | include/modes.h | 2 | ||||
-rw-r--r-- | modules/core/cs_set_bantype.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_description.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_founder.cpp | 4 | ||||
-rw-r--r-- | modules/core/cs_set_keeptopic.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_opnotice.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_peace.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_persist.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_private.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_restricted.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_secure.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_securefounder.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_successor.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_topiclock.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_set_xop.cpp | 2 | ||||
-rw-r--r-- | modules/core/ns_group.cpp | 2 | ||||
-rw-r--r-- | modules/core/ns_info.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 14 |
20 files changed, 35 insertions, 22 deletions
diff --git a/data/commands.example.conf b/data/commands.example.conf index 5c0c04cfc..20a65ec66 100644 --- a/data/commands.example.conf +++ b/data/commands.example.conf @@ -212,6 +212,7 @@ command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; } command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; } command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; } module { name = "ns_identify" } +command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; } command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; } module { name = "ns_info" } command { service = "NickServ"; name = "INFO"; command = "nickserv/info"; } diff --git a/include/language.h b/include/language.h index f2b9bec7b..6c31daa4c 100644 --- a/include/language.h +++ b/include/language.h @@ -13,9 +13,9 @@ #define READ_ONLY_MODE _("Services are in read-only mode!") #define PASSWORD_INCORRECT _("Password incorrect.") #define ACCESS_DENIED _("Access denied.") -#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should be at least\n \ - five characters long, should not be something easily guessed\n \ - (e.g. your real name or your nick), and cannot contain the space or tab characters.") +#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should be at least\n" \ + "five characters long, should not be something easily guessed\n" \ + "(e.g. your real name or your nick), and cannot contain the space or tab characters.") #define PASSWORD_TOO_LONG _("Your password is too long. Please try again with a shorter password.") #define NICK_NOT_REGISTERED _("Your nick isn't registered.") #define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.") diff --git a/include/modes.h b/include/modes.h index 95452bb30..579a4fecc 100644 --- a/include/modes.h +++ b/include/modes.h @@ -193,7 +193,7 @@ class CoreExport ChannelMode : public Mode * NOTE: User CAN be NULL, this is for checking if it can be locked with defcon * @param u The user, or NULL */ - bool CanSet(User *u) const; + virtual bool CanSet(User *u) const; /** Returns the mode name as a string */ diff --git a/modules/core/cs_set_bantype.cpp b/modules/core/cs_set_bantype.cpp index 3dcecfd69..e126ae275 100644 --- a/modules/core/cs_set_bantype.cpp +++ b/modules/core/cs_set_bantype.cpp @@ -19,7 +19,7 @@ class CommandCSSetBanType : public Command CommandCSSetBanType(Module *creator, const Anope::string &cname = "chanserv/set/bantype", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Set how Services make bans on the channel")); - this->SetSyntax(_("\037channel\037 BANTYPE \037bantype\037")); + this->SetSyntax(_("\037channel\037 \037bantype\037")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_description.cpp b/modules/core/cs_set_description.cpp index 726ea5655..b6e65ca5a 100644 --- a/modules/core/cs_set_description.cpp +++ b/modules/core/cs_set_description.cpp @@ -19,7 +19,7 @@ class CommandCSSetDescription : public Command CommandCSSetDescription(Module *creator, const Anope::string &cname = "chanserv/set/description", const Anope::string &cpermission = "") : Command(creator, cname, 1, 2, cpermission) { this->SetDesc(_("Set the channel description")); - this->SetSyntax(_("\037channel\037 DESC [\037description\037]")); + this->SetSyntax(_("\037channel\037 [\037description\037]")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp index 97eec8500..aeb29cada 100644 --- a/modules/core/cs_set_founder.cpp +++ b/modules/core/cs_set_founder.cpp @@ -16,10 +16,10 @@ class CommandCSSetFounder : public Command { public: - CommandCSSetFounder(Module *creator, const Anope::string &cname = "chanserv/set/founder", const Anope::string &cpermission = "") : Command(creator, "chanserv/founder", 2, 2, cpermission) + CommandCSSetFounder(Module *creator, const Anope::string &cname = "chanserv/set/founder", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Set the founder of a channel")); - this->SetSyntax(_("\037channel\037 FOUNDER \037nick\037")); + this->SetSyntax(_("\037channel\037 \037nick\037")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_keeptopic.cpp b/modules/core/cs_set_keeptopic.cpp index 497509753..4ff3b6f92 100644 --- a/modules/core/cs_set_keeptopic.cpp +++ b/modules/core/cs_set_keeptopic.cpp @@ -19,7 +19,7 @@ class CommandCSSetKeepTopic : public Command CommandCSSetKeepTopic(Module *creator, const Anope::string &cname = "chanserv/set/keeptopic", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Retain topic when channel is not in use")); - this->SetSyntax(_("\037channel\037 KEEPTOPIC {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_opnotice.cpp b/modules/core/cs_set_opnotice.cpp index 558bab5c3..e73bd21ce 100644 --- a/modules/core/cs_set_opnotice.cpp +++ b/modules/core/cs_set_opnotice.cpp @@ -19,7 +19,7 @@ class CommandCSSetOpNotice : public Command CommandCSSetOpNotice(Module *creator, const Anope::string &cname = "chanserv/set/notice", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Send a notice when OP/DEOP commands are used")); - this->SetSyntax(_("\037channel\037 OPNOTICE {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_peace.cpp b/modules/core/cs_set_peace.cpp index e51f9e81b..76e95e55d 100644 --- a/modules/core/cs_set_peace.cpp +++ b/modules/core/cs_set_peace.cpp @@ -19,7 +19,7 @@ class CommandCSSetPeace : public Command CommandCSSetPeace(Module *creator, const Anope::string &cname = "chanserv/set/peace", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Regulate the use of critical commands")); - this->SetSyntax(_("\037channel\037 PEACE {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_persist.cpp b/modules/core/cs_set_persist.cpp index 86d5ef2ca..5625c6c76 100644 --- a/modules/core/cs_set_persist.cpp +++ b/modules/core/cs_set_persist.cpp @@ -19,7 +19,7 @@ class CommandCSSetPersist : public Command CommandCSSetPersist(Module *creator, const Anope::string &cname = "chanserv/set/persist", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Set the channel as permanent")); - this->SetSyntax(_("\037channel\037 PERSIST {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_private.cpp b/modules/core/cs_set_private.cpp index 0aaa04d91..358a98718 100644 --- a/modules/core/cs_set_private.cpp +++ b/modules/core/cs_set_private.cpp @@ -19,7 +19,7 @@ class CommandCSSetPrivate : public Command CommandCSSetPrivate(Module *creator, const Anope::string &cname = "chanserv/set/private", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Hide channel from LIST command")); - this->SetSyntax(_("\037channel\037 PRIVATE {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_restricted.cpp b/modules/core/cs_set_restricted.cpp index 6bbdb5299..4178af110 100644 --- a/modules/core/cs_set_restricted.cpp +++ b/modules/core/cs_set_restricted.cpp @@ -18,7 +18,7 @@ class CommandCSSetRestricted : public Command CommandCSSetRestricted(Module *creator, const Anope::string &cname = "chanserv/set/restricted", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Restrict access to the channel")); - this->SetSyntax(_("\037channel\037 RESTRICTED {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_secure.cpp b/modules/core/cs_set_secure.cpp index 73013be32..99085611e 100644 --- a/modules/core/cs_set_secure.cpp +++ b/modules/core/cs_set_secure.cpp @@ -19,7 +19,7 @@ class CommandCSSetSecure : public Command CommandCSSetSecure(Module *creator, const Anope::string &cname = "chanserv/set/secure", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Activate security features")); - this->SetSyntax(_("\037channel\037 SECURE {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_securefounder.cpp b/modules/core/cs_set_securefounder.cpp index f620a128b..aceb120a3 100644 --- a/modules/core/cs_set_securefounder.cpp +++ b/modules/core/cs_set_securefounder.cpp @@ -19,7 +19,7 @@ class CommandCSSetSecureFounder : public Command CommandCSSetSecureFounder(Module *creator, const Anope::string &cname = "chanserv/set/securefounder", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Stricter control of channel founder status")); - this->SetDesc(_("\037channel\037 SECUREFOUNDER {ON | OFF}")); + this->SetDesc(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp index be10a4b63..9807b44d3 100644 --- a/modules/core/cs_set_successor.cpp +++ b/modules/core/cs_set_successor.cpp @@ -19,7 +19,7 @@ class CommandCSSetSuccessor : public Command CommandCSSetSuccessor(Module *creator, const Anope::string &cname = "chanserv/set/successor", const Anope::string &cpermission = "") : Command(creator, cname, 1, 2, cpermission) { this->SetDesc(_("Set the successor for a channel")); - this->SetSyntax(_("\037channel\037 SUCCESSOR \037nick\037")); + this->SetSyntax(_("\037channel\037 \037nick\037")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_topiclock.cpp b/modules/core/cs_set_topiclock.cpp index 5e7e4447b..a6f88460d 100644 --- a/modules/core/cs_set_topiclock.cpp +++ b/modules/core/cs_set_topiclock.cpp @@ -19,7 +19,7 @@ class CommandCSSetTopicLock : public Command CommandCSSetTopicLock(Module *creator, const Anope::string &cname = "chanserv/set/topiclock", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Topic can only be changed with TOPIC")); - this->SetSyntax(_("\037channel\037 TOPICLOCK {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/cs_set_xop.cpp b/modules/core/cs_set_xop.cpp index 256fca0bf..00b945fe2 100644 --- a/modules/core/cs_set_xop.cpp +++ b/modules/core/cs_set_xop.cpp @@ -20,7 +20,7 @@ class CommandCSSetXOP : public Command CommandCSSetXOP(Module *creator, const Anope::string &cname = "chanserv/set/xop", const Anope::string &cpermission = "") : Command(creator, cname, 2, 2, cpermission) { this->SetDesc(_("Toggle the user privilege system")); - this->SetSyntax(_("\037channel\037 XOP {ON | OFF}")); + this->SetSyntax(_("\037channel\037 {ON | OFF}")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp index f3444a4ca..2e23e1f51 100644 --- a/modules/core/ns_group.cpp +++ b/modules/core/ns_group.cpp @@ -255,7 +255,7 @@ class CommandNSGList : public Command { NickAlias *na2 = *it; - source.Reply(na2->HasFlag(NS_NO_EXPIRE) ? _(" %s (does not expire)") : _(" %s (expires in %s)"), na2->nick.c_str(), do_strftime(na2->last_seen + Config->NSExpire).c_str()); + source.Reply(na2->HasFlag(NS_NO_EXPIRE) || !Config->NSExpire ? _(" %s (does not expire)") : _(" %s (expires in %s)"), na2->nick.c_str(), do_strftime(na2->last_seen + Config->NSExpire).c_str()); } source.Reply(_("%d nicknames in the group."), nc->aliases.size()); } diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp index 5c8fd1fcd..5a1c4520b 100644 --- a/modules/core/ns_info.cpp +++ b/modules/core/ns_info.cpp @@ -125,7 +125,7 @@ class CommandNSInfo : public Command if (na->nc->HasFlag(NI_UNCONFIRMED) == false) { - if (na->HasFlag(NS_NO_EXPIRE)) + if (na->HasFlag(NS_NO_EXPIRE) || !Config->NSExpire) source.Reply(_("This nickname will not expire.")); else source.Reply(_("Expires on: %s"), do_strftime(na->last_seen + Config->NSExpire).c_str()); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index 438b74fac..baec79fda 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -243,6 +243,18 @@ class PlexusProto : public IRCDProto class PlexusIRCdMessage : public IRCdMessage { public: + /* + * params[0] = ts + * params[1] = channel + */ + bool OnJoin(const Anope::string &source, const std::vector<Anope::string> ¶ms) + { + if (params.size() < 2) + return IRCdMessage::OnJoin(source, params); + do_join(source, params[1], params[0]); + return true; + } + bool OnMode(const Anope::string &source, const std::vector<Anope::string> ¶ms) { if (params.size() < 2) @@ -588,7 +600,7 @@ class ProtoPlexus : public Module ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); ModeManager::AddUserMode(new UserMode(UMODE_DEAF, 'D')); ModeManager::AddUserMode(new UserMode(UMODE_SOFTCALLERID, 'G')); - ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, 'M')); + ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, 'N')); ModeManager::AddUserMode(new UserMode(UMODE_REGPRIV, 'R')); ModeManager::AddUserMode(new UserMode(UMODE_SSL, 'S')); ModeManager::AddUserMode(new UserMode(UMODE_WEBIRC, 'W')); |