mirror of
https://github.com/anope/anope.git
synced 2026-07-07 05:53:13 +02:00
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
This commit is contained in:
-22
@@ -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
|
||||
|
||||
+16
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user