]>
Commit | Line | Data |
---|---|---|
1 | #include "../control/control.h" | |
2 | #include "../nick/nick.h" | |
3 | #include "../channel/channel.h" | |
4 | #include "../lib/version.h" | |
5 | ||
6 | MODULE_VERSION(""); | |
7 | ||
8 | int ho_horse(void *source, int cargc, char **cargv) { | |
9 | nick *sender=(nick *)source; | |
10 | nick *victim; | |
11 | channel *cp; | |
12 | ||
13 | if (cargc<1) | |
14 | return CMD_USAGE; | |
15 | ||
16 | if ((victim=getnickbynick(cargv[0]))!=NULL) { | |
17 | controlreply(victim," _ ___,;;;^"); | |
18 | controlreply(victim," ,;( )__, )~\\|"); | |
19 | controlreply(victim," ;; // '--;"); | |
20 | controlreply(victim," ' ;\\ |"); | |
21 | controlreply(sender,"Gave %s a horse.",victim->nick); | |
22 | } else if ((cp=findchannel(cargv[0]))!=NULL) { | |
23 | controlchanmsg(cp," _ ___,;;;^"); | |
24 | controlchanmsg(cp," ,;( )__, )~\\|"); | |
25 | controlchanmsg(cp," ;; // '--;"); | |
26 | controlchanmsg(cp," ' ;\\ |"); | |
27 | controlreply(sender,"Spammed horse in %s.",cp->index->name->content); | |
28 | } else { | |
29 | controlreply(sender,"Can't find %s.",cargv[0]); | |
30 | } | |
31 | ||
32 | return CMD_OK; | |
33 | } | |
34 | ||
35 | void _init() { | |
36 | registercontrolhelpcmd("horse",NO_OPERED,2,ho_horse,"Usage: horse <target>\nSpams a horse at target."); | |
37 | } | |
38 | ||
39 | void _fini() { | |
40 | deregistercontrolcmd("horse",ho_horse); | |
41 | } | |
42 |