summaryrefslogtreecommitdiffstats
path: root/doc/scriptexamples/relay.kvs
blob: d86898668b07776066a614c1cec73da796b88237 (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
29
30
31
32
33
# Relay bot (unfinished for now :D)
# TODO : finish me!


alias (relay_start)
{
	# Usage : relay_start <window1> <window2>
}


alias (relay_stop)
{
	# Usage : relay_stop <window1> <window2>
}

event (OnChannelPrivmsg)
{
	%target = %RelayTarget[$window];
	if("%target" != "")
	{
		msg -w=%t $target <$0> $1-
	}
}

alias (relay_uninstall)
{
	timer -s (relay_uninstall_timer,0)
	{
		alias(relay_start){}
		alias(relay_stop){}
		alias(relay_uninstall){}
	}
}