diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 2 |
4 files changed, 19 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 433da9847..17266afe9 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -140,6 +140,19 @@ void TreeSocket::WriteLine(std::string line) // Insert the source SID (and a space) between the command and the first parameter line.insert(10, line.substr(1, 4)); } + else if (command == "OPERTYPE") + { + std::string::size_type colon = line.find(':', b); + if (colon != std::string::npos) + { + for (std::string::iterator i = line.begin()+colon; i != line.end(); ++i) + { + if (*i == ' ') + *i = '_'; + } + line.erase(colon, 1); + } + } } } } diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index bfd3f75ea..92d274679 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -537,7 +537,8 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user) if (user->IsOper()) { params.clear(); - params.push_back(user->oper->name); + params.push_back(":"); + params[0].append(user->oper->name); Utils->DoOneToMany(user->uuid,"OPERTYPE",params); } @@ -775,7 +776,8 @@ void ModuleSpanningTree::OnOper(User* user, const std::string &opertype) if (user->registered != REG_ALL || !IS_LOCAL(user)) return; parameterlist params; - params.push_back(opertype); + params.push_back(":"); + params[0].append(opertype); Utils->DoOneToMany(user->uuid,"OPERTYPE",params); } diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 21404e68e..c22ad3acb 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -204,7 +204,7 @@ void TreeSocket::SendUsers() this->WriteLine(data); if (u->second->IsOper()) { - snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper->name.c_str()); + snprintf(data,MAXBUF,":%s OPERTYPE :%s", u->second->uuid.c_str(), u->second->oper->name.c_str()); this->WriteLine(data); } if (u->second->IsAway()) diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 4772e9222..021100870 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -53,7 +53,7 @@ CmdResult CommandOpertype::Handle(const std::vector<std::string>& params, User * return CMD_SUCCESS; } - ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server.c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), irc::Spacify(opertype.c_str())); + ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server.c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), opertype.c_str()); return CMD_SUCCESS; } |