diff options
| author | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
|---|---|---|
| committer | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
| commit | 2784cd17fc5e0ee4ad0571a6b9e131fa38a93a65 (patch) | |
| tree | 9978409f958f97d4932879c0d65363ec24b799d5 /include | |
| parent | 292e1875246a6398cdc9f04ee91d7bb43dc40b45 (diff) | |
| parent | 03cc9eb5c597e37239debac25a7ed6ad4f4d9411 (diff) | |
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'include')
| -rw-r--r-- | include/services.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/services.h b/include/services.h index 5448d9170..33c35ab51 100644 --- a/include/services.h +++ b/include/services.h @@ -357,12 +357,20 @@ template<typename T, size_t Size = 32> class Flags /*************************************************************************/ +class ConvertException : public CoreException +{ + public: + ConvertException(const Anope::string &reason = "") : CoreException(reason) { } + + virtual ~ConvertException() throw() { } +}; + template<typename T> inline Anope::string stringify(const T &x) { std::ostringstream stream; if (!(stream << x)) - throw CoreException("Stringify fail"); + throw ConvertException("Stringify fail"); return stream.str(); } @@ -374,11 +382,11 @@ template<typename T> inline void convert(const Anope::string &s, T &x, Anope::st char c; bool res = i >> x; if (!res) - throw CoreException("Convert fail"); + throw ConvertException("Convert fail"); if (failIfLeftoverChars) { if (i.get(c)) - throw CoreException("Convert fail"); + throw ConvertException("Convert fail"); } else { @@ -987,6 +995,11 @@ class CoreExport IRCDProto * @param u The user */ virtual void SetAutoIdentificationToken(User *u) { } + + /** Send a channel creation message to the uplink. + * On most TS6 IRCds this is a SJOIN with no nick + */ + virtual void SendChannel(Channel *c, const Anope::string &modes) { } }; class CoreExport IRCdMessage |
