]>
jfr.im git - irc/quakenet/newserv.git/blob - horse/horse.c
1 #include "../control/control.h"
2 #include "../nick/nick.h"
3 #include "../channel/channel.h"
5 int ho_horse(void *source
, int cargc
, char **cargv
) {
6 nick
*sender
=(nick
*)source
;
11 controlreply(sender
,"Usage: horse <target>");
15 if ((victim
=getnickbynick(cargv
[0]))!=NULL
) {
16 controlreply(victim
," _ ___,;;;^");
17 controlreply(victim
," ,;( )__, )~\\|");
18 controlreply(victim
," ;; // '--;");
19 controlreply(victim
," ' ;\\ |");
20 controlreply(sender
,"Gave %s a horse.",victim
->nick
);
21 } else if ((cp
=findchannel(cargv
[0]))!=NULL
) {
22 controlchanmsg(cp
," _ ___,;;;^");
23 controlchanmsg(cp
," ,;( )__, )~\\|");
24 controlchanmsg(cp
," ;; // '--;");
25 controlchanmsg(cp
," ' ;\\ |");
26 controlreply(sender
,"Spammed horse in %s.",cp
->index
->name
->content
);
28 controlreply(sender
,"Can't find %s.",cargv
[0]);
35 registercontrolcmd("horse",10,2,ho_horse
);
39 deregistercontrolcmd("horse",ho_horse
);