summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_access.cpp14
-rw-r--r--modules/commands/cs_akick.cpp8
-rw-r--r--modules/commands/cs_appendtopic.cpp14
-rw-r--r--modules/commands/cs_ban.cpp6
-rw-r--r--modules/commands/cs_clearusers.cpp9
-rw-r--r--modules/commands/cs_clone.cpp22
-rw-r--r--modules/commands/cs_drop.cpp2
-rw-r--r--modules/commands/cs_entrymsg.cpp22
-rw-r--r--modules/commands/cs_flags.cpp5
-rw-r--r--modules/commands/cs_getkey.cpp2
-rw-r--r--modules/commands/cs_info.cpp4
-rw-r--r--modules/commands/cs_invite.cpp31
-rw-r--r--modules/commands/cs_kick.cpp6
-rw-r--r--modules/commands/cs_log.cpp14
-rw-r--r--modules/commands/cs_mode.cpp11
-rw-r--r--modules/commands/cs_modes.cpp30
-rw-r--r--modules/commands/cs_set_founder.cpp4
-rw-r--r--modules/commands/cs_set_signkick.cpp6
-rw-r--r--modules/commands/cs_set_successor.cpp6
-rw-r--r--modules/commands/cs_sync.cpp2
-rw-r--r--modules/commands/cs_tban.cpp19
-rw-r--r--modules/commands/cs_topic.cpp2
-rw-r--r--modules/commands/cs_unban.cpp2
-rw-r--r--modules/commands/cs_xop.cpp62
-rw-r--r--modules/commands/os_kick.cpp2
25 files changed, 159 insertions, 146 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index ab132970d..ae1a848c9 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -162,7 +162,7 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, access));
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << mask << " as level " << level;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to add " << mask << " with level " << level;
source.Reply(_("\002%s\002 added to %s access list at level \002%d\002."), access->mask.c_str(), ci->name.c_str(), level);
return;
@@ -202,7 +202,7 @@ class CommandCSAccess : public Command
source.Reply(_("No matching entries on %s access list."), ci->name.c_str());
else
{
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "for user" << (Deleted == 1 ? " " : "s ") << Nicks;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "to delete " << Nicks;
if (Deleted == 1)
source.Reply(_("Deleted 1 entry from %s access list."), ci->name.c_str());
@@ -261,7 +261,7 @@ class CommandCSAccess : public Command
{
source.Reply(_("\002%s\002 deleted from %s access list."), access->mask.c_str(), ci->name.c_str());
bool override = !u_access.Founder && !u_access.HasPriv("ACCESS_CHANGE") && !access->mask.equals_ci(u->Account()->display);
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << access->mask;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to delete " << access->mask;
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, access));
ci->EraseAccess(access);
@@ -417,7 +417,7 @@ class CommandCSAccess : public Command
source.Reply(_("Channel %s access list has been cleared."), ci->name.c_str());
bool override = !IsFounder(u, ci);
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to clear the access list";
}
return;
@@ -594,7 +594,7 @@ class CommandCSLevels : public Command
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, p->name, level));
bool override = !ci->AccessFor(u).HasPriv("FOUNDER");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "SET " << p->name << " to " << level;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to set " << p->name << " to level " << level;
if (level == ACCESS_FOUNDER)
source.Reply(_("Level for %s on channel %s changed to founder only."), p->name.c_str(), ci->name.c_str());
@@ -620,7 +620,7 @@ class CommandCSLevels : public Command
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, p->name, ACCESS_INVALID));
bool override = !ci->AccessFor(u).HasPriv("FOUNDER");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DISABLE " << p->name;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to disable " << p->name;
source.Reply(_("\002%s\002 disabled on channel %s."), p->name.c_str(), ci->name.c_str());
return;
@@ -674,7 +674,7 @@ class CommandCSLevels : public Command
FOREACH_MOD(I_OnLevelChange, OnLevelChange(u, ci, "ALL", 0));
bool override = !ci->AccessFor(u).HasPriv("FOUNDER");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "RESET";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to reset all levels";
source.Reply(_("Access levels for \002%s\002 reset to defaults."), ci->name.c_str());
return;
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index 7d4ab4aea..47f174e59 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -152,7 +152,7 @@ class CommandCSAKick : public Command
akick = ci->AddAkick(u->nick, mask, reason);
bool override = !ci->AccessFor(u).HasPriv("AKICK");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << mask << ": " << reason;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to add " << mask << (reason == "" ? "" : ": ") << reason;
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(u, ci, akick));
@@ -192,7 +192,7 @@ class CommandCSAKick : public Command
~AkickDelCallback()
{
bool override = !ci->AccessFor(source.u).HasPriv("AKICK");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "DEL on " << Deleted << " users";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "to delete " << Deleted << (Deleted == 1 ? " entry" : " entries");
if (!Deleted)
source.Reply(_("No matching entries on %s autokick list."), ci->name.c_str());
@@ -234,7 +234,7 @@ class CommandCSAKick : public Command
}
bool override = !ci->AccessFor(u).HasPriv("AKICK");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << mask;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to delete " << mask;
ci->EraseAkick(i);
@@ -395,7 +395,7 @@ class CommandCSAKick : public Command
{
User *u = source.u;
bool override = !ci->AccessFor(u).HasPriv("AKICK");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to clear the akick list";
ci->ClearAkick();
source.Reply(_("Channel %s akick list has been cleared."), ci->name.c_str());
diff --git a/modules/commands/cs_appendtopic.cpp b/modules/commands/cs_appendtopic.cpp
index 2c2b7253f..4186bdaff 100644
--- a/modules/commands/cs_appendtopic.cpp
+++ b/modules/commands/cs_appendtopic.cpp
@@ -45,6 +45,7 @@ class CommandCSAppendTopic : public Command
CommandCSAppendTopic(Module *creator) : Command(creator, "chanserv/appendtopic", 2, 2)
{
this->SetDesc(_("Add text to a channels topic"));
+ this->SetSyntax(_("\037channel\037 \037text\037"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
@@ -58,7 +59,7 @@ class CommandCSAppendTopic : public Command
source.Reply(CHAN_X_NOT_IN_USE, params[0].c_str());
else if (!c->ci)
source.Reply(CHAN_X_NOT_REGISTERED, c->name.c_str());
- else if (!c->ci->AccessFor(u).HasPriv("TOPIC"))
+ else if (!c->ci->AccessFor(u).HasPriv("TOPIC") && !u->HasCommand("chanserv/topic"))
source.Reply(ACCESS_DENIED);
else
{
@@ -77,15 +78,15 @@ class CommandCSAppendTopic : public Command
if (has_topiclock)
c->ci->SetFlag(CI_TOPICLOCK);
- bool override = c->ci->AccessFor(u).HasPriv("TOPIC");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, c->ci) << "changed topic to " << topic;
+ bool override = !c->ci->AccessFor(u).HasPriv("TOPIC");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, c->ci) << "to append: " << topic;
}
return;
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(_("Syntax: APPENDTOPIC channel text"));
+ this->SendSyntax(source);
source.Reply(" ");
source.Reply(_("This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
@@ -93,11 +94,6 @@ class CommandCSAppendTopic : public Command
return true;
}
-
- void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
- {
- source.Reply(_("Syntax: APPENDTOPIC channel text"));
- }
};
class CSAppendTopic : public Module
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp
index 992ba9233..e0c5dd95e 100644
--- a/modules/commands/cs_ban.cpp
+++ b/modules/commands/cs_ban.cpp
@@ -19,8 +19,8 @@ class CommandCSBan : public Command
CommandCSBan(Module *creator) : Command(creator, "chanserv/ban", 2, 3)
{
this->SetDesc(_("Bans a selected nick on a channel"));
- this->SetSyntax(_("\037#channel\037 \037nick\037 [\037reason\037]"));
- this->SetSyntax(_("\037#channel\037 \037mask\037 [\037reason\037]"));
+ this->SetSyntax(_("\037channel\037 \037nick\037 [\037reason\037]"));
+ this->SetSyntax(_("\037channel\037 \037mask\037 [\037reason\037]"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
@@ -127,7 +127,7 @@ class CommandCSBan : public Command
source.Reply(" ");
source.Reply(_("Bans a selected nick on a channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
+ "By default, limited to AOPs or those with level 5 access\n"
"and above on the channel. Channel founders may ban masks."));
return true;
}
diff --git a/modules/commands/cs_clearusers.cpp b/modules/commands/cs_clearusers.cpp
index 59f7a71ab..e65aa34eb 100644
--- a/modules/commands/cs_clearusers.cpp
+++ b/modules/commands/cs_clearusers.cpp
@@ -40,7 +40,7 @@ class CommandCSClearUsers : public Command
source.Reply(CHAN_X_NOT_REGISTERED, c->name.c_str());
return;
}
- else if (!c->ci->AccessFor(u).HasPriv("FOUNDER"))
+ else if (!c->ci->AccessFor(u).HasPriv("FOUNDER") && !u->HasCommand("chanserv/clearusers"))
{
source.Reply(ACCESS_DENIED);
return;
@@ -55,7 +55,10 @@ class CommandCSClearUsers : public Command
c->Kick(NULL, uc->user, "%s", buf.c_str());
}
- source.Reply(_("All users have been kicked from \2%s\2."), chan.c_str());
+ bool override = !c->ci->AccessFor(u).HasPriv("FOUNDER");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, c->ci);
+
+ source.Reply(_("All users have been kicked from \002%s\002."), chan.c_str());
return;
}
@@ -64,7 +67,7 @@ class CommandCSClearUsers : public Command
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Tells %s to clear (kick) all users certain settings on a channel."
+ source.Reply(_("Tells %s to clear (kick) all users on a channel."
" \n"
"By default, limited to those with founder access on the\n"
"channel."), source.owner->nick.c_str());
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp
index cd55e40b0..905a26177 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/commands/cs_clone.cpp
@@ -53,12 +53,6 @@ public:
return;
}
- if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->HasPriv("chanserv/no-register-limit"))
- {
- source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg);
- return;
- }
-
if (what.equals_ci("ALL"))
what.clear();
@@ -107,7 +101,7 @@ public:
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci));
- source.Reply(_("All settings from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
+ source.Reply(_("All settings from \002%s\002 have been cloned to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("ACCESS"))
{
@@ -127,7 +121,7 @@ public:
target_ci->AddAccess(newaccess);
}
- source.Reply(_("All access entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
+ source.Reply(_("All access entries from \002%s\002 have been cloned to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("AKICK"))
{
@@ -141,7 +135,7 @@ public:
target_ci->AddAkick(akick->creator, akick->mask, akick->reason, akick->addtime, akick->last_used);
}
- source.Reply(_("All akick entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
+ source.Reply(_("All akick entries from \002%s\002 have been cloned to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("BADWORDS"))
{
@@ -152,7 +146,7 @@ public:
target_ci->AddBadWord(bw->word, bw->type);
}
- source.Reply(_("All badword entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
+ source.Reply(_("All badword entries from \002%s\002 have been cloned to \002%s\002"), channel.c_str(), target.c_str());
}
else
{
@@ -160,7 +154,7 @@ public:
return;
}
- Log(LOG_COMMAND, u, this, ci) << "to clone it to " << target_ci->name;
+ Log(LOG_COMMAND, u, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name;
return;
}
@@ -169,9 +163,9 @@ public:
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Copies all settings, access, akicks, etc from channel to the\n"
- "target channel. If \037what\037 is access, akick, or badwords\n"
- "then only the respective settings are transferred.\n"
+ source.Reply(_("Copies all settings, access, akicks, etc from \002channel\002 to the\n"
+ "\002target\002 channel. If \037what\037 is \002ACCESS\002, \002AKICK\002, or \002BADWORDS\002\n"
+ "then only the respective settings are cloned.\n"
"You must be the founder of \037channel\037 and \037target\037."));
return true;
}
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp
index 6a6913aaf..429f70ad1 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/commands/cs_drop.cpp
@@ -57,7 +57,7 @@ class CommandCSDrop : public Command
ci->c->RemoveMode(NULL, CMODE_REGISTERED, "", false);
bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv("FOUNDER"));
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "founder: " << (ci->GetFounder() ? ci->GetFounder()->display : "none");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
delete ci;
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp
index 36e0770db..758c3f96c 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/commands/cs_entrymsg.cpp
@@ -79,11 +79,11 @@ class CommandEntryMessage : public Command
EntryMessageList *messages = ci->GetExt<EntryMessageList *>("cs_entrymsg");
if (messages == NULL)
{
- source.Reply(_("Entry message list for \2%s\2 is empty."), ci->name.c_str());
+ source.Reply(_("Entry message list for \002%s\002 is empty."), ci->name.c_str());
return;
}
- source.Reply(_("Entry message list for \2%s\2:"), ci->name.c_str());
+ source.Reply(_("Entry message list for \002%s\002:"), ci->name.c_str());
ListFormatter list;
list.addColumn("Number").addColumn("Creator").addColumn("Created").addColumn("Message");
@@ -117,11 +117,11 @@ class CommandEntryMessage : public Command
}
if (MaxEntries && messages->size() >= MaxEntries)
- source.Reply(_("The entry message list for \2%s\2 is full."), ci->name.c_str());
+ source.Reply(_("The entry message list for \002%s\002 is full."), ci->name.c_str());
else
{
messages->push_back(EntryMsg(ci, source.u->nick, message));
- source.Reply(_("Entry message added to \2%s\2"), ci->name.c_str());
+ source.Reply(_("Entry message added to \002%s\002"), ci->name.c_str());
}
}
@@ -140,24 +140,24 @@ class CommandEntryMessage : public Command
messages->erase(messages->begin() + i - 1);
if (messages->empty())
ci->Shrink("cs_entrymsg");
- source.Reply(_("Entry message \2%i\2 for \2%s\2 deleted."), i, ci->name.c_str());
+ source.Reply(_("Entry message \002%i\002 for \002%s\002 deleted."), i, ci->name.c_str());
}
else
throw ConvertException();
}
catch (const ConvertException &)
{
- source.Reply(_("Entry message \2%s\2 not found on channel \2%s\2."), message.c_str(), ci->name.c_str());
+ source.Reply(_("Entry message \002%s\002 not found on channel \002%s\002."), message.c_str(), ci->name.c_str());
}
}
else
- source.Reply(_("Entry message list for \2%s\2 is empty."), ci->name.c_str());
+ source.Reply(_("Entry message list for \002%s\002 is empty."), ci->name.c_str());
}
void DoClear(CommandSource &source, ChannelInfo *ci)
{
ci->Shrink("cs_entrymsg");
- source.Reply(_("Entry messages for \2%s\2 have been cleared."), ci->name.c_str());
+ source.Reply(_("Entry messages for \002%s\002 have been cleared."), ci->name.c_str());
}
public:
@@ -178,7 +178,7 @@ class CommandEntryMessage : public Command
return;
}
- if (IsFounder(u, ci) || u->HasCommand("chanserv/entrymsg"))
+ if (IsFounder(u, ci) || u->HasCommand("chanserv/set"))
{
bool success = true;
if (params[1].equals_ci("LIST"))
@@ -200,7 +200,7 @@ class CommandEntryMessage : public Command
this->OnSyntaxError(source, "");
}
if (success)
- Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << params[1];
+ Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << " to " << params[1] << " a message";
}
else
source.Reply(ACCESS_DENIED);
@@ -227,7 +227,7 @@ class CSEntryMessage : public Module
{
this->SetAuthor("Anope");
- Implementation i[] = { I_OnReload, I_OnJoinChannel };
+ Implementation i[] = { I_OnReload, I_OnJoinChannel };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
this->OnReload();
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 7f7dc7b84..811730e27 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -174,6 +174,7 @@ class CommandCSFlags : public Command
{
FOREACH_MOD(I_OnAccessDel, OnAccessDel(ci, u, current));
ci->EraseAccess(current);
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to delete " << mask;
source.Reply(_("\002%s\002 removed from the %s access list."), mask.c_str(), ci->name.c_str());
}
else
@@ -201,7 +202,7 @@ class CommandCSFlags : public Command
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, access));
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "MODIFY " << mask << " with flags " << access->Serialize();
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to modify " << mask << "'s flags to " << access->Serialize();
source.Reply(_("Access for \002%s\002 on %s set to +\002%s\002"), access->mask.c_str(), ci->name.c_str(), access->Serialize().c_str());
return;
@@ -284,7 +285,7 @@ class CommandCSFlags : public Command
source.Reply(_("Channel %s access list has been cleared."), ci->name.c_str());
bool override = !IsFounder(u, ci);
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to clear the access list";
}
return;
diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp
index 4fc028c63..287ed82b0 100644
--- a/modules/commands/cs_getkey.cpp
+++ b/modules/commands/cs_getkey.cpp
@@ -44,7 +44,7 @@ class CommandCSGetKey : public Command
Anope::string key;
if (!ci->c || !ci->c->GetParam(CMODE_KEY, key))
{
- source.Reply(_("The channel \002%s\002 has no key."), chan.c_str());
+ source.Reply(_("Channel \002%s\002 has no key."), chan.c_str());
return;
}
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 4f733fb60..b86755d58 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -125,8 +125,8 @@ class CommandCSInfo : public Command
source.Reply(" ");
source.Reply(_("Lists information about the named registered channel,\n"
"including its founder, time of registration, last time\n"
- "used, description, and mode lock, if any. If \002ALL\002 is \n"
- "specified, the entry message and successor will also \n"
+ "used, description, and mode lock, if any. If \002ALL\002 is\n"
+ "specified, the entry message and successor will also\n"
"be displayed."));
return true;
}
diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp
index a05d325b6..7dc4b9f7d 100644
--- a/modules/commands/cs_invite.cpp
+++ b/modules/commands/cs_invite.cpp
@@ -18,8 +18,8 @@ class CommandCSInvite : public Command
public:
CommandCSInvite(Module *creator) : Command(creator, "chanserv/invite", 1, 3)
{
- this->SetDesc(_("Invites you into a channel"));
- this->SetSyntax(_("\037channel\037"));
+ this->SetDesc(_("Invites you or an optionally specified nick into a channel"));
+ this->SetSyntax(_("\037channel\037 [\037nick\037]"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
@@ -42,7 +42,7 @@ class CommandCSInvite : public Command
return;
}
- if (!ci->AccessFor(u).HasPriv("INVITE"))
+ if (!ci->AccessFor(u).HasPriv("INVITE") && !u->HasCommand("chanserv/invite"))
{
source.Reply(ACCESS_DENIED);
return;
@@ -60,15 +60,27 @@ class CommandCSInvite : public Command
}
}
- // XXX need a check for override...
- Log(LOG_COMMAND, u, this, ci) << "for " << u2->nick;
-
if (c->FindUser(u2))
- source.Reply(_("You are already in \002%s\002! "), c->name.c_str());
+ {
+ if (u2 == u)
+ source.Reply(_("You are already in \002%s\002!"), c->name.c_str());
+ else
+ source.Reply(_("\002%s\002 is already in \002%s\002!"), u2->nick.c_str(), c->name.c_str());
+ }
else
{
+ bool override = !ci->AccessFor(u).HasPriv("INVITE");
+
ircdproto->SendInvite(ci->WhoSends(), chan, u2->nick);
- source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str());
+ if (u2 != u)
+ {
+ source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str());
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << u2->nick;
+ }
+ else
+ {
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
+ }
u2->SendMessage(ci->WhoSends(), _("You have been invited to \002%s\002."), c->name.c_str());
}
return;
@@ -78,7 +90,8 @@ class CommandCSInvite : public Command
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Tells %s to invite you into the given channel.\n"
+ source.Reply(_("Tells %s to invite you or an optionally specified\n"
+ "nick into the given channel.\n"
" \n"
"By default, limited to AOPs or those with level 5 and above\n"
"on the channel."), source.owner->nick.c_str());
diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp
index 56d6b152f..09d51b39f 100644
--- a/modules/commands/cs_kick.cpp
+++ b/modules/commands/cs_kick.cpp
@@ -20,6 +20,7 @@ class CommandCSKick : public Command
{
this->SetDesc(_("Kicks a selected nick from a channel"));
this->SetSyntax(_("\037channel\037 \037nick\037 [\037reason\037]"));
+ this->SetSyntax(_("\037channel\037 \037mask\037 [\037reason\037]"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
@@ -110,9 +111,8 @@ class CommandCSKick : public Command
source.Reply(" ");
source.Reply(_("Kicks a selected nick on a channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
- "and above on the channel. Channel founders may include wildcards\n"
- "in \037nick\037."));
+ "By default, limited to AOPs or those with level 5 access\n"
+ "and above on the channel. Channel founders may use masks too."));
return true;
}
};
diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp
index 164398d63..a94608b4c 100644
--- a/modules/commands/cs_log.cpp
+++ b/modules/commands/cs_log.cpp
@@ -32,7 +32,7 @@ public:
ChannelInfo *ci = cs_findchan(channel);
if (ci == NULL)
source.Reply(CHAN_X_NOT_REGISTERED, channel.c_str());
- else if (!ci->AccessFor(u).HasPriv("SET"))
+ else if (!ci->AccessFor(u).HasPriv("SET") && !u->HasPriv("chanserv/set"))
source.Reply(ACCESS_DENIED);
else if (params.size() == 1)
{
@@ -108,6 +108,8 @@ public:
return;
}
+ bool override = !ci->AccessFor(u).HasPriv("SET");
+
for (unsigned i = ci->log_settings.size(); i > 0; --i)
{
LogSetting &log = ci->log_settings[i - 1];
@@ -117,12 +119,14 @@ public:
if (log.extra == extra)
{
ci->log_settings.erase(ci->log_settings.begin() + i - 1);
- source.Reply(_("Logging for command %s on %s with method %s%s has been removed."), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.empty() ? "" : extra.c_str());
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to remove logging for " << command << " with method " << method << (extra == "" ? "" : " ") << extra;
+ source.Reply(_("Logging for command %s on %s with log method %s%s%s has been removed."), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.empty() ? "" : " ", extra.empty() ? "" : extra.c_str());
}
else
{
log.extra = extra;
- source.Reply(_("Logging changed for command %s on %s, using log method %s %s"), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.c_str());
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to change logging for " << command << " to method " << method << (extra == "" ? "" : " ") << extra;
+ source.Reply(_("Logging changed for command %s on %s, now using log method %s%s%s."), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.empty() ? "" : " ", extra.empty() ? "" : extra.c_str());
}
return;
}
@@ -139,9 +143,9 @@ public:
log.creator = u->nick;
ci->log_settings.push_back(log);
- Log(LOG_COMMAND, u, this, ci) << command << " " << method << " " << extra;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to log " << command << " with method " << method << (extra == "" ? "" : " ") << extra;
- source.Reply(_("Logging is now active for command %s on %s, using log method %s %s"), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.c_str());
+ source.Reply(_("Logging is now active for command %s on %s, using log method %s%s%s."), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.empty() ? "" : " ", extra.empty() ? "" : extra.c_str());
}
else
this->OnSyntaxError(source, "");
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 676304fa3..f2e6479c1 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -46,6 +46,8 @@ class CommandCSMode : public Command
const Anope::string &subcommand = params[2];
const Anope::string &param = params.size() > 3 ? params[3] : "";
+ bool override = !ci->AccessFor(u).HasPriv("MODE");
+
if (subcommand.equals_ci("ADD") && !param.empty())
{
spacesepstream sep(param);
@@ -88,7 +90,7 @@ class CommandCSMode : public Command
if (!mode_param.empty())
mode_param = " " + mode_param;
source.Reply(_("%c%c%s locked on %s"), adding ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
- Log(LOG_COMMAND, u, this, ci) << "to lock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to lock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
}
}
}
@@ -139,7 +141,7 @@ class CommandCSMode : public Command
if (!mode_param.empty())
mode_param = " " + mode_param;
source.Reply(_("%c%c%s has been unlocked from %s."), adding == 1 ? '+' : '-', cm->ModeChar, mode_param.c_str(), ci->name.c_str());
- Log(LOG_COMMAND, u, this, ci) << "to unlock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to unlock " << (adding ? '+' : '-') << cm->ModeChar << mode_param;
}
else
source.Reply(_("%c is not locked on %s."), cm->ModeChar, ci->name.c_str());
@@ -194,7 +196,8 @@ class CommandCSMode : public Command
spacesepstream sep(params.size() > 3 ? params[3] : "");
Anope::string modes = params[2], param;
- Log(LOG_COMMAND, u, this, ci) << "to set " << params[2];
+ bool override = !ci->AccessFor(u).HasPriv("MODE");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to set " << params[2];
int adding = -1;
for (size_t i = 0; i < modes.length(); ++i)
@@ -345,7 +348,7 @@ class CommandCSMode : public Command
if (!ci || !ci->c)
source.Reply(CHAN_X_NOT_IN_USE, params[0].c_str());
- else if (!ci->AccessFor(u).HasPriv("MODE") && !u->HasCommand("chanserv/mode"))
+ else if (!ci->AccessFor(u).HasPriv("MODE") && !u->HasPriv("chanserv/set"))
source.Reply(ACCESS_DENIED);
else if (subcommand.equals_ci("LOCK"))
this->DoLock(source, ci, params);
diff --git a/modules/commands/cs_modes.cpp b/modules/commands/cs_modes.cpp
index 0e11fe1b5..0e1f9ef64 100644
--- a/modules/commands/cs_modes.cpp
+++ b/modules/commands/cs_modes.cpp
@@ -59,7 +59,7 @@ class CommandModeBase : public Command
* @param chan The channel its being set on
* @param nick The nick the modes being set on
* @param set Is the mode being set or removed
- * @param level The acecss level required to set this mode on someone else
+ * @param level The access level required to set this mode on someone else
* @param levelself The access level required to set this mode on yourself
*/
void do_util(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, const Anope::string &level, const Anope::string &levelself)
@@ -78,7 +78,7 @@ class CommandModeBase : public Command
public:
CommandModeBase(Module *creator, const Anope::string &cname) : Command(creator, cname, 0, 2)
{
- this->SetSyntax(_("[\037#channel\037] [\037nick\037]"));
+ this->SetSyntax(_("[\037channel\037] [\037nick\037]"));
}
};
@@ -105,7 +105,7 @@ class CommandCSOp : public CommandModeBase
"it will op you. If channel is not given, it will op you\n"
"on every channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
+ "By default, limited to AOPs or those with level 5 access\n"
"and above on the channel."));
return true;
}
@@ -134,7 +134,7 @@ class CommandCSDeOp : public CommandModeBase
"it will deop you. If channel is not given, it will deop\n"
"you on every channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
+ "By default, limited to AOPs or those with level 5 access\n"
"and above on the channel.");
return true;
}
@@ -163,8 +163,8 @@ class CommandCSVoice : public CommandModeBase
"it will voice you. If channel is not given, it will voice you\n"
"on every channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
- "and above on the channel, or to VOPs or those with level 3 \n"
+ "By default, limited to AOPs or those with level 5 access\n"
+ "and above on the channel, or to VOPs or those with level 3\n"
"and above for self voicing."));
return true;
}
@@ -193,8 +193,8 @@ class CommandCSDeVoice : public CommandModeBase
"it will devoice you. If channel is not given, it will devoice\n"
"you on every channel.\n"
" \n"
- "By default, limited to AOPs or those with level 5 access \n"
- "and above on the channel, or to VOPs or those with level 3 \n"
+ "By default, limited to AOPs or those with level 5 access\n"
+ "and above on the channel, or to VOPs or those with level 3\n"
"and above for self devoicing."));
return true;
}
@@ -226,8 +226,9 @@ class CommandCSHalfOp : public CommandModeBase
"it will halfop you. If channel is not given, it will halfop\n"
"you on every channel.\n"
" \n"
- "By default, limited to AOPs and those with level 5 access \n"
- "and above on the channel, or to HOPs or those with level 4 \n"));
+ "By default, limited to AOPs and those with level 5 access\n"
+ "and above on the channel, or to HOPs or those with level 4\n"
+ "and above for self halfopping."));
return true;
}
};
@@ -258,8 +259,8 @@ class CommandCSDeHalfOp : public CommandModeBase
"it will dehalfop you. If channel is not given, it will dehalfop\n"
"you on every channel.\n"
" \n"
- "By default, limited to AOPs and those with level 5 access \n"
- "and above on the channel, or to HOPs or those with level 4 \n"
+ "By default, limited to AOPs and those with level 5 access\n"
+ "and above on the channel, or to HOPs or those with level 4\n"
"and above for self dehalfopping."));
return true;
}
@@ -291,7 +292,7 @@ class CommandCSProtect : public CommandModeBase
"it will protect you. If channel is not given, it will protect\n"
"you on every channel.\n"
" \n"
- "By default, limited to the founder, or to SOPs or those with \n"
+ "By default, limited to the founder, or to SOPs or those with\n"
"level 10 and above on the channel for self protecting."));
return true;
}
@@ -323,7 +324,8 @@ class CommandCSDeProtect : public CommandModeBase
"it will deprotect you. If channel is not given, it will deprotect\n"
"you on every channel.\n"
" \n"
- "By default, limited to the founder, or to SOPs or those with \n"));
+ "By default, limited to the founder, or to SOPs or those with\n"
+ "level 10 and above on the channel for self deprotecting."));
return true;
}
};
diff --git a/modules/commands/cs_set_founder.cpp b/modules/commands/cs_set_founder.cpp
index 4cb22efc1..fade8a27b 100644
--- a/modules/commands/cs_set_founder.cpp
+++ b/modules/commands/cs_set_founder.cpp
@@ -59,11 +59,11 @@ class CommandCSSetFounder : public Command
return;
}
- Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, u, this, ci) << "to change the founder to " << nc->display;
+ Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, u, this, ci) << "to change the founder from " << (ci->GetFounder() ? ci->GetFounder()->display : "(none)") << " to " << nc->display;
ci->SetFounder(nc);
- source.Reply(_("Founder of %s changed to \002%s\002."), ci->name.c_str(), na->nick.c_str());
+ source.Reply(_("Founder of \002%s\002 changed to \002%s\002."), ci->name.c_str(), na->nick.c_str());
return;
}
diff --git a/modules/commands/cs_set_signkick.cpp b/modules/commands/cs_set_signkick.cpp
index 511b15a8b..8804fdf4e 100644
--- a/modules/commands/cs_set_signkick.cpp
+++ b/modules/commands/cs_set_signkick.cpp
@@ -67,11 +67,11 @@ class CommandCSSetSignKick : public Command
source.Reply(" ");
source.Reply(_("Enables or disables signed kicks for a\n"
"channel. When \002SIGNKICK\002 is set, kicks issued with\n"
- "KICK command will have the nick that used the\n"
+ "the \002KICK\002 command will have the nick that used the\n"
"command in their reason.\n"
" \n"
- "If you use \002LEVEL\002, those who have a level that is superior \n"
- "or equal to the SIGNKICK level on the channel won't have their \n"
+ "If you use \002LEVEL\002, those who have a level that is superior\n"
+ "or equal to the SIGNKICK level on the channel won't have their\n"
"kicks signed."));
return true;
}
diff --git a/modules/commands/cs_set_successor.cpp b/modules/commands/cs_set_successor.cpp
index 8904a0ab9..4b7015b9d 100644
--- a/modules/commands/cs_set_successor.cpp
+++ b/modules/commands/cs_set_successor.cpp
@@ -57,7 +57,7 @@ class CommandCSSetSuccessor : public Command
}
if (na->nc == ci->GetFounder())
{
- source.Reply(_("%s cannot be the successor on channel %s they are the founder."), na->nick.c_str(), ci->name.c_str());
+ source.Reply(_("%s cannot be the successor on channel %s as they are the founder."), na->nick.c_str(), ci->name.c_str());
return;
}
nc = na->nc;
@@ -65,12 +65,12 @@ class CommandCSSetSuccessor : public Command
else
nc = NULL;
- Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, u, this, ci) << "to change the successor from " << (ci->successor ? ci->successor->display : "none") << " to " << (nc ? nc->display : "none");
+ Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, u, this, ci) << "to change the successor from " << (ci->successor ? ci->successor->display : "(none)") << " to " << (nc ? nc->display : "(none)");
ci->successor = nc;
if (nc)
- source.Reply(_("Successor for %s changed to \002%s\002."), ci->name.c_str(), nc->display.c_str());
+ source.Reply(_("Successor for \002%s\002 changed to \002%s\002."), ci->name.c_str(), nc->display.c_str());
else
source.Reply(_("Successor for \002%s\002 unset."), ci->name.c_str());
diff --git a/modules/commands/cs_sync.cpp b/modules/commands/cs_sync.cpp
index 7f3e376a3..50c451fa7 100644
--- a/modules/commands/cs_sync.cpp
+++ b/modules/commands/cs_sync.cpp
@@ -36,7 +36,7 @@ class CommandCSSync : public Command
for (CUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
chan_set_correct_modes((*it)->user, ci->c, 1);
- source.Reply(_("All user modes on \2%s\2 have been synced."), ci->name.c_str());
+ source.Reply(_("All user modes on \002%s\002 have been synced."), ci->name.c_str());
}
}
diff --git a/modules/commands/cs_tban.cpp b/modules/commands/cs_tban.cpp
index ecb8b681a..62f241059 100644
--- a/modules/commands/cs_tban.cpp
+++ b/modules/commands/cs_tban.cpp
@@ -55,9 +55,9 @@ static bool CanBanUser(CommandSource &source, Channel *c, User *u2)
class CommandCSTBan : public Command
{
public:
- CommandCSTBan(Module *m) : Command(m, "TBAN", 3, 3)
+ CommandCSTBan(Module *creator) : Command(creator, "chanserv/tban", 3, 3)
{
- this->SetDesc(_("Bans the user for a given length of time"));
+ this->SetDesc(_("Bans the user for a given length of time in seconds"));
this->SetSyntax(_("\037channel\037 \037nick\037 \037time\037"));
}
@@ -80,7 +80,8 @@ class CommandCSTBan : public Command
get_idealban(c->ci, u2, mask);
c->SetMode(NULL, CMODE_BAN, mask);
new TempBan(dotime(time), c, mask);
- source.Reply(_("%s banned from %s, will auto-expire in %s"), mask.c_str(), c->name.c_str(), time.c_str());
+
+ source.Reply(_("%s banned from %s, will auto-expire in %s second(s)."), mask.c_str(), c->name.c_str(), time.c_str());
}
return;
@@ -90,8 +91,11 @@ class CommandCSTBan : public Command
{
this->OnSyntaxError(source, "");
source.Reply(" ");
- source.Reply(_("Bans the given user from a channel for a specified length of\n"
- "time. If the ban is removed before by hand, it will NOT be replaced."));
+ source.Reply(_("Bans the user for a given length of time in seconds.\n"
+ " \n"
+ "Bans the given user from a channel for a specified length of\n"
+ "time in seconds. If the ban is removed before by hand, it\n"
+ "will NOT be replaced."));
return true;
}
@@ -102,13 +106,10 @@ class CSTBan : public Module
CommandCSTBan commandcstban;
public:
- CSTBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
- commandcstban(this)
+ CSTBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcstban(this)
{
this->SetAuthor("Anope");
-
me = this;
-
}
};
diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp
index 01ee26369..910e2129b 100644
--- a/modules/commands/cs_topic.cpp
+++ b/modules/commands/cs_topic.cpp
@@ -48,7 +48,7 @@ class CommandCSTopic : public Command
ci->SetFlag(CI_TOPICLOCK);
bool override = !ci->AccessFor(u).HasPriv("TOPIC");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to change the topic to " << (!topic.empty() ? topic : "No topic");
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << (!topic.empty() ? "to change the topic to: " : "to unset the topic") << (!topic.empty() ? topic : "");
}
return;
}
diff --git a/modules/commands/cs_unban.cpp b/modules/commands/cs_unban.cpp
index 0f5294e56..6963dd308 100644
--- a/modules/commands/cs_unban.cpp
+++ b/modules/commands/cs_unban.cpp
@@ -69,7 +69,7 @@ class CommandCSUnban : public Command
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_("Tells %s to remove all bans preventing you or the given\n"
- "user from entering the given channel. \n"
+ "user from entering the given channel.\n"
" \n"
"By default, limited to AOPs or those with level 5 and above\n"
"on the channel."), source.owner->nick.c_str());
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index ec43ccebc..58fd99ba2 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -264,7 +264,7 @@ class XOPBase : public Command
ci->AddAccess(acc);
bool override = (level >= u_level && !access.Founder) || !access.HasPriv("ACCESS_CHANGE");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << mask;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to add " << mask;
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, acc));
source.Reply(_("\002%s\002 added to %s %s list."), acc->mask.c_str(), ci->name.c_str(), source.command.c_str());
@@ -331,7 +331,7 @@ class XOPBase : public Command
source.Reply(_("No matching entries on %s %s list."), ci->name.c_str(), source.command.c_str());
else
{
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "deleted access of users " << Nicks;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source.u, c, ci) << "to delete " << Nicks;
if (Deleted == 1)
source.Reply(_("Deleted one entry from %s %s list."), ci->name.c_str(), source.command.c_str());
@@ -372,7 +372,7 @@ class XOPBase : public Command
if (a->mask.equals_ci(mask) && XOPChanAccess::DetermineLevel(a) == level)
{
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << a->mask;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to delete " << a->mask;
source.Reply(_("\002%s\002 deleted from %s %s list."), a->mask.c_str(), ci->name.c_str(), source.command.c_str());
@@ -407,8 +407,6 @@ class XOPBase : public Command
}
}
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
-
if (!ci->GetAccessCount())
{
source.Reply(_("%s %s list is empty."), ci->name.c_str(), source.command.c_str());
@@ -502,7 +500,7 @@ class XOPBase : public Command
}
bool override = !ci->AccessFor(u).HasPriv("FOUNDER");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to clear the access list";
for (unsigned i = ci->GetAccessCount(); i > 0; --i)
{
@@ -578,7 +576,7 @@ class CommandCSQOP : public XOPBase
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002QOP\002 (AutoOwner) \002list\002 for a channel. The QOP \n"
+ source.Reply(_("Maintains the \002QOP\002 (AutoOwner) \002list\002 for a channel. The QOP\n"
"list gives users the right to be auto-owner on your channel,\n"
"which gives them almost (or potentially, total) access.\n"
" \n"
@@ -605,9 +603,9 @@ class CommandCSQOP : public XOPBase
"QOP list may use the \002QOP LIST\002 command.\n"
" \n"));
source.Reply(_("This command may have been disabled for your channel, and\n"
- "in that case you need to use the access list. See \n"
+ "in that case you need to use the access list. See\n"
"\002%s%s HELP ACCESS\002 for information about the access list,\n"
- "and \002%s%s HELP SET XOP\002 to know how to toggle between \n"
+ "and \002%s%s HELP SET XOP\002 to know how to toggle between\n"
"the access list and xOP list systems."),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str(),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str());
@@ -632,7 +630,7 @@ class CommandCSAOP : public XOPBase
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002AOP\002 (AutoOP) \002list\002 for a channel. The AOP \n"
+ source.Reply(_("Maintains the \002AOP\002 (AutoOP) \002list\002 for a channel. The AOP\n"
"list gives users the right to be auto-opped on your channel,\n"
"to unban or invite themselves if needed, to have their\n"
"greet message showed on join, and so on.\n"
@@ -661,9 +659,9 @@ class CommandCSAOP : public XOPBase
"AOP list may use the \002AOP LIST\002 command.\n"
" \n"));
source.Reply(_("This command may have been disabled for your channel, and\n"
- "in that case you need to use the access list. See \n"
+ "in that case you need to use the access list. See\n"
"\002%s%s HELP ACCESS\002 for information about the access list,\n"
- "and \002%s%s HELP SET XOP\002 to know how to toggle between \n"
+ "and \002%s%s HELP SET XOP\002 to know how to toggle between\n"
"the access list and xOP list systems."),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str(),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str());
@@ -688,8 +686,8 @@ class CommandCSHOP : public XOPBase
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002HOP\002 (HalfOP) \002list\002 for a channel. The HOP \n"
- "list gives users the right to be auto-halfopped on your \n"
+ source.Reply(_("Maintains the \002HOP\002 (HalfOP) \002list\002 for a channel. The HOP\n"
+ "list gives users the right to be auto-halfopped on your\n"
"channel.\n"
" \n"
"The \002HOP ADD\002 command adds the given nickname to the\n"
@@ -710,14 +708,14 @@ class CommandCSHOP : public XOPBase
"The \002HOP CLEAR\002 command clears all entries of the\n"
"HOP list.\n"));
source.Reply(_(" \n"
- "The \002HOP ADD\002, \002HOP DEL\002 and \002HOP LIST\002 commands are \n"
- "limited to AOPs or above, while the \002HOP CLEAR\002 command \n"
+ "The \002HOP ADD\002, \002HOP DEL\002 and \002HOP LIST\002 commands are\n"
+ "limited to AOPs or above, while the \002HOP CLEAR\002 command\n"
"can only be used by the channel founder.\n"
" \n"));
source.Reply(_("This command may have been disabled for your channel, and\n"
- "in that case you need to use the access list. See \n"
+ "in that case you need to use the access list. See\n"
"\002%s%s HELP ACCESS\002 for information about the access list,\n"
- "and \002%s%s HELP SET XOP\002 to know how to toggle between \n"
+ "and \002%s%s HELP SET XOP\002 to know how to toggle between\n"
"the access list and xOP list systems."),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str(),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str());
@@ -742,9 +740,9 @@ class CommandCSSOP : public XOPBase
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002SOP\002 (SuperOP) \002list\002 for a channel. The SOP \n"
+ source.Reply(_("Maintains the \002SOP\002 (SuperOP) \002list\002 for a channel. The SOP\n"
"list gives users all rights given by the AOP list, and adds\n"
- "those needed to use the AutoKick and the BadWords lists, \n"
+ "those needed to use the AutoKick and the BadWords lists,\n"
"to send and read channel memos, and so on.\n"
" \n"
"The \002SOP ADD\002 command adds the given nickname to the\n"
@@ -764,16 +762,15 @@ class CommandCSSOP : public XOPBase
" \n"
"The \002SOP CLEAR\002 command clears all entries of the\n"
"SOP list.\n"));
- source.Reply(_(
- " \n"
- "The \002SOP ADD\002, \002SOP DEL\002 and \002SOP CLEAR\002 commands are \n"
+ source.Reply(_(" \n"
+ "The \002SOP ADD\002, \002SOP DEL\002 and \002SOP CLEAR\002 commands are\n"
"limited to the channel founder. However, any user on the\n"
"AOP list may use the \002SOP LIST\002 command.\n"
" \n"));
source.Reply(_("This command may have been disabled for your channel, and\n"
- "in that case you need to use the access list. See \n"
+ "in that case you need to use the access list. See\n"
"\002%s%s HELP ACCESS\002 for information about the access list,\n"
- "and \002%s%s HELP SET XOP\002 to know how to toggle between \n"
+ "and \002%s%s HELP SET XOP\002 to know how to toggle between\n"
"the access list and xOP list systems."),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str(),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str());
@@ -798,8 +795,8 @@ class CommandCSVOP : public XOPBase
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002VOP\002 (VOicePeople) \002list\002 for a channel. \n"
- "The VOP list allows users to be auto-voiced and to voice \n"
+ source.Reply(_("Maintains the \002VOP\002 (VOicePeople) \002list\002 for a channel.\n"
+ "The VOP list allows users to be auto-voiced and to voice\n"
"themselves if they aren't.\n"
" \n"
"The \002VOP ADD\002 command adds the given nickname to the\n"
@@ -819,16 +816,15 @@ class CommandCSVOP : public XOPBase
" \n"
"The \002VOP CLEAR\002 command clears all entries of the\n"
"VOP list.\n"));
- source.Reply(_(
- " \n"
- "The \002VOP ADD\002, \002VOP DEL\002 and \002VOP LIST\002 commands are \n"
- "limited to AOPs or above, while the \002VOP CLEAR\002 command \n"
+ source.Reply(_(" \n"
+ "The \002VOP ADD\002, \002VOP DEL\002 and \002VOP LIST\002 commands are\n"
+ "limited to AOPs or above, while the \002VOP CLEAR\002 command\n"
"can only be used by the channel founder.\n"
" \n"));
source.Reply(_("This command may have been disabled for your channel, and\n"
- "in that case you need to use the access list. See \n"
+ "in that case you need to use the access list. See\n"
"\002%s%s HELP ACCESS\002 for information about the access list,\n"
- "and \002%s%s HELP SET XOP\002 to know how to toggle between \n"
+ "and \002%s%s HELP SET XOP\002 to know how to toggle between\n"
"the access list and xOP list systems."),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str(),
Config->UseStrictPrivMsgString.c_str(), source.owner->nick.c_str());
diff --git a/modules/commands/os_kick.cpp b/modules/commands/os_kick.cpp
index c8b9ec787..029264315 100644
--- a/modules/commands/os_kick.cpp
+++ b/modules/commands/os_kick.cpp
@@ -48,7 +48,7 @@ class CommandOSKick : public Command
}
c->Kick(source.owner, u2, "%s (%s)", u->nick.c_str(), s.c_str());
- Log(LOG_ADMIN, u, this) << "on " << u2->nick << " in " << c->name;
+ Log(LOG_ADMIN, u, this) << "on " << u2->nick << " in " << c->name << " (" << s << ")";
return;
}