From dacd393fefeabafd1306533dd6c5a56e0ab347cc Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 27 Feb 2011 18:48:35 +0100 Subject: Initial commit --- plugins/alt/autoghost.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/alt/autoghost.cpp (limited to 'plugins/alt/autoghost.cpp') diff --git a/plugins/alt/autoghost.cpp b/plugins/alt/autoghost.cpp new file mode 100644 index 0000000..5e57d57 --- /dev/null +++ b/plugins/alt/autoghost.cpp @@ -0,0 +1,28 @@ +#include +#include + +using namespace std; + +#include "../TPluginParentLight.h" +#include "../mytypes.h" +#include "../myfuncs.h" + +extern "C" void init(int* csize, int* conndefault, int* chandefault, int* sessdefault) +{ + *csize=0; *conndefault=PFLAGS_EXEC_ONANYEVENT | PFLAGS_EXEC_ONCREATE; *chandefault=0; *sessdefault=0; +} + +extern "C" void autoghost (plugincontext* context, ircmessage msg, TPluginParentLight* parent, int reason) +{ + //if (reason&PFLAGS_EXEC_ONANYEVENT) + // cout << msg.origin << ": " << msg.command << " " << msg.params << ": " << msg.content << endl; + cout << "connect YAY!" << reason << endl; + + if (reason&PFLAGS_EXEC_ONCREATE) + { + if (lcase(parent->get_ournick())!="drunkenman") + { + cout << "hey!" << endl; + } + } +} -- cgit v1.2.1