diff options
| author | 2014-06-10 17:36:19 +0200 | |
|---|---|---|
| committer | 2014-06-10 17:36:19 +0200 | |
| commit | a63882846432fda67e6282e979ab8ad248f4b574 (patch) | |
| tree | 432aca0ec52766a5c8251fa61d4b8f25d7a6fad7 /src/modules/m_spanningtree/compat.cpp | |
| parent | cmd_kick Assign a value to the kick reason string more reasonably (diff) | |
| download | inspircd++-a63882846432fda67e6282e979ab8ad248f4b574.tar.gz inspircd++-a63882846432fda67e6282e979ab8ad248f4b574.tar.bz2 inspircd++-a63882846432fda67e6282e979ab8ad248f4b574.zip | |
m_spanningtree Allow callers of InsertCurrentChannelTS() to customize positions
Diffstat (limited to 'src/modules/m_spanningtree/compat.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 857e95da9..98b6826e2 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -184,14 +184,14 @@ void TreeSocket::WriteLine(const std::string& original_line) namespace { - bool InsertCurrentChannelTS(std::vector<std::string>& params) + bool InsertCurrentChannelTS(std::vector<std::string>& params, unsigned int chanindex = 0, unsigned int pos = 1) { - Channel* chan = ServerInstance->FindChan(params[0]); + Channel* chan = ServerInstance->FindChan(params[chanindex]); if (!chan) return false; - // Insert the current TS of the channel between the first and the second parameters - params.insert(params.begin()+1, ConvToStr(chan->age)); + // Insert the current TS of the channel after the pos-th parameter + params.insert(params.begin()+pos, ConvToStr(chan->age)); return true; } } |
