From 0d20c4770350f30cfa5563c913464a37fdf9a067 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Dec 2010 19:41:13 -0500 Subject: Don't send SXLines until after we start bursting with our uplink --- include/operserv.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/operserv.h b/include/operserv.h index 2711520cd..8bac11e76 100644 --- a/include/operserv.h +++ b/include/operserv.h @@ -97,6 +97,10 @@ class CoreExport XLineManager */ static std::pair CheckAll(User *u); + /** Called on burst when all of our XLines should be bursted to the uplink + */ + static void Burst(); + /** Get the number of XLines in this XLineManager * @return The number of XLines */ @@ -176,6 +180,10 @@ class CoreExport XLineManager * @param x The xline */ virtual void OnExpire(XLine *x); + + /** Called to send an XLine to the IRCd + */ + virtual void Send(XLine *x) = 0; }; /* This is for AKILLS */ @@ -189,6 +197,8 @@ class SGLineManager : public XLineManager void OnMatch(User *u, XLine *x); void OnExpire(XLine *x); + + void Send(XLine *x); }; class SNLineManager : public XLineManager @@ -201,6 +211,8 @@ class SNLineManager : public XLineManager void OnMatch(User *u, XLine *x); void OnExpire(XLine *x); + + void Send(XLine *x); }; class SQLineManager : public XLineManager @@ -214,6 +226,8 @@ class SQLineManager : public XLineManager void OnExpire(XLine *x); + void Send(XLine *x); + static bool Check(Channel *c); }; @@ -227,6 +241,8 @@ class SZLineManager : public XLineManager void OnMatch(User *u, XLine *x); void OnExpire(XLine *x); + + void Send(XLine *x); }; #endif // OPERSERV_H -- cgit From 21125cf2cb0dc5f80f9f796fe4c222c36ba2fcc4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Dec 2010 19:53:32 -0500 Subject: Made the version generator code work right when we are on a tag because git describe just gives the tag name and nothing else. --- include/version.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/version.cpp b/include/version.cpp index ae3ee883e..9b8f38c45 100644 --- a/include/version.cpp +++ b/include/version.cpp @@ -54,12 +54,19 @@ int main(int argc, char *argv[]) std::string version_build = "#define VERSION_BUILD 1"; std::string build = "#define BUILD 1"; + std::string version_extra; if (fd.is_open()) { while (getline(fd, filebuf)) { if (!filebuf.find("#define VERSION_BUILD")) version_build = filebuf; + else if (!filebuf.find("#define VERSION_EXTRA")) + { + size_t q = filebuf.find('"'); + + version_extra = filebuf.substr(q + 1, filebuf.length() - q - 2); + } else if (!filebuf.find("#define BUILD")) { size_t tab = filebuf.find(' '); @@ -89,7 +96,7 @@ int main(int argc, char *argv[]) for (std::list >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it) { if (it->first == "EXTRA") - fd << "#define VERSION_EXTRA \"" << it->second << "\"" << std::endl; + fd << "#define VERSION_EXTRA \"" << (!version_extra.empty() ? version_extra : "") << it->second << "\"" << std::endl; else fd << "#define VERSION_" << it->first << " " << it->second << std::endl; } -- cgit