summaryrefslogtreecommitdiff
path: root/src/modules/m_services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_services.cpp')
-rw-r--r--src/modules/m_services.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 1eb089d0c..207079da0 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -33,14 +33,12 @@ class Channel_r : public ModeHandler
// only a u-lined server may add or remove the +r mode.
if ((ServerInstance->ULine(source->nick)) || (ServerInstance->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);
return MODEACTION_ALLOW;
}
else
{
- ServerInstance->Log(DEBUG,"Only a server can set chanmode +r, server and nick are: '%s','%s'",source->nick,source->server);
- source->WriteServ("500 "+std::string(source->nick)+" :Only a server may modify the +r channel mode");
+ source->WriteServ("500 %s :Only a server may modify the +r channel mode", source->nick);
return MODEACTION_DENY;
}
}
@@ -60,7 +58,6 @@ class User_r : public ModeHandler
{
if ((adding && !dest->IsModeSet('r')) || (!adding && dest->IsModeSet('r')))
{
- ServerInstance->Log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",source->nick,source->server);
dest->SetMode('r',adding);
return MODEACTION_ALLOW;
}
@@ -68,8 +65,7 @@ class User_r : public ModeHandler
}
else
{
- ServerInstance->Log(DEBUG,"Only a server can set umode +r, server and nick are: '%s','%s'",source->nick, source->server);
- source->WriteServ("500 "+std::string(source->nick)+" :Only a server may modify the +r user mode");
+ source->WriteServ("500 %s :Only a server may modify the +r user mode", source->nick);
return MODEACTION_DENY;
}
}
@@ -237,7 +233,7 @@ class ModuleServices : public Module
return 0;
}
// user messaging a +M channel and is not registered
- user->WriteServ("477 "+std::string(user->nick)+" "+std::string(c->name)+" :You need a registered nickname to speak on this channel");
+ user->WriteServ("477 %s %s :You need a registered nickname to speak on this channel", user->nick, c->name);
return 1;
}
}
@@ -252,7 +248,7 @@ class ModuleServices : public Module
return 0;
}
// user messaging a +R user and is not registered
- user->WriteServ("477 "+std::string(user->nick)+" "+std::string(u->nick)+" :You need a registered nickname to message this user");
+ user->WriteServ("477 %s %s :You need a registered nickname to message this user", user->nick, u->nick);
return 1;
}
}
@@ -278,7 +274,7 @@ class ModuleServices : public Module
return 0;
}
// joining a +R channel and not identified
- user->WriteServ("477 "+std::string(user->nick)+" "+std::string(chan->name)+" :You need a registered nickname to join this channel");
+ user->WriteServ("477 %s %s :You need a registered nickname to join this channel", user->nick, chan->name);
return 1;
}
}