diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 20:01:23 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 20:01:23 +0000 |
commit | 3872380d8c14cd68176f990aca0fedb32c6e2d96 (patch) | |
tree | dbcdce625a31fcb582ba1f7d8c6831dbbd166fac | |
parent | 5d127f021d47c1a605b1c6c4cd94c9038ff46d99 (diff) |
Merge protocol_debug() with the only place it's actually called.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1290 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | include/extern.h | 1 | ||||
-rw-r--r-- | src/misc.c | 22 | ||||
-rw-r--r-- | src/process.c | 19 |
3 files changed, 16 insertions, 26 deletions
diff --git a/include/extern.h b/include/extern.h index 26ec8b538..be6d56681 100644 --- a/include/extern.h +++ b/include/extern.h @@ -772,7 +772,6 @@ E int match_wild_nocase(const char *pattern, const char *str); E int dotime(const char *s); E char *duration(NickAlias * na, char *buf, int bufsize, time_t seconds); E char *expire_left(NickAlias * na, char *buf, int len, time_t expires); -E void protocol_debug(char *source, char *cmd, int argc, const char **argv); E int doValidHost(const char *host, int type); typedef int (*range_callback_t) (User * u, int num, va_list args); diff --git a/src/misc.c b/src/misc.c index 79182eafb..7b226c148 100644 --- a/src/misc.c +++ b/src/misc.c @@ -787,28 +787,6 @@ char *myStrSubString(const char *src, int start, int end) /*************************************************************************/ -void protocol_debug(char *source, char *cmd, int argc, const char **argv) -{ - int i; - - if (protocoldebug) { - if (source) - alog("debug: Source %s", source); - if (cmd) - alog("debug: Token %s", cmd); - if (argc) { - for (i = 0; i < argc; i++) { - alog("debug: av[%d] = %s", i, argv[i]); - } - } else { - alog("debug: av[0] = NULL"); - } - } - return; -} - -/*************************************************************************/ - /** * Clean up the buffer for extra spaces * @param str to clean up diff --git a/src/process.c b/src/process.c index 8e4201c58..e75b444bc 100644 --- a/src/process.c +++ b/src/process.c @@ -372,9 +372,22 @@ 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 (protocoldebug) + { + if (*source) + alog("debug: Source %s", source); + if (*cmd) + alog("debug: Token %s", cmd); + if (ac) + { + int i; + for (i = 0; i < ac; i++) + alog("debug: av[%d] = %s", i, av[i]); + } + else + alog("debug: av[0] = NULL"); + } if (mod_current_buffer) { free(mod_current_buffer); |