diff options
author | Adam <Adam@anope.org> | 2013-07-20 02:55:25 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-07-20 03:06:20 -0400 |
commit | 6db01869479c878753fc6da49f2fb0bc44511359 (patch) | |
tree | 130e3afdc6d524eae1bb9a083dd60c84f523e1cb /modules/commands | |
parent | 492eac20a8e2dfdbdbd5a83e41ed880af76cff79 (diff) |
Fix not setting the correct compile flags on modules and fix the resulting warnings
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/bs_kick.cpp | 2 | ||||
-rw-r--r-- | modules/commands/cs_akick.cpp | 4 | ||||
-rw-r--r-- | modules/commands/cs_entrymsg.cpp | 5 | ||||
-rw-r--r-- | modules/commands/cs_mode.cpp | 26 | ||||
-rw-r--r-- | modules/commands/cs_seen.cpp | 3 | ||||
-rw-r--r-- | modules/commands/ms_read.cpp | 2 | ||||
-rw-r--r-- | modules/commands/ns_cert.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_config.cpp | 4 |
8 files changed, 28 insertions, 20 deletions
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index b22dd9ccb..6f8c3cd65 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -41,7 +41,7 @@ struct KickerDataImpl : KickerData struct ExtensibleItem : ::ExtensibleItem<KickerDataImpl> { - ExtensibleItem(Module *m, const Anope::string &name) : ::ExtensibleItem<KickerDataImpl>(m, name) { } + ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem<KickerDataImpl>(m, ename) { } void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override { diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 3764c54fc..7bfed5419 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -528,8 +528,8 @@ class CSAKick : public Module kick = autokick->nc == u->Account(); else if (IRCD->IsChannelValid(autokick->mask)) { - Channel *c = Channel::Find(autokick->mask); - kick = c != NULL && c->FindUser(u); + Channel *chan = Channel::Find(autokick->mask); + kick = chan != NULL && chan->FindUser(u); } else kick = Entry("BAN", autokick->mask).Matches(u); diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index ca521a82c..aaa4f8d85 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -257,8 +257,9 @@ class CSEntryMessage : public Module public: CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - commandentrymsg(this), eml(this, "entrymsg"), - entrymsg_type("EntryMsg", EntryMsg::Unserialize) + commandentrymsg(this), + entrymsg_type("EntryMsg", EntryMsg::Unserialize), + eml(this, "entrymsg") { } diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index b0a2e2b91..f38333265 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -864,14 +864,14 @@ class CSMode : public Module } } - EventReturn OnCheckModes(Channel *c) anope_override + void OnCheckModes(Channel *c) anope_override { if (!c->ci) - return EVENT_CONTINUE; + return; - ModeLocks *ml = modelocks.Get(c->ci); - if (ml) - for (ModeLocks::ModeList::const_iterator it = ml->GetMLock().begin(), it_end = ml->GetMLock().end(); it != it_end; ++it) + ModeLocks *locks = modelocks.Get(c->ci); + if (locks) + for (ModeLocks::ModeList::const_iterator it = locks->GetMLock().begin(), it_end = locks->GetMLock().end(); it != it_end; ++it) { const ModeLock *ml = *it; ChannelMode *cm = ModeManager::FindChannelModeByName(ml->name); @@ -924,6 +924,8 @@ class CSMode : public Module if (ml->HasMLock(mode, param, false)) c->RemoveMode(c->ci->WhoSends(), mode, param); + + return EVENT_CONTINUE; } EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override @@ -937,25 +939,27 @@ class CSMode : public Module if (ml->HasMLock(mode, param, true)) c->SetMode(c->ci->WhoSends(), mode, param); + + return EVENT_CONTINUE; } void OnCreateChan(ChannelInfo *ci) anope_override { ModeLocks *ml = modelocks.Require(ci); - Anope::string modes; + Anope::string mlock; spacesepstream sep(Config->GetModule(this)->Get<const Anope::string>("mlock", "+nrt")); - if (sep.GetToken(modes)) + if (sep.GetToken(mlock)) { bool add = true; - for (unsigned i = 0; i < modes.length(); ++i) + for (unsigned i = 0; i < mlock.length(); ++i) { - if (modes[i] == '+') + if (mlock[i] == '+') add = true; - else if (modes[i] == '-') + else if (mlock[i] == '-') add = false; else { - ChannelMode *cm = ModeManager::FindChannelModeByChar(modes[i]); + ChannelMode *cm = ModeManager::FindChannelModeByChar(mlock[i]); Anope::string param; if (cm && (cm->type == MODE_REGULAR || sep.GetToken(param))) ml->SetMLock(cm, add, param); diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 48231576e..7fa7d3c7a 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -306,7 +306,8 @@ class CSSeen : public Module void OnExpireTick() anope_override { - size_t previous_size = database.size(), purgetime = Config->GetModule(this)->Get<time_t>("purgetime"); + size_t previous_size = database.size(); + time_t purgetime = Config->GetModule(this)->Get<time_t>("purgetime"); if (!purgetime) purgetime = Anope::DoTime("30d"); for (database_map::iterator it = database.begin(), it_end = database.end(); it != it_end;) diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp index 8c1ebc9ba..4da9e3478 100644 --- a/modules/commands/ms_read.cpp +++ b/modules/commands/ms_read.cpp @@ -79,10 +79,12 @@ class MemoListCallback : public NumberList BotInfo *bi; Anope::string cmd; if (Command::FindCommandFromService("memoserv/del", bi, cmd)) + { if (ci) source.Reply(_("To delete, type: \002%s%s %s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), ci->name.c_str(), index + 1); else source.Reply(_("To delete, type: \002%s%s %s %d\002"), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str(), index + 1); + } source.Reply("%s", m->text.c_str()); m->unread = false; diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp index c87ff7179..561f89304 100644 --- a/modules/commands/ns_cert.cpp +++ b/modules/commands/ns_cert.cpp @@ -97,7 +97,7 @@ struct NSCertListImpl : NSCertList struct ExtensibleItem : ::ExtensibleItem<NSCertListImpl> { - ExtensibleItem(Module *m, const Anope::string &name) : ::ExtensibleItem<NSCertListImpl>(m, name) { } + ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem<NSCertListImpl>(m, ename) { } void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override { diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index a9ff515fb..91987ef80 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -69,8 +69,8 @@ class CommandOSConfig : public Command source.Reply(_("%s settings:"), block->GetName().c_str()); - for (unsigned i = 0; i < replies.size(); ++i) - source.Reply(replies[i]); + for (unsigned j = 0; j < replies.size(); ++j) + source.Reply(replies[j]); } source.Reply(_("End of configuration.")); |