]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Chain ValidateServerName onto ValidateHostname so that the servername gets hostname...
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index 056fafac4eecde7b447355d29698dcd4b3260d0f..bb96b461745f32e37368caba054096802cdd7523 100644 (file)
@@ -29,7 +29,7 @@ class DelayJoinMode : public ModeHandler
                {
                        if (IS_LOCAL(source) && (channel->GetStatus(source) < STATUS_OP))
                        {
-                               source->WriteServ("482 %s %s :Only channel operators may %sset channel mode +D", source->nick, channel->name, adding ? "" : "un");
+                               source->WriteNumeric(482, "%s %s :Only channel operators may %sset channel mode +D", source->nick, channel->name, adding ? "" : "un");
                                return MODEACTION_DENY;
                        }
                        else
@@ -160,6 +160,10 @@ class ModuleDelayJoin : public Module
 
        void OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list)
        {
+               /* Server origin */
+               if (!user)
+                       return;
+
                if (target_type != TYPE_CHANNEL)
                        return;
 
@@ -188,7 +192,7 @@ class ModuleDelayJoin : public Module
                user->Shrink("delayjoin");
        }
 
-       void WriteCommonFrom(User *user, Channel* channel, const char* text, ...)
+       void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) CUSTOM_PRINTF(4, 5)
        {
                va_list argsPtr;
                char textbuffer[MAXBUF];