diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 8 | ||||
-rw-r--r-- | src/ircd.c | 25 | ||||
-rw-r--r-- | src/modules.c | 12 |
3 files changed, 35 insertions, 10 deletions
diff --git a/src/channels.c b/src/channels.c index f174eb54f..bce64bd4c 100644 --- a/src/channels.c +++ b/src/channels.c @@ -670,8 +670,8 @@ void do_part(const char *source, int ac, char **av) return; } channame = sstrdup(c->chan->name); - send_event(EVENT_PART_CHANNEL, 3, EVENT_START, user->nick, - channame); + send_event(EVENT_PART_CHANNEL, (ac >= 2 ? 4 : 3), EVENT_START, user->nick,
+ channame, (ac >= 2 ? av[1] : "")); chan_deluser(user, c->chan); if (c->next) @@ -682,8 +682,8 @@ void do_part(const char *source, int ac, char **av) user->chans = c->next; free(c); - send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick, - channame); + send_event(EVENT_PART_CHANNEL, (ac >= 2 ? 4 : 3), EVENT_STOP, user->nick,
+ channame, (ac >= 2 ? av[1] : "")); free(channame); } } diff --git a/src/ircd.c b/src/ircd.c index de85c05de..ce4840301 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -254,6 +254,31 @@ void anope_cmd_notice2(char *source, char *dest, char *msg) ircdproto.ircd_cmd_notice2(source, dest, msg); } +void anope_cmd_action(char *source, char *dest, const char *fmt, ...)
+{
+ va_list args;
+ char buf[BUFSIZE];
+ char actionbuf[BUFSIZE];
+
+ *buf = '\0';
+ *actionbuf = '\0';
+
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ } else {
+ return;
+ }
+
+ if (!buf) {
+ return;
+ }
+ snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
+ ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
+}
+ + void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...) { va_list args; diff --git a/src/modules.c b/src/modules.c index ba93f317e..b8aff99cc 100644 --- a/src/modules.c +++ b/src/modules.c @@ -584,17 +584,17 @@ int loadModule(Module * m, User * u) return MOD_ERR_NOLOAD; } if (func) { - version = (int (*)())ano_modsym(m->handle,"getAnopeBuildVersion"); + version = (int (*)())ano_modsym(m->handle,"getAnopeBuildVersion");
if (version) {
if (version() >= VERSION_BUILD ) {
if(debug) {
- alog("Module %s compiled against current or newer anope revision %d, this is %d",m->name,version(),VERSION_BUILD);
+ alog("Module %s compiled against current or newer anope revision %d, this is %d",m->name,version(),VERSION_BUILD);
}
- } else { - ano_modclose(m->handle); + } else {
+ alog("Module %s is compiled against an old version of anope (%d) current is %d", m->name, version(), VERSION_BUILD); + alog("Rebuild module %s against the current version to resolve this error", m->name); + ano_modclose(m->handle);
ano_modclearerr();
- alog("Module %s is compiled against an old version of anope (%d) current is %d", m->name, version(), VERSION_BUILD);
- alog("Rebuild module %s against the current version to resolve this error", m->name);
return MOD_ERR_NOLOAD;
}
} else {
|