Created
July 3, 2014 22:24
-
-
Save rhaps0dy/75957c950496c276a6b2 to your computer and use it in GitHub Desktop.
Comments for S3tanta's code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../irc.h" | |
#include "../module.h" | |
#include "../config.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
static char *mod_invokers[1] = {NULL}; /* are you sure you don't want it to be called when "anime" is said? */ | |
static void anime(char **args, enum irc_type type); | |
static Module mod = { | |
"anime", | |
"$0 to make your message just like in your Japanese animations", | |
/* This should be a char **, not a pointer to a function. Besides, mod_anime isn't defined yet. You probably | |
want mod_invokers to be here. This part is a bit overcomplex, I'll change it soon. Tomorrow most likely.*/ | |
mod_anime, | |
/* do_anime isn't defined either, I assume you mean anime (the function you defined above) */ | |
do_anime, | |
/* you really want at least three arguments to be able to call on invokers. Again, this part will be changed | |
when the nested commands come, which won't be tomorrow but in a week or so. */ | |
1, | |
/* you only want it called when someone joins? */ | |
T_JOIN, | |
NULL | |
}; | |
static void | |
give_op(char **args, enum irc_type type) | |
{ | |
char buf[IRC_MSG_LEN]; | |
(void) type; | |
/* pls no undefined things ;_; */ | |
sprintf("%s, %s", anime_nick, message); | |
} | |
void | |
mod_anime(void) | |
{ | |
mod_add(&mod); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment