diff options
| author | Adam <Adam@anope.org> | 2010-09-07 18:41:44 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-09-07 18:41:44 -0400 |
| commit | bd94cbc25b27250872ba4e682cf7af36e16a2d25 (patch) | |
| tree | 0ccdfe2e32e132b0f61c62e73fdad2595883bd2a /src/protocol/inspircd12.c | |
| parent | 3a97d196f9744a75a715cf3bc8bd0d36683e4ece (diff) | |
| parent | 22894e9e09bb0e3c76d866a9568d654d73920526 (diff) | |
Merge branch '1.8' of git.sigterm.info:gitroot/anope/anope into 1.8
Diffstat (limited to 'src/protocol/inspircd12.c')
| -rw-r--r-- | src/protocol/inspircd12.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c index 221ec928a..c6262e966 100644 --- a/src/protocol/inspircd12.c +++ b/src/protocol/inspircd12.c @@ -1882,8 +1882,7 @@ int anope_event_whois(char *source, int ac, char **av) int anope_event_capab(char *source, int ac, char **av) { - int argc; - char **argv; + char *argv[6]; CBModeInfo *cbmi; if (strcasecmp(av[0], "START") == 0) { @@ -2248,8 +2247,6 @@ int anope_event_capab(char *source, int ac, char **av) /* Generate a fake capabs parsing call so things like NOQUIT work * fine. It's ugly, but it works.... */ - argc = 6; - argv = scalloc(argc, sizeof(char *)); argv[0] = "NOQUIT"; argv[1] = "SSJ3"; argv[2] = "NICK2"; @@ -2257,7 +2254,16 @@ int anope_event_capab(char *source, int ac, char **av) argv[4] = "TLKEXT"; argv[5] = "UNCONNECT"; - capab_parse(argc, argv); + capab_parse(6, argv); + + /* check defcon */ + if (DefConLevel && !defconParseModeString(DefConChanModes)) + { + send_cmd(TS6SID, "ERROR :Defcon modes failed to validate"); + quitmsg = "Defcon modes failed to validate"; + quitting = 1; + return MOD_CONT; + } /* We have received our CAPAB, now we can introduce our clients. */ init_tertiary(); |
