@@ -31,7+36,7 @@ class User_d : public ModeHandler
{
if (!dest->IsModeSet('d'))
{
{
if (!dest->IsModeSet('d'))
{
- dest->WriteServ("NOTICE %s :*** You have enabled usermode +d, deaf mode. This mode means you WILL NOT receive any messages from any channels you are in. If you did NOT mean to do this, use /mode %s -d.", dest->nick, dest->nick);
+ dest->WriteServ("NOTICE %s :*** You have enabled usermode +d, deaf mode. This mode means you WILL NOT receive any messages from any channels you are in. If you did NOT mean to do this, use /mode %s -d.", dest->nick.c_str(), dest->nick.c_str());
dest->SetMode('d',true);
return MODEACTION_ALLOW;
}
dest->SetMode('d',true);
return MODEACTION_ALLOW;
}
@@ -50,37+55,34 @@ class User_d : public ModeHandler
class ModuleDeaf : public Module
{
class ModuleDeaf : public Module
{
- User_d* m1;
+ User_d m1;
std::string deaf_bypasschars;
std::string deaf_bypasschars_uline;
public:
std::string deaf_bypasschars;
std::string deaf_bypasschars_uline;
public:
- ModuleDeaf(InspIRCd* Me)
- : Module(Me)
+ ModuleDeaf()
+ : m1(this)
{
{
- m1 = new User_d(ServerInstance);
- if (!ServerInstance->AddMode(m1))
- throw ModuleException("Could not add new modes!");