summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.c8
-rw-r--r--src/init.c4
-rw-r--r--src/ircd.c47
-rw-r--r--src/main.c40
-rw-r--r--src/process.c10
5 files changed, 55 insertions, 54 deletions
diff --git a/src/channels.c b/src/channels.c
index ca47792ad..b2f31ae5a 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, (ac >= 2 ? 4 : 3), EVENT_START, user->nick,
- channame, (ac >= 2 ? av[1] : ""));
+ 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, (ac >= 2 ? 4 : 3), EVENT_STOP, user->nick,
- channame, (ac >= 2 ? av[1] : ""));
+ send_event(EVENT_PART_CHANNEL, (ac >= 2 ? 4 : 3), EVENT_STOP,
+ user->nick, channame, (ac >= 2 ? av[1] : ""));
free(channame);
}
}
diff --git a/src/init.c b/src/init.c
index 748b6c054..e0dfe8086 100644
--- a/src/init.c
+++ b/src/init.c
@@ -323,8 +323,8 @@ static int parse_options(int ac, char **av)
forceload = 1;
} else if (strcmp(s, "nothird") == 0) {
nothird = 1;
- } else if (strcmp(s, "protocoldebug") == 0) {
- protocoldebug = 1;
+ } else if (strcmp(s, "protocoldebug") == 0) {
+ protocoldebug = 1;
} else if (strcmp(s, "support") == 0) {
nofork = 1;
debug++;
diff --git a/src/ircd.c b/src/ircd.c
index ce4840301..30a3d6b17 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -254,32 +254,27 @@ 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, ...)
+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;
char buf[BUFSIZE];
diff --git a/src/main.c b/src/main.c
index 524bf3a88..a5d18059b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -398,12 +398,14 @@ void sighandler(int signum)
case -18:
snprintf(buf, sizeof(buf), "saving %s", ExceptionDBName);
break;
- case -19:
- snprintf(buf, sizeof(buf), "Sending event %s %s", EVENT_DB_SAVING, EVENT_START);
- break;
- case -20:
- snprintf(buf, sizeof(buf), "Sending event %s %s", EVENT_DB_SAVING, EVENT_STOP);
- break;
+ case -19:
+ snprintf(buf, sizeof(buf), "Sending event %s %s",
+ EVENT_DB_SAVING, EVENT_START);
+ break;
+ case -20:
+ snprintf(buf, sizeof(buf), "Sending event %s %s",
+ EVENT_DB_SAVING, EVENT_STOP);
+ break;
case -21:
snprintf(buf, sizeof(buf), "expiring nicknames");
break;
@@ -422,15 +424,17 @@ void sighandler(int signum)
case -28:
snprintf(buf, sizeof(buf), "expiring SQLINEs");
break;
- case -29:
- snprintf(buf, sizeof(buf), "expiring Exceptions");
- break;
- case -30:
- snprintf(buf, sizeof(buf), "Sending event %s %s", EVENT_DB_EXPIRE, EVENT_START);
- break;
- case -31:
- snprintf(buf, sizeof(buf), "Sending event %s %s", EVENT_DB_EXPIRE, EVENT_STOP);
- break;
+ case -29:
+ snprintf(buf, sizeof(buf), "expiring Exceptions");
+ break;
+ case -30:
+ snprintf(buf, sizeof(buf), "Sending event %s %s",
+ EVENT_DB_EXPIRE, EVENT_START);
+ break;
+ case -31:
+ snprintf(buf, sizeof(buf), "Sending event %s %s",
+ EVENT_DB_EXPIRE, EVENT_STOP);
+ break;
default:
snprintf(buf, sizeof(buf), "waiting=%d", waiting);
}
@@ -669,6 +673,10 @@ void do_backtrace(int show_segheader)
alog("Backtrace: not available on this platform");
#endif
#else
- char *winver; winver = GetWindowsVersion(); alog("Backtrace: not available on Windows"); alog("Running %S", winver); free(winver);
+ char *winver;
+ winver = GetWindowsVersion();
+ alog("Backtrace: not available on Windows");
+ alog("Running %S", winver);
+ free(winver);
#endif
}
diff --git a/src/process.c b/src/process.c
index f002d9f85..a89804992 100644
--- a/src/process.c
+++ b/src/process.c
@@ -232,12 +232,10 @@ void process()
s = buf + strlen(buf);
strscpy(cmd, buf, sizeof(cmd));
ac = split_buf(s, &av, 1);
-
- if (protocoldebug) {
- protocol_debug(source, cmd, ac, av);
- }
-
- if (mod_current_buffer) {
+ if (protocoldebug) {
+ protocol_debug(source, cmd, ac, av);
+ }
+ if (mod_current_buffer) {
free(mod_current_buffer);
}
/* fix to moduleGetLastBuffer() bug 296 */