+ if ((target_type != TYPE_CHANNEL) || (msgtype != MSG_PRIVMSG))
{
return;
}
{
return;
}
@@ -199,7+186,7 @@ class ModuleAlias : public Module
}
/* Stop here if the user is +B and allowbot is set to no. */
}
/* Stop here if the user is +B and allowbot is set to no. */
- if (!AllowBots && user->IsModeSet('B'))
+ if (!AllowBots && user->IsModeSet(botmode))
{
return;
}
{
return;
}
@@ -254,7+241,7 @@ class ModuleAlias : public Module
}
}
- int DoAlias(User *user, Channel *c, Alias *a, const std::string compare, const std::string safe)
+ int DoAlias(User *user, Channel *c, Alias *a, const std::string& compare, const std::string& safe)
{
User *u = NULL;
{
User *u = NULL;
@@ -273,7+260,7 @@ class ModuleAlias : public Module
}
}
}
}
- if ((a->OperOnly) && (!IS_OPER(user)))
+ if ((a->OperOnly) && (!user->IsOper()))
return 0;
if (!a->RequiredNick.empty())
return 0;
if (!a->RequiredNick.empty())
@@ -281,7+268,7 @@ class ModuleAlias : public Module
u = ServerInstance->FindNick(a->RequiredNick);
if (!u)
{
u = ServerInstance->FindNick(a->RequiredNick);
if (!u)
{
- user->WriteNumeric(401, ""+std::string(user->nick)+" "+a->RequiredNick+" :is currently unavailable. Please try again later.");
+ user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick + " :is currently unavailable. Please try again later.");
return 1;
}
}
return 1;
}
}
@@ -290,7+277,7 @@ class ModuleAlias : public Module
if (!ServerInstance->ULine(u->server))
{
ServerInstance->SNO->WriteToSnoMask('a', "NOTICE -- Service "+a->RequiredNick+" required by alias "+std::string(a->AliasedCommand.c_str())+" is not on a u-lined server, possibly underhanded antics detected!");
if (!ServerInstance->ULine(u->server))
{
ServerInstance->SNO->WriteToSnoMask('a', "NOTICE -- Service "+a->RequiredNick+" required by alias "+std::string(a->AliasedCommand.c_str())+" is not on a u-lined server, possibly underhanded antics detected!");
- user->WriteNumeric(401, ""+std::string(user->nick)+" "+a->RequiredNick+" :is an imposter! Please inform an IRC operator as soon as possible.");
+ user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick + " :is an imposter! Please inform an IRC operator as soon as possible.");
return 1;
}
}
return 1;
}
}
@@ -319,7+306,7 @@ class ModuleAlias : public Module