summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_motd.cpp2
-rw-r--r--src/commands/cmd_rules.cpp2
-rw-r--r--src/commands/cmd_whois.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/cmd_motd.cpp b/src/commands/cmd_motd.cpp
index 8e227723e..869a9c353 100644
--- a/src/commands/cmd_motd.cpp
+++ b/src/commands/cmd_motd.cpp
@@ -53,7 +53,7 @@ CmdResult CommandMotd::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
return CMD_SUCCESS;
- ConfigTag* tag = NULL;
+ ConfigTag* tag = ServerInstance->Config->EmptyTag;
if (IS_LOCAL(user))
tag = user->GetClass()->config;
std::string motd_name = tag->getString("motd", "motd");
diff --git a/src/commands/cmd_rules.cpp b/src/commands/cmd_rules.cpp
index 5d41aa4b8..17de9f3f2 100644
--- a/src/commands/cmd_rules.cpp
+++ b/src/commands/cmd_rules.cpp
@@ -51,7 +51,7 @@ CmdResult CommandRules::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
return CMD_SUCCESS;
- ConfigTag* tag = NULL;
+ ConfigTag* tag = ServerInstance->Config->EmptyTag;
if (IS_LOCAL(user))
tag = user->GetClass()->config;
std::string rules_name = tag->getString("rules", "rules");
diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp
index ba2ad9c15..ab0b82fff 100644
--- a/src/commands/cmd_whois.cpp
+++ b/src/commands/cmd_whois.cpp
@@ -76,7 +76,7 @@ CmdResult CommandWhois::Handle (const std::vector<std::string>& parameters, User
*/
if (IS_LOCAL(dest) && (ServerInstance->Config->HideWhoisServer.empty() || parameters.size() > 1))
{
- idle = abs((long)((dest->idle_lastmsg)-ServerInstance->Time()));
+ idle = labs((long)((dest->idle_lastmsg)-ServerInstance->Time()));
signon = dest->signon;
}