summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 17:36:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 17:36:26 +0000
commit206e3b49c7bfe3e8a7ca972103fe9e30feb3a86a (patch)
treec4d7878e6b460f81cda67fa1fb8d9839b0081676 /src/modules/extra
parentbadadc427a99e5483402c21bf5b7ae64722930e9 (diff)
SPACE INDENTING ACTION RANGERS -- ATTACK!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7048 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_httpclienttest.cpp125
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
-rw-r--r--src/modules/extra/m_ziplink.cpp4
3 files changed, 67 insertions, 64 deletions
diff --git a/src/modules/extra/m_httpclienttest.cpp b/src/modules/extra/m_httpclienttest.cpp
index 9e43379c1..19c6c376b 100644
--- a/src/modules/extra/m_httpclienttest.cpp
+++ b/src/modules/extra/m_httpclienttest.cpp
@@ -1,12 +1,12 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
*
* InspIRCd: (C) 2002-2007 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -21,79 +21,82 @@
class MyModule : public Module
{
+
public:
- MyModule(InspIRCd* Me)
- : Module::Module(Me)
- {
- }
- virtual ~MyModule()
- {
- }
+ MyModule(InspIRCd* Me)
+ : Module::Module(Me)
+ {
+ }
+
+ virtual ~MyModule()
+ {
+ }
- virtual void Implements(char* List)
- {
+ virtual void Implements(char* List)
+ {
List[I_OnRequest] = List[I_OnUserJoin] = List[I_OnUserPart] = 1;
- }
-
- virtual Version GetVersion()
- {
- return Version(1,0,0,1,VF_VENDOR,API_VERSION);
- }
-
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
- {
- // method called when a user joins a channel
-
- std::string chan = channel->name;
- std::string nick = user->nick;
-// ServerInstance->Log(DEBUG,"User " + nick + " joined " + chan);
-
- Module* target = ServerInstance->FindModule("m_http_client.so");
- if(target) {
- HTTPClientRequest req(ServerInstance, this, target, "http://znc.in/~psychon");
- req.Send();
- }
- else
- ServerInstance->Log(DEBUG,"module not found, load it!!");
- }
-
- char* OnRequest(Request* req)
- {
- HTTPClientResponse* resp = (HTTPClientResponse*)req;
- if(!strcmp(resp->GetId(), HTTP_CLIENT_RESPONSE))
- {
- ServerInstance->Log(DEBUG, resp->GetData());
- }
- return NULL;
- }
-
- virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
- {
- }
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version(1,0,0,1,VF_VENDOR,API_VERSION);
+ }
+
+ virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ {
+ // method called when a user joins a channel
+
+ std::string chan = channel->name;
+ std::string nick = user->nick;
+ ServerInstance->Log(DEBUG,"User " + nick + " joined " + chan);
+
+ Module* target = ServerInstance->FindModule("m_http_client.so");
+ if(target)
+ {
+ HTTPClientRequest req(ServerInstance, this, target, "http://znc.in/~psychon");
+ req.Send();
+ }
+ else
+ ServerInstance->Log(DEBUG,"module not found, load it!!");
+ }
+
+ char* OnRequest(Request* req)
+ {
+ HTTPClientResponse* resp = (HTTPClientResponse*)req;
+ if(!strcmp(resp->GetId(), HTTP_CLIENT_RESPONSE))
+ {
+ ServerInstance->Log(DEBUG, resp->GetData());
+ }
+ return NULL;
+ }
+
+ virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+ {
+ }
};
class MyModuleFactory : public ModuleFactory
{
public:
- MyModuleFactory()
- {
- }
+ MyModuleFactory()
+ {
+ }
- ~MyModuleFactory()
- {
- }
+ ~MyModuleFactory()
+ {
+ }
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new MyModule(Me);
- }
+ virtual Module * CreateModule(InspIRCd* Me)
+ {
+ return new MyModule(Me);
+ }
};
extern "C" void * init_module( void )
{
- return new MyModuleFactory;
+ return new MyModuleFactory;
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 436b0f364..aae039738 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -288,7 +288,7 @@ class ModuleSSLGnuTLS : public Module
List[I_OnRequest] = List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUnloadModule] = List[I_OnRehash] = List[I_OnWhois] = List[I_OnPostConnect] = 1;
}
- virtual char* OnRequest(Request* request)
+ virtual char* OnRequest(Request* request)
{
ISHRequest* ISR = (ISHRequest*)request;
if (strcmp("IS_NAME", request->GetId()) == 0)
diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp
index ab40acb46..2677d3088 100644
--- a/src/modules/extra/m_ziplink.cpp
+++ b/src/modules/extra/m_ziplink.cpp
@@ -178,7 +178,7 @@ class ModuleZLib : public Module
}
/* Handle InspSocketHook API requests */
- virtual char* OnRequest(Request* request)
+ virtual char* OnRequest(Request* request)
{
ISHRequest* ISR = (ISHRequest*)request;
if (strcmp("IS_NAME", request->GetId()) == 0)
@@ -392,7 +392,7 @@ class ModuleZLib : public Module
return 0;
}
}
- /* Finish the stream */
+ /* Finish the stream */
for (session->c_stream.avail_out = 1; deflate(&session->c_stream, Z_FINISH) != Z_STREAM_END; session->c_stream.avail_out = 1);
deflateEnd(&session->c_stream);