]> jfr.im git - irc/quakenet/newserv.git/blame - horse/horse.c
CHANSERV: remove E type escapes
[irc/quakenet/newserv.git] / horse / horse.c
CommitLineData
c86edd1d
Q
1#include "../control/control.h"
2#include "../nick/nick.h"
3#include "../channel/channel.h"
7f32dbdf
P
4#include "../lib/version.h"
5
6MODULE_VERSION("");
c86edd1d
Q
7
8int ho_horse(void *source, int cargc, char **cargv) {
9 nick *sender=(nick *)source;
10 nick *victim;
11 channel *cp;
12
3e3692bf
CP
13 if (cargc<1)
14 return CMD_USAGE;
c86edd1d
Q
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
35void _init() {
3e3692bf 36 registercontrolhelpcmd("horse",NO_OPERED,2,ho_horse,"Usage: horse <target>\nSpams a horse at target.");
c86edd1d
Q
37}
38
39void _fini() {
40 deregistercontrolcmd("horse",ho_horse);
41}
42