summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_check.cpp2
-rw-r--r--src/modules/m_nonotice.cpp2
-rw-r--r--src/modules/m_override.cpp6
-rw-r--r--src/modules/m_remove.cpp8
-rw-r--r--src/modules/m_spanningtree.cpp2
-rw-r--r--src/modules/m_spy.cpp2
-rw-r--r--src/modules/m_timedbans.cpp4
-rw-r--r--src/modules/m_uninvite.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index f8d84154e..8da57d9f2 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -127,7 +127,7 @@ class cmd_check : public command_t
char list[MAXBUF];
char tmpbuf[MAXBUF];
char* ptr = list;
- int flags = cflags(i->second, targchan);
+ int flags = targchan->GetStatusFlags(i->second);
/*
* find how many connections from this user's IP -- unlike Asuka,
* I define a clone as coming from the same host. --w00t
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index a92b327d7..673915ee8 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -79,7 +79,7 @@ class ModuleNoNotice : public Module
chanrec* c = (chanrec*)dest;
if (c->IsModeSet('T'))
{
- if ((Srv->IsUlined(user->server)) || (Srv->ChanMode(user,c) == "@") || (Srv->ChanMode(user,c) == "%"))
+ if ((Srv->IsUlined(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP))
{
// ops and halfops can still /NOTICE the channel
return 0;
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 4f188b0cb..a3bb407ed 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -93,7 +93,7 @@ class ModuleOverride : public Module
{
if ((*source->oper) && (CanOverride(source,"KICK")))
{
- if (((Srv->ChanMode(source,chan) == "%") && (Srv->ChanMode(user,chan) == "@")) || (Srv->ChanMode(source,chan) == ""))
+ if (((chan->GetStatus(source) == STATUS_HOP) && (chan->GetStatus(user) == STATUS_OP)) || (chan->GetStatus(source) < STATUS_VOICE))
{
ServerInstance->WriteOpers("*** NOTICE: "+std::string(source->nick)+" Override-Kicked "+std::string(user->nick)+" on "+std::string(chan->name)+" ("+reason+")");
}
@@ -111,8 +111,8 @@ class ModuleOverride : public Module
{
// Fix by brain - allow the change if they arent on channel - rely on boolean short-circuit
// to not check the other items in the statement if they arent on the channel
- std::string mode = Srv->ChanMode(source,channel);
- if ((!channel->HasUser(source)) || ((mode != "%") && (mode != "@")))
+ int mode = channel->GetStatus(source);
+ if ((!channel->HasUser(source)) || ((mode != STATUS_HOP) && (mode != STATUS_OP)))
{
switch (access_type)
{
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 587edac86..354fe7a8d 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -127,8 +127,8 @@ class RemoveBase
}
else
{
- log(DEBUG, "Setting ulevel to %s", Srv->ChanMode(user, channel).c_str());
- ulevel = chartolevel(Srv->ChanMode(user, channel));
+ log(DEBUG, "Setting ulevel to %s", channel->GetStatusChar(user));
+ ulevel = chartolevel(channel->GetStatusChar(user));
}
/* Now it's the same idea, except for the target. If they're ulined make sure they get a higher level than the sender can */
@@ -149,8 +149,8 @@ class RemoveBase
}
else
{
- log(DEBUG, "Setting tlevel to %s", Srv->ChanMode(target, channel).c_str());
- tlevel = chartolevel(Srv->ChanMode(target, channel));
+ log(DEBUG, "Setting tlevel to %s", channel->GetStatusChar(target));
+ tlevel = chartolevel(channel->GetStatusChar(target));
}
hasnokicks = (Srv->FindModule("m_nokicks.so") && channel->IsModeSet('Q'));
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 3cee35deb..19a217178 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1616,7 +1616,7 @@ class TreeSocket : public InspSocket
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
- int x = cflags(i->second,c);
+ int x = c->GetStatusFlags(i->second);
if ((x & UCMODE_HOP) && (x & UCMODE_OP))
{
specific_halfop.push_back(i->second);
diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp
index 041814f9b..939af8662 100644
--- a/src/modules/m_spy.cpp
+++ b/src/modules/m_spy.cpp
@@ -63,7 +63,7 @@ void spy_userlist(userrec *user,chanrec *c)
CUList *ulist= c->GetUsers();
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
- strlcat(list,cmode(i->second,c),MAXBUF);
+ strlcat(list,c->GetStatusChar(i->second),MAXBUF);
strlcat(list,i->second->nick,MAXBUF);
strlcat(list," ",MAXBUF);
if (strlen(list)>(480-NICKMAX))
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 14e68dfda..076ae09d5 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -55,8 +55,8 @@ class cmd_tban : public command_t
chanrec* channel = ServerInstance->FindChan(parameters[0]);
if (channel)
{
- std::string cm = Srv->ChanMode(user,channel);
- if ((cm == "%") || (cm == "@"))
+ int cm = channel->GetStatus(user);
+ if ((cm == STATUS_HOP) || (cm == STATUS_OP))
{
if (!Srv->IsValidMask(parameters[2]))
{
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 8d8d46c47..70e73cfad 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -59,7 +59,7 @@ class cmd_uninvite : public command_t
if (c->modes[CM_INVITEONLY])
{
- if (cstatus(user,c) < STATUS_HOP)
+ if (c->GetStatus(user) < STATUS_HOP)
{
user->WriteServ("482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, c->name);
return;