summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-14 15:12:13 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-14 15:12:13 +0200
commit001cd6b11eea25982973f1eb9736ab86b69eca05 (patch)
tree79cc056144a054ef40312789b9c6daa2435fffe5 /src
parent60245f0447e7de20f29f96dc1ec096300ba5f6ee (diff)
m_spanningtree Use vector back() where it makes sense
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/away.cpp4
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/away.cpp b/src/modules/m_spanningtree/away.cpp
index 9c4ec5783..f14c8ac98 100644
--- a/src/modules/m_spanningtree/away.cpp
+++ b/src/modules/m_spanningtree/away.cpp
@@ -27,14 +27,14 @@ CmdResult CommandAway::HandleRemote(RemoteUser* u, std::vector<std::string>& par
{
if (params.size())
{
- FOREACH_MOD(OnSetAway, (u, params[params.size() - 1]));
+ FOREACH_MOD(OnSetAway, (u, params.back()));
if (params.size() > 1)
u->awaytime = ConvToInt(params[0]);
else
u->awaytime = ServerInstance->Time();
- u->awaymsg = params[params.size() - 1];
+ u->awaymsg = params.back();
}
else
{
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index 1992d3904..d8027628f 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -151,7 +151,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params)
TreeSocket* src_socket = TreeServer::Get(srcuser)->GetSocket();
/* Now, process every 'modes,uuid' pair */
- irc::tokenstream users(*params.rbegin());
+ irc::tokenstream users(params.back());
std::string item;
irc::modestacker* modestackptr = (apply_other_sides_modes ? &modestack : NULL);
while (users.GetToken(item))
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index e9e3e217d..1b17ca6e7 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -71,7 +71,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st
_new->host = params[3];
_new->dhost = params[4];
_new->ident = params[5];
- _new->fullname = params[params.size() - 1];
+ _new->fullname = params.back();
_new->registered = REG_ALL;
_new->signon = signon;
_new->age = age_t;