diff options
author | Adam <Adam@anope.org> | 2010-12-06 17:06:57 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:03 -0500 |
commit | aed53dbb47822a79eb9a6b61095ad04ec3d67818 (patch) | |
tree | 72d3210b5609ea2163854d14ec7fb2f48d8b4d12 /src/servers.cpp | |
parent | a507816701d136a1c22d2f6779d811840d61577c (diff) |
Cleaned up some things, made the protocol modules use some basic inheritance to cut back on their code duplication. More work can be done in the future to remove even more of it.
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index f7bef6ec7..dc5dc4cf0 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -349,67 +349,6 @@ 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 sending the squit - * @param server Name of the server leaving - * @return void - */ -void do_squit(const Anope::string &source, const Anope::string &server) -{ - Server *s = Server::Find(server); - - if (!s) - { - Log() << "SQUIT for nonexistent server " << server; - return; - } - - FOREACH_MOD(I_OnServerQuit, OnServerQuit(s)); - - Anope::string buf; - /* If this is a juped server, send a nice global to inform the online - * opers that we received it. - */ - if (s->HasFlag(SERVER_JUPED)) - { - buf = "Received SQUIT for juped server " + s->GetName(); - ircdproto->SendGlobops(OperServ, "%s", buf.c_str()); - } - - buf = s->GetName() + " " + s->GetUplink()->GetName(); - - if (s->GetUplink() == Me && Capab.HasFlag(CAPAB_UNCONNECT)) - { - Log(LOG_DEBUG) << "Sending UNCONNECT SQUIT for " << s->GetName(); - /* need to fix */ - ircdproto->SendSquit(s->GetName(), buf); - } - - s->Delete(buf); -} - -/*************************************************************************/ - -/** Handle parsing the CAPAB/PROTOCTL messages - */ -void CapabParse(const std::vector<Anope::string> ¶ms) -{ - 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(params[i])) - { - Capab.SetFlag(Capab_Info[j].Flag); - break; - } - } - } -} - -/*************************************************************************/ - /* TS6 UID generator common code. * * Derived from atheme-services, uid.c (hg 2954:116d46894b4c). |