diff options
author | Adam <Adam@anope.org> | 2010-11-06 11:19:09 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:30:14 -0500 |
commit | 8fbe36635c8acae23d7c0879aaa347265b96408d (patch) | |
tree | 898ff9790d763e91ccb24c5fe28da5e575499d7b /src | |
parent | 5cd4fefb4c3c9e9a723c2b6b2e52859c5c7bb49e (diff) |
Added m_xmlrpc and m_xmlrpc main, which allows remote programs to execute
remote RPC calls to Anope in realtime and receive responses
Diffstat (limited to 'src')
-rw-r--r-- | src/language.cpp | 6 | ||||
-rw-r--r-- | src/misc.cpp | 4 | ||||
-rw-r--r-- | src/users.cpp | 15 |
3 files changed, 10 insertions, 15 deletions
diff --git a/src/language.cpp b/src/language.cpp index ce53c0fe6..7636b563b 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -48,16 +48,16 @@ const Anope::string GetString(LanguageString string) return GetString("anope", "", language_strings[string]); } -const Anope::string GetString(const NickCore *nc, LanguageString string) +const Anope::string GetString(NickCore *nc, LanguageString string) { return GetString(nc ? nc->language : "", string); } -const Anope::string GetString(const User *u, LanguageString string) +const Anope::string GetString(User *u, LanguageString string) { if (!u) return GetString(string); - const NickCore *nc = u->Account(); + NickCore *nc = u->Account(); NickAlias *na = NULL; if (!nc) na = findnick(u->nick); diff --git a/src/misc.cpp b/src/misc.cpp index 9bb323b3d..3db15962b 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -304,7 +304,7 @@ time_t dotime(const Anope::string &s) * @param seconds time in seconds * @return buffer */ -Anope::string duration(const NickCore *nc, time_t seconds) +Anope::string duration(NickCore *nc, time_t seconds) { /* We first calculate everything */ int days = seconds / 86400; @@ -365,7 +365,7 @@ Anope::string do_strftime(const time_t &t) * @param seconds time in seconds * @return buffer */ -Anope::string expire_left(const NickCore *nc, time_t expires) +Anope::string expire_left(NickCore *nc, time_t expires) { if (!expires) return GetString(nc, NO_EXPIRE); diff --git a/src/users.cpp b/src/users.cpp index 9aa67b174..c38aee472 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -216,7 +216,7 @@ User::~User() Log(LOG_DEBUG_2) << "User::~User() done"; } -void User::SendMessage(const Anope::string &source, const char *fmt, ...) const +void User::SendMessage(const Anope::string &source, const char *fmt, ...) { va_list args; char buf[BUFSIZE] = ""; @@ -232,7 +232,7 @@ void User::SendMessage(const Anope::string &source, const char *fmt, ...) const } } -void User::SendMessage(const Anope::string &source, const Anope::string &msg) const +void User::SendMessage(const Anope::string &source, const Anope::string &msg) { /* Send privmsg instead of notice if: * - UsePrivmsg is enabled @@ -245,7 +245,7 @@ void User::SendMessage(const Anope::string &source, const Anope::string &msg) co ircdproto->SendNotice(findbot(source), this->nick, "%s", msg.c_str()); } -void User::SendMessage(BotInfo *source, LanguageString message, ...) const +void User::SendMessage(BotInfo *source, LanguageString message, ...) { if (!source) { @@ -385,16 +385,11 @@ NickCore *User::Account() return this->nc; } -const NickCore *User::Account() const -{ - return this->nc; -} - /** Check if the user is identified for their nick * @param CheckNick True to check if the user is identified to the nickname they are on too * @return true or false */ -bool User::IsIdentified(bool CheckNick) const +bool User::IsIdentified(bool CheckNick) { if (CheckNick && this->nc) { @@ -413,7 +408,7 @@ bool User::IsIdentified(bool CheckNick) const * @param CheckSecure Only returns true if the user has secure off * @return true or false */ -bool User::IsRecognized(bool CheckSecure) const +bool User::IsRecognized(bool CheckSecure) { if (CheckSecure && OnAccess) { |