summaryrefslogtreecommitdiff
path: root/plugins/alt/autoghost.cpp
blob: 5e57d57baa3da9cc913a647fcee09c2425e6c5c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <string>

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;
		}
	}
}