summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp2
-rw-r--r--src/modules/m_cban.cpp2
-rw-r--r--src/modules/m_chanprotect.cpp6
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_nokicks.cpp2
-rw-r--r--src/modules/m_nonotice.cpp2
-rw-r--r--src/modules/m_remove.cpp4
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_sanick.cpp2
-rw-r--r--src/modules/m_sapart.cpp2
-rw-r--r--src/modules/m_saquit.cpp2
-rw-r--r--src/modules/m_services.cpp10
-rw-r--r--src/modules/m_services_account.cpp6
-rw-r--r--src/modules/m_spanningtree.cpp12
-rw-r--r--src/modules/m_swhois.cpp4
-rw-r--r--src/modules/m_timedbans.cpp6
16 files changed, 33 insertions, 33 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index f3e2ed3f8..7b29cc9f9 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -116,7 +116,7 @@ class ModuleAlias : public Module
}
if ((u != NULL) && (Aliases[i].requires != "") && (Aliases[i].uline))
{
- if (!is_uline(u->server))
+ if (!ServerInstance->is_uline(u->server))
{
ServerInstance->WriteOpers("*** NOTICE -- Service "+Aliases[i].requires+" required by alias "+std::string(Aliases[i].text.c_str())+" is not on a u-lined server, possibly underhanded antics detected!");
user->WriteServ("401 "+std::string(user->nick)+" "+Aliases[i].requires+" :is an imposter! Please inform an IRC operator as soon as possible.");
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index cf46b2af9..cf2be71d1 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -92,7 +92,7 @@ class cmd_cban : public command_t
// parameters[0] = #channel
// parameters[1] = 1h3m2s
// parameters[2] = Tortoise abuser
- long length = duration(parameters[1]);
+ long length = ServerInstance->duration(parameters[1]);
std::string reason = (pcnt > 2) ? parameters[2] : "No reason supplied";
cbans.push_back(CBan(parameters[0], user->nick, ServerInstance->Time(), length, reason));
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 6310e6607..68a4afb9f 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -85,7 +85,7 @@ class ChanFounder : public ModeHandler
std::string founder = "cm_founder_"+std::string(channel->name);
// source is a server, or ulined, we'll let them +-q the user.
- if ((is_uline(source->nick)) || (is_uline(source->server)) || (!*source->server) || (!IS_LOCAL(source)))
+ if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server) || (!IS_LOCAL(source)))
{
ServerInstance->Log(DEBUG,"Allowing remote mode change in ChanFounder");
if (adding)
@@ -194,7 +194,7 @@ class ChanProtect : public ModeHandler
std::string founder = "cm_founder_"+std::string(channel->name);
// source has +q, is a server, or ulined, we'll let them +-a the user.
- if ((is_uline(source->nick)) || (is_uline(source->server)) || (!*source->server) || (source->GetExt(founder,dummyptr)) || (!IS_LOCAL(source)))
+ if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server) || (source->GetExt(founder,dummyptr)) || (!IS_LOCAL(source)))
{
if (adding)
{
@@ -343,7 +343,7 @@ class ModuleChanProtect : public Module
// firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode
// without any access checks, we're not worthy :p
- if ((ServerInstance->IsUlined(source->nick)) || (ServerInstance->IsUlined(source->server)) || (!strcmp(source->server,"")))
+ if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server))
{
return ACR_ALLOW;
}
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 378c05ece..ac16f137e 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -60,7 +60,7 @@ class cmd_chghost : public command_t
userrec* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
- if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->IsUlined(user->server)))
+ if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->is_uline(user->server)))
{
// fix by brain - ulines set hosts silently
ServerInstance->WriteOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+parameters[1]);
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index 654d40be8..656e5d0a8 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -86,7 +86,7 @@ class ModuleNoKicks : public Module
{
if (channel->IsModeSet('Q'))
{
- if ((ServerInstance->IsUlined(source->nick)) || (ServerInstance->IsUlined(source->server)) || (!strcmp(source->server,"")))
+ if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server))
{
// ulines can still kick with +Q in place
return ACR_ALLOW;
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index 1dcd34826..6f37640c2 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -81,7 +81,7 @@ class ModuleNoNotice : public Module
chanrec* c = (chanrec*)dest;
if (c->IsModeSet('T'))
{
- if ((ServerInstance->IsUlined(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP))
+ if ((ServerInstance->is_uline(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_remove.cpp b/src/modules/m_remove.cpp
index 492cd5bd0..18bddd015 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -109,7 +109,7 @@ class RemoveBase
protectkey = "cm_protect_" + std::string(channel->name);
founderkey = "cm_founder_" + std::string(channel->name);
- if (is_uline(user->server) || is_uline(user->nick))
+ if (ServerInstance->is_uline(user->server) || ServerInstance->is_uline(user->nick))
{
ServerInstance->Log(DEBUG, "Setting ulevel to U");
ulevel = chartolevel("U");
@@ -131,7 +131,7 @@ class RemoveBase
}
/* 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 */
- if (is_uline(target->server) || is_uline(target->nick))
+ if (ServerInstance->is_uline(target->server) || ServerInstance->is_uline(target->nick))
{
ServerInstance->Log(DEBUG, "Setting tlevel to U");
tlevel = chartolevel("U");
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index c1112cab8..0d998abd9 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -43,7 +43,7 @@ class cmd_sajoin : public command_t
userrec* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
- if (ServerInstance->IsUlined(dest->server))
+ if (ServerInstance->is_uline(dest->server))
{
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
return;
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 0d9167c26..5758bac64 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -42,7 +42,7 @@ class cmd_sanick : public command_t
userrec* source = ServerInstance->FindNick(parameters[0]);
if (source)
{
- if (ServerInstance->IsUlined(source->server))
+ if (ServerInstance->is_uline(source->server))
{
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
return;
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 43ab4b578..9d20ed638 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -44,7 +44,7 @@ class cmd_sapart : public command_t
chanrec* channel = ServerInstance->FindChan(parameters[1]);
if (dest && channel)
{
- if (ServerInstance->IsUlined(dest->server))
+ if (ServerInstance->is_uline(dest->server))
{
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
return;
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 395776230..0a6155b27 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -52,7 +52,7 @@ class cmd_saquit : public command_t
userrec* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
- if (ServerInstance->IsUlined(dest->server))
+ if (ServerInstance->is_uline(dest->server))
{
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
return;
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 4500ecbfc..40e160a6c 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -41,7 +41,7 @@ class Channel_r : public ModeHandler
ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
// only a u-lined server may add or remove the +r mode.
- if ((is_uline(source->nick)) || (is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
+ if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
{
ServerInstance->Log(DEBUG,"Allowing cmode +r, server and nick are: '%s','%s'",source->nick,source->server);
channel->SetMode('r',adding);
@@ -64,7 +64,7 @@ class User_r : public ModeHandler
ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
- if ((kludgeme) || (is_uline(source->nick)) || (is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
+ if ((kludgeme) || (ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
{
ServerInstance->Log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",source->nick,source->server);
dest->SetMode('r',adding);
@@ -230,7 +230,7 @@ class ModuleServices : public Module
chanrec* c = (chanrec*)dest;
if ((c->IsModeSet('M')) && (!user->IsModeSet('r')))
{
- if ((is_uline(user->nick)) || (is_uline(user->server)) || (!strcmp(user->server,"")))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)) || (!strcmp(user->server,"")))
{
// user is ulined, can speak regardless
return 0;
@@ -245,7 +245,7 @@ class ModuleServices : public Module
userrec* u = (userrec*)dest;
if ((u->IsModeSet('R')) && (user->IsModeSet('r')))
{
- if ((is_uline(user->nick)) || (is_uline(user->server)))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)))
{
// user is ulined, can speak regardless
return 0;
@@ -271,7 +271,7 @@ class ModuleServices : public Module
{
if (user->IsModeSet('r'))
{
- if ((is_uline(user->nick)) || (is_uline(user->server)))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)))
{
// user is ulined, won't be stopped from joining
return 0;
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index efcf7629a..0d7ff4339 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -165,7 +165,7 @@ class ModuleServicesAccount : public Module
if ((c->IsModeSet('M')) && (!account))
{
- if ((ServerInstance->IsUlined(user->nick)) || (ServerInstance->IsUlined(user->server)) || (!strcmp(user->server,"")))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)) || (!strcmp(user->server,"")))
{
// user is ulined, can speak regardless
return 0;
@@ -182,7 +182,7 @@ class ModuleServicesAccount : public Module
if ((u->modes['R'-65]) && (!account))
{
- if ((ServerInstance->IsUlined(user->nick)) || (ServerInstance->IsUlined(user->server)))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)))
{
// user is ulined, can speak regardless
return 0;
@@ -212,7 +212,7 @@ class ModuleServicesAccount : public Module
{
if (!account)
{
- if ((ServerInstance->IsUlined(user->nick)) || (ServerInstance->IsUlined(user->server)))
+ if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)))
{
// user is ulined, won't be stopped from joining
return 0;
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index c94f43ed0..b9e15143d 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1159,7 +1159,7 @@ class TreeSocket : public InspSocket
}
else
/* U-lined servers always win regardless of their TS */
- if ((TS > ourTS) && (!this->Instance->IsUlined(source)))
+ if ((TS > ourTS) && (!this->Instance->is_uline(source.c_str())))
{
/* Bounce the mode back to its sender.* We use our lower TS, so the other end
* SHOULD accept it, if its clock is right.
@@ -1272,7 +1272,7 @@ class TreeSocket : public InspSocket
/* The server was ulined, but something iffy is up with the TS.
* Sound the alarm bells!
*/
- if ((this->Instance->IsUlined(sourceserv)) && (TS > ourTS))
+ if ((this->Instance->is_uline(sourceserv.c_str())) && (TS > ourTS))
{
this->Instance->WriteOpers("\2WARNING!\2 U-Lined server '%s' has bad TS for '%s' (accepted change): \2SYNC YOUR CLOCKS\2 to avoid this notice",sourceserv.c_str(),params[0].c_str());
}
@@ -1416,7 +1416,7 @@ class TreeSocket : public InspSocket
/* theres a mode for this user. push them onto the mode queue, and flush it
* if there are more than MAXMODES to go.
*/
- if ((ourTS >= TS) || (this->Instance->IsUlined(who->server)))
+ if ((ourTS >= TS) || (this->Instance->is_uline(who->server)))
{
/* We also always let u-lined clients win, no matter what the TS value */
ServerInstance->Log(DEBUG,"Our our channel newer than theirs, accepting their modes");
@@ -3427,7 +3427,7 @@ class ModuleSpanningTree : public Module
}
for (unsigned int q = 0; q < Current->ChildCount(); q++)
{
- if ((HideULines) && (ServerInstance->IsUlined(Current->GetChild(q)->GetName())))
+ if ((HideULines) && (ServerInstance->is_uline(Current->GetChild(q)->GetName().c_str())))
{
if (*user->oper)
{
@@ -3440,7 +3440,7 @@ class ModuleSpanningTree : public Module
}
}
/* Don't display the line if its a uline, hide ulines is on, and the user isnt an oper */
- if ((HideULines) && (ServerInstance->IsUlined(Current->GetName())) && (!*user->oper))
+ if ((HideULines) && (ServerInstance->is_uline(Current->GetName().c_str())) && (!*user->oper))
return;
user->WriteServ("364 %s %s %s :%d %s",user->nick,Current->GetName().c_str(),(FlatLinks && (!*user->oper)) ? ServerInstance->Config->ServerName : Parent.c_str(),(FlatLinks && (!*user->oper)) ? 0 : hops,Current->GetDesc().c_str());
}
@@ -3526,7 +3526,7 @@ class ModuleSpanningTree : public Module
line++;
for (unsigned int q = 0; q < Current->ChildCount(); q++)
{
- if ((HideULines) && (ServerInstance->IsUlined(Current->GetChild(q)->GetName())))
+ if ((HideULines) && (ServerInstance->is_uline(Current->GetChild(q)->GetName().c_str())))
{
if (*user->oper)
{
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 741031561..f06a41194 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -55,14 +55,14 @@ class cmd_swhois : public command_t
{
// We already had it set...
- if (!ServerInstance->IsUlined(user->server))
+ if (!ServerInstance->is_uline(user->server))
// Ulines set SWHOISes silently
ServerInstance->WriteOpers("*** %s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str());
dest->Shrink("swhois");
DELETE(text);
}
- else if(!ServerInstance->IsUlined(user->server))
+ else if(!ServerInstance->is_uline(user->server))
{
// Ulines set SWHOISes silently
ServerInstance->WriteOpers("*** %s used SWHOIS to set %s's extra whois to '%s'", user->nick, dest->nick, line.c_str());
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index a063ce12d..dc5f8f977 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -74,14 +74,14 @@ class cmd_tban : public command_t
}
TimedBan T;
std::string channelname = parameters[0];
- unsigned long expire = ServerInstance->CalcDuration(parameters[1]) + time(NULL);
- if (ServerInstance->CalcDuration(parameters[1]) < 1)
+ unsigned long expire = ServerInstance->duration(parameters[1]) + time(NULL);
+ if (ServerInstance->duration(parameters[1]) < 1)
{
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid ban time");
return;
}
char duration[MAXBUF];
- snprintf(duration,MAXBUF,"%lu",ServerInstance->CalcDuration(parameters[1]));
+ snprintf(duration,MAXBUF,"%lu",ServerInstance->duration(parameters[1]));
std::string mask = parameters[2];
const char *setban[32];
setban[0] = parameters[0];