Importing the block_motd module into the extra module package. Psychon is probably its author since I grabbed it from here: http://people.znc.in/~psychon/znc/modules/, so thanks psychon! :>

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1700 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-01-10 11:57:54 +00:00
parent d35fdb4b3d
commit b404fae21b
+33
View File
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2004-2009 See the AUTHORS file for details.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#include "Modules.h"
class CBlockMotd : public CModule {
public:
MODCONSTRUCTOR(CBlockMotd) {
}
virtual ~CBlockMotd() {
}
virtual EModRet OnRaw(CString &sLine) {
const CString sCmd = sLine.Token(1);
if (sCmd == "375" /* begin of MOTD */
|| sCmd == "372" /* MOTD */)
return HALT;
if (sCmd == "376" /* End of MOTD */) {
sLine = sLine.Token(0) + " 422 " +
sLine.Token(2) + " :MOTD blocked by ZNC";
}
return CONTINUE;
}
};
MODULEDEFS(CBlockMotd, "Block the MOTD from IRC so it's not sent to your client(s).")