diff options
author | Adam <Adam@anope.org> | 2010-10-04 13:59:30 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-10-04 13:59:30 -0400 |
commit | cf98cd3e06e4de0f9902824b0ef8239e947c5b6a (patch) | |
tree | fad06aca79be531d306eb8bf096e0160d6323f9c /src/servers.cpp | |
parent | 632f8df76b31f1300e7ac72890567834eac5511e (diff) |
Changed the protocol handling system to use a vector of strings instead of C style arrays. Burned the old process/split_buf/memory.c code
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index d7517405a..fcb1406c9 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -353,18 +353,17 @@ void do_server(const Anope::string &source, const Anope::string &servername, uns /** * Handle removing the server from the Server struct - * @param source Name of the server leaving - * @param ac Number of arguments in av - * @param av Agruments as part of the SQUIT + * @param source Name of the server sending the squit + * @param server Name of the server leaving * @return void */ -void do_squit(const Anope::string &source, int ac, const char **av) +void do_squit(const Anope::string &source, const Anope::string &server) { - Server *s = Server::Find(av[0]); + Server *s = Server::Find(server); if (!s) { - Log() << "SQUIT for nonexistent server (" << av[0] << ")!!"; + Log() << "SQUIT for nonexistent server " << server; return; } @@ -395,16 +394,14 @@ void do_squit(const Anope::string &source, int ac, const char **av) /*************************************************************************/ /** Handle parsing the CAPAB/PROTOCTL messages - * @param ac Number of args - * @param av Args */ -void CapabParse(int ac, const char **av) +void CapabParse(const std::vector<Anope::string> ¶ms) { - for (int i = 0; i < ac; ++i) + for (unsigned i = 0; i < params.size(); ++i) { for (unsigned j = 0; !Capab_Info[j].Token.empty(); ++j) { - if (Capab_Info[j].Token.equals_ci(av[i])) + if (Capab_Info[j].Token.equals_ci(params[i])) { Capab.SetFlag(Capab_Info[j].Flag); break; |