~yandere-dev/yandere/0.3

1 by dhammond
Initial Loli and Yandere IRC game commits.
1
<?php
2
	
3
	require_once (dirname(__FILE__).'/classes/yandere-game.php');
4
	require_once (dirname(__FILE__).'/classes/yandere-user.php');
25 by Luke Dashjr
making progress on themable branch
5
	require_once (dirname(__FILE__).'/classes/yandere-theme.php');
1 by dhammond
Initial Loli and Yandere IRC game commits.
6
	
17.2.13 by Luke Dashjr
oops, fix that method_exists->function_exists for old Pharo compat stuff
7
	if (!function_exists('add_handler'))
87 by Luke Dashjr
compatibility with old Pharo handles
8
	{
9
		// Newer Pharo handler system renames:
10
		//     handle => hook
11
		//     add_handler => handle
12
		function add_handler ($handle, $func)
13
		{
14
			return handle($handle, $func);
15
		}
16
	}
17
	
1 by dhammond
Initial Loli and Yandere IRC game commits.
18
	function irc_yandere_handler ($args)
19
	{
20
		list ($server, $param_str, $params) = $args;
21
		
22
		$server->call('yandere/main', $params);
23
	}
24
	
87 by Luke Dashjr
compatibility with old Pharo handles
25
	add_handler('irc-command-yandere', 'irc_yandere_handler');
26
	add_handler('irc-command-yandre', 'irc_yandere_handler');
27
	add_handler('irc-command-yandree', 'irc_yandere_handler');
1 by dhammond
Initial Loli and Yandere IRC game commits.
28
	
8 by dhammond
Miscellaneous major bug fixes.
29
	// Command shortcuts.
30
	
31
	function irc_yandere_guard_handler ($args)
32
	{
33
		list ($server, $param_str, $params) = $args;
34
		
9 by dhammond
Miscellaneous major bug fixes.
35
		$server->call('yandere/main', array_merge(array ('guard'), $params));
8 by dhammond
Miscellaneous major bug fixes.
36
	}
37
	
87 by Luke Dashjr
compatibility with old Pharo handles
38
	add_handler('irc-command-guard', 'irc_yandere_guard_handler');
8 by dhammond
Miscellaneous major bug fixes.
39
	
17 by
Yay updates.
40
	function irc_yandere_hide_handler ($args)
41
	{
42
		list ($server, $param_str, $params) = $args;
43
		
44
		$server->call('yandere/main', array ('hide'));
45
	}
46
	
87 by Luke Dashjr
compatibility with old Pharo handles
47
	add_handler('irc-command-hide', 'irc_yandere_hide_handler');
17 by
Yay updates.
48
	
8 by dhammond
Miscellaneous major bug fixes.
49
	function irc_yandere_kill_handler ($args)
50
	{
51
		list ($server, $param_str, $params) = $args;
52
		
9 by dhammond
Miscellaneous major bug fixes.
53
		$server->call('yandere/main', array_merge(array ('kill'), $params));
8 by dhammond
Miscellaneous major bug fixes.
54
	}
55
	
87 by Luke Dashjr
compatibility with old Pharo handles
56
	add_handler('irc-command-kill', 'irc_yandere_kill_handler');
8 by dhammond
Miscellaneous major bug fixes.
57
	
17 by
Yay updates.
58
	function irc_yandere_reveal_handler ($args)
59
	{
60
		list ($server, $param_str, $params) = $args;
61
		
62
		$server->call('yandere/main', array ('reveal'));
63
	}
64
	
87 by Luke Dashjr
compatibility with old Pharo handles
65
	add_handler('irc-command-reveal', 'irc_yandere_reveal_handler');
17 by
Yay updates.
66
	
8 by dhammond
Miscellaneous major bug fixes.
67
	function irc_yandere_spy_handler ($args)
68
	{
69
		list ($server, $param_str, $params) = $args;
70
		
9 by dhammond
Miscellaneous major bug fixes.
71
		$server->call('yandere/main', array_merge(array ('spy'), $params));
8 by dhammond
Miscellaneous major bug fixes.
72
	}
73
	
87 by Luke Dashjr
compatibility with old Pharo handles
74
	add_handler('irc-command-spy', 'irc_yandere_spy_handler');
8 by dhammond
Miscellaneous major bug fixes.
75
	
17 by
Yay updates.
76
	function irc_yandere_stalk_handler ($args)
77
	{
78
		list ($server, $param_str, $params) = $args;
79
		
80
		$server->call('yandere/main', array_merge(array ('stalk'), $params));
81
	}
82
	
87 by Luke Dashjr
compatibility with old Pharo handles
83
	add_handler('irc-command-stalk', 'irc_yandere_stalk_handler');
17 by
Yay updates.
84
	
8 by dhammond
Miscellaneous major bug fixes.
85
	function irc_yandere_vote_handler ($args)
86
	{
87
		list ($server, $param_str, $params) = $args;
88
		
9 by dhammond
Miscellaneous major bug fixes.
89
		$server->call('yandere/main', array_merge(array ('vote'), $params));
8 by dhammond
Miscellaneous major bug fixes.
90
	}
91
	
87 by Luke Dashjr
compatibility with old Pharo handles
92
	add_handler('irc-command-vote', 'irc_yandere_vote_handler');
8 by dhammond
Miscellaneous major bug fixes.
93
	
12 by dhammond
Batch updates.
94
	function irc_yandere_abstain_handler ($args)
95
	{
96
		list ($server, $param_str, $params) = $args;
97
		
98
		$server->call('yandere/main', array_merge(array ('abstain'), $params));
99
	}
100
	
87 by Luke Dashjr
compatibility with old Pharo handles
101
	add_handler('irc-command-abstain', 'irc_yandere_abstain_handler');
12 by dhammond
Batch updates.
102
	
103
	function irc_yandere_unvote_handler ($args)
104
	{
105
		list ($server, $param_str, $params) = $args;
106
		
107
		$server->call('yandere/main', array_merge(array ('unvote'), $params));
108
	}
109
	
87 by Luke Dashjr
compatibility with old Pharo handles
110
	add_handler('irc-command-unvote', 'irc_yandere_unvote_handler');
12 by dhammond
Batch updates.
111
	
1 by dhammond
Initial Loli and Yandere IRC game commits.
112
?>