+ if ((target_type != TYPE_CHANNEL) || (msgtype != MSG_PRIVMSG))
{
return;
}
{
return;
}
@@ -198,7+191,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;
}
@@ -253,7+246,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;
@@ -272,7+265,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())
@@ -280,7+273,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(401, ""+user->nick+" "+a->RequiredNick+" :is currently unavailable. Please try again later.");
return 1;
}
}
return 1;
}
}
@@ -289,7+282,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(401, ""+user->nick+" "+a->RequiredNick+" :is an imposter! Please inform an IRC operator as soon as possible.");
return 1;
}
}
return 1;
}
}
@@ -318,7+311,7 @@ class ModuleAlias : public Module