mirror of
https://github.com/anope/anope.git
synced 2026-06-28 20:36:38 +02:00
Remove unused anope_set_mod_current_buffer(), noted by Naram.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1280 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -605,7 +605,6 @@ E int servernum;
|
||||
|
||||
/**** ircd.c ****/
|
||||
E void pmodule_ircd_proto(IRCDProtoNew *);
|
||||
E void pmodule_set_mod_current_buffer(void (*func) (int ac, char **av));
|
||||
E void pmodule_cmd_372(void (*func) (const char *source, const char *msg));
|
||||
E void pmodule_cmd_372_error(void (*func) (const char *source));
|
||||
E void pmodule_cmd_375(void (*func) (const char *source));
|
||||
@@ -1142,8 +1141,6 @@ E void notice(char *source, const char *dest, const char *fmt, ...);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
E int anope_set_mod_current_buffer(int ac, char **av);
|
||||
|
||||
E void anope_cmd_211(const char *fmt, ...); /* 211 */
|
||||
E void anope_cmd_219(const char *source, const char *who); /* 219 */
|
||||
E void anope_cmd_242(const char *fmt, ...); /* 242 */
|
||||
|
||||
@@ -590,12 +590,6 @@ void anope_cmd_ctcp(const char *source, const char *dest, const char *fmt, ...)
|
||||
/**
|
||||
* Set routines for modules to set the prefered function for dealing with things.
|
||||
**/
|
||||
|
||||
void pmodule_set_mod_current_buffer(void (*func) (int ac, char **av))
|
||||
{
|
||||
ircdproto.ircd_set_mod_current_buffer = func;
|
||||
}
|
||||
|
||||
void pmodule_cmd_372(void (*func) (const char *source, const char *msg))
|
||||
{
|
||||
ircdproto.ircd_cmd_372 = func;
|
||||
|
||||
+12
-29
@@ -351,40 +351,23 @@ void process()
|
||||
doCleanBuffer((char *) buf);
|
||||
|
||||
/* Split the buffer into pieces. */
|
||||
if (*buf == ':') {
|
||||
s = strpbrk(buf, " ");
|
||||
if (!s)
|
||||
return;
|
||||
return;
|
||||
*s = 0;
|
||||
while (isspace(*++s));
|
||||
strscpy(source, buf + 1, sizeof(source));
|
||||
memmove(buf, s, strlen(s) + 1);
|
||||
} else {
|
||||
*source = 0;
|
||||
}
|
||||
if (!*buf)
|
||||
return;
|
||||
s = strpbrk(buf, " ");
|
||||
if (s) {
|
||||
*s = 0;
|
||||
while (isspace(*++s));
|
||||
} else
|
||||
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) {
|
||||
free(mod_current_buffer);
|
||||
}
|
||||
/* fix to moduleGetLastBuffer() bug 296 */
|
||||
/* old logic was that since its meant for PRIVMSG that we would get
|
||||
the NICK as AV[0] and the rest would be in av[1], however on Bahamut
|
||||
*s = 0;
|
||||
while (isspace(*++s));
|
||||
strscpy(source, buf + 1, sizeof(source));
|
||||
memmove(buf, s, strlen(s) + 1);
|
||||
} else {
|
||||
*source = 0;
|
||||
to the NICK and thus AV[0] is the message. The new logic is to check
|
||||
}
|
||||
if (!*buf)
|
||||
return;
|
||||
value from AV[1] else just assign av[0] - TSL */
|
||||
s = strpbrk(buf, " ");
|
||||
if (s) {
|
||||
*s = 0;
|
||||
while (isspace(*++s));
|
||||
} else
|
||||
s = buf + strlen(buf);
|
||||
strscpy(cmd, buf, sizeof(cmd));
|
||||
|
||||
Reference in New Issue
Block a user