summaryrefslogtreecommitdiff
path: root/src/protocol/plexus.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-10-01 21:30:54 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-10-01 21:30:54 +0000
commitd486661031bd66feaa7ae76afc2cd7ed5a3cb15b (patch)
tree6e80fd0b67c1d9c6ac82e408cc7043f35c7c8985 /src/protocol/plexus.c
parentf835ac55cbc35e011823240e93b91426b060fa7a (diff)
BUILD : 1.7.11 (907) BUGS : NOTES : Fixed capab parsing on hybrid/plexus/ratbox and a typo in example.conf
git-svn-id: svn://svn.anope.org/anope/trunk@907 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@653 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/plexus.c')
-rw-r--r--src/protocol/plexus.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/protocol/plexus.c b/src/protocol/plexus.c
index 4429b757e..0e16b2937 100644
--- a/src/protocol/plexus.c
+++ b/src/protocol/plexus.c
@@ -1481,7 +1481,34 @@ plexus_cmd_351 (char *source)
int
anope_event_capab (char *source, int ac, char **av)
{
- capab_parse (ac, av);
+ int argvsize = 8;
+ int argc;
+ char **argv;
+ char *str;
+
+ if (ac < 1)
+ return MOD_CONT;
+
+ /* We get the params as one arg, we should split it for capab_parse */
+ argv = scalloc(argvsize, sizeof(char *));
+ argc = 0;
+ while ((str = myStrGetToken(av[0], ' ', argc))) {
+ if (argc == argvsize) {
+ argvsize += 8;
+ argv = srealloc(argv, argvsize * sizeof(char *));
+ }
+ argv[argc] = str;
+ argc++;
+ }
+
+ capab_parse(argc, argv);
+
+ /* Free our built ac/av */
+ for (argvsize = 0; argvsize < argc; argvsize++) {
+ free(argv[argvsize]);
+ }
+ free(argv);
+
return MOD_CONT;
}