diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 12 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/override_map.cpp | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index e7892526e..97a57cc73 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -101,7 +101,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) { if ((Current->GetChild(q)->Hidden) || ((Utils->HideULines) && (ServerInstance->ULine(Current->GetChild(q)->GetName())))) { - if (IS_OPER(user)) + if (user->IsOper()) { ShowLinks(Current->GetChild(q),user,hops+1); } @@ -112,16 +112,16 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) } } /* Don't display the line if its a uline, hide ulines is on, and the user isnt an oper */ - if ((Utils->HideULines) && (ServerInstance->ULine(Current->GetName())) && (!IS_OPER(user))) + if ((Utils->HideULines) && (ServerInstance->ULine(Current->GetName())) && (!user->IsOper())) return; /* Or if the server is hidden and they're not an oper */ - else if ((Current->Hidden) && (!IS_OPER(user))) + else if ((Current->Hidden) && (!user->IsOper())) return; std::string servername = Current->GetName(); user->WriteNumeric(364, "%s %s %s :%d %s", user->nick.c_str(), servername.c_str(), - (Utils->FlatLinks && (!IS_OPER(user))) ? ServerInstance->Config->ServerName.c_str() : Parent.c_str(), - (Utils->FlatLinks && (!IS_OPER(user))) ? 0 : hops, + (Utils->FlatLinks && (!user->IsOper())) ? ServerInstance->Config->ServerName.c_str() : Parent.c_str(), + (Utils->FlatLinks && (!user->IsOper())) ? 0 : hops, Current->GetDesc().c_str()); } @@ -595,7 +595,7 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user) params.push_back(":"+user->fullname); Utils->DoOneToMany(ServerInstance->Config->GetSID(), "UID", params); - if (IS_OPER(user)) + if (user->IsOper()) { params.clear(); params.push_back(user->oper->name); diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 978886be6..6f32bb33e 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -238,12 +238,12 @@ void TreeSocket::SendUsers() u->second->FormatModes(true), /* 8...n: Modes and params */ u->second->fullname.c_str()); /* size-1: GECOS */ this->WriteLine(data); - if (IS_OPER(u->second)) + if (u->second->IsOper()) { snprintf(data,MAXBUF,":%s OPERTYPE %s", u->second->uuid.c_str(), u->second->oper->name.c_str()); this->WriteLine(data); } - if (IS_AWAY(u->second)) + if (u->second->IsAway()) { snprintf(data,MAXBUF,":%s AWAY %ld :%s", u->second->uuid.c_str(), (long)u->second->awaytime, u->second->awaymsg.c_str()); this->WriteLine(data); diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 97a4de8c2..27c4271b8 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -30,7 +30,7 @@ CmdResult CommandOpertype::Handle(const std::vector<std::string>& params, User * { SpanningTreeUtilities* Utils = ((ModuleSpanningTree*)(Module*)creator)->Utils; std::string opertype = params[0]; - if (!IS_OPER(u)) + if (!u->IsOper()) ServerInstance->Users->all_opers.push_back(u); u->modes[UM_OPERATOR] = 1; OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + opertype); diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index 04fa4bcab..69f088f65 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -51,7 +51,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int percent = Current->GetUserCount() * 100.0 / ServerInstance->Users->clientlist->size(); } - const std::string operdata = IS_OPER(user) ? MapOperInfo(Current) : ""; + const std::string operdata = user->IsOper() ? MapOperInfo(Current) : ""; char* myname = names + 100 * line; char* mystat = stats + 50 * line; @@ -59,7 +59,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int int w = depth; std::string servername = Current->GetName(); - if (IS_OPER(user)) + if (user->IsOper()) { w += snprintf(myname + depth, 99 - depth, "%s (%s)", servername.c_str(), Current->GetID().c_str()); } @@ -74,12 +74,12 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int line++; - if (IS_OPER(user) || !Utils->FlatLinks) + if (user->IsOper() || !Utils->FlatLinks) depth = depth + 2; for (unsigned int q = 0; q < Current->ChildCount(); q++) { TreeServer* child = Current->GetChild(q); - if (!IS_OPER(user)) { + if (!user->IsOper()) { if (child->Hidden) continue; if ((Utils->HideULines) && (ServerInstance->ULine(child->GetName()))) |