Skip to content
Newer
Older
100644 39 lines (30 sloc) 869 Bytes
a09a7e7 Switch to the copyright headers the GPLv2 wants us to have
psychon authored Sep 21, 2007
1 /*
73270ff @Un1matr1x Welcome in 2012
Un1matr1x authored Jan 1, 2012
2 * Copyright (C) 2004-2012 See the AUTHORS file for details.
a09a7e7 Switch to the copyright headers the GPLv2 wants us to have
psychon authored Sep 21, 2007
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published
6 * by the Free Software Foundation.
7 */
e06ca0d Added contact info
prozacx authored Sep 13, 2006
8
3a7d015 @kylef Don't include Modules.h from User.h
kylef authored Oct 19, 2011
9 #include <znc/Modules.h>
e354c24 Move ZNC headers into own directory.
Alexey Sokolov authored Sep 23, 2011
10 #include <znc/User.h>
538d3ec Initial revision
prozacx authored Aug 24, 2004
11
12 class CRawMod : public CModule {
13 public:
14 MODCONSTRUCTOR(CRawMod) {}
15 virtual ~CRawMod() {}
16
44d38ec Changed return value from bool to EModRet on most hooks
prozacx authored May 15, 2005
17 virtual EModRet OnRaw(CString& sLine) {
538d3ec Initial revision
prozacx authored Aug 24, 2004
18 PutModule("IRC -> [" + sLine + "]");
44d38ec Changed return value from bool to EModRet on most hooks
prozacx authored May 15, 2005
19 return CONTINUE;
538d3ec Initial revision
prozacx authored Aug 24, 2004
20 }
21
c2119b6 Forward input to user
prozacx authored Oct 11, 2005
22 virtual void OnModCommand(const CString& sCommand) {
0c64f53 Make query to *raw send the command to IRC instead of to the client
psychon authored Apr 7, 2010
23 PutIRC(sCommand);
c2119b6 Forward input to user
prozacx authored Oct 11, 2005
24 }
25
44d38ec Changed return value from bool to EModRet on most hooks
prozacx authored May 15, 2005
26 virtual EModRet OnUserRaw(CString& sLine) {
538d3ec Initial revision
prozacx authored Aug 24, 2004
27 PutModule("YOU -> [" + sLine + "]");
44d38ec Changed return value from bool to EModRet on most hooks
prozacx authored May 15, 2005
28 return CONTINUE;
538d3ec Initial revision
prozacx authored Aug 24, 2004
29 }
30 };
31
2622167 Add link to wiki page from any nonextra module.
Alexey Sokolov authored Jun 11, 2011
32 template<> void TModInfo<CRawMod>(CModInfo& Info) {
33 Info.SetWikiPage("raw");
9a0af84 @kylef Make *raw a network module by default
kylef authored Jan 18, 2012
34 Info.AddType(CModInfo::UserModule);
2622167 Add link to wiki page from any nonextra module.
Alexey Sokolov authored Jun 11, 2011
35 }
36
9a0af84 @kylef Make *raw a network module by default
kylef authored Jan 18, 2012
37 NETWORKMODULEDEFS(CRawMod, "View all of the raw traffic")
538d3ec Initial revision
prozacx authored Aug 24, 2004
38
Something went wrong with that request. Please try again.