mirror of
https://github.com/anope/anope.git
synced 2026-07-03 19:03:14 +02:00
Added m_xmlrpc and m_xmlrpc main, which allows remote programs to execute
remote RPC calls to Anope in realtime and receive responses
This commit is contained in:
+3
-3
@@ -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);
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
+5
-10
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user