diff options
author | Adam <Adam@anope.org> | 2013-05-18 14:26:18 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-18 14:26:18 -0400 |
commit | 14dc142a9260f6f7f42864df0db18f266466af61 (patch) | |
tree | 0303da16f44abb86d13f582ea3d924021f86681f /src | |
parent | 51b7d53108a01fcd0854fe9d602fee330339d4d3 (diff) |
Add botserv bot usermode config option
Diffstat (limited to 'src')
-rw-r--r-- | src/bots.cpp | 4 | ||||
-rw-r--r-- | src/users.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index 332bd151d..37babbb5f 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -32,6 +32,8 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A (*BotListByNick)[this->nick] = this; if (!this->uid.empty()) (*BotListByUID)[this->uid] = this; + + FOREACH_MOD(I_OnCreateBot, OnCreateBot(this)); // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) @@ -49,6 +51,8 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A BotInfo::~BotInfo() { + FOREACH_MOD(I_OnDelBot, OnDelBot(this)); + // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) { diff --git a/src/users.cpp b/src/users.cpp index ab8ac5777..8d0606ab1 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -69,7 +69,7 @@ User::User(const Anope::string &snick, const Anope::string &sident, const Anope: if (sserver && sserver->IsSynced()) // Our bots are introduced on startup with no server { ++sserver->users; - Log(this, "connect") << (!svhost.empty() ? Anope::string("(") + svhost + ") " : "") << "(" << srealname << ") " << sip << " connected to the network (" << sserver->GetName() << ")"; + Log(this, "connect") << (!vhost.empty() && vhost != host ? "(" + vhost + ") " : "") << "(" << srealname << ") " << (!sip.empty() && sip != host ? "[" + sip + "] " : "") << "connected to the network (" << sserver->GetName() << ")"; } if (UserListByNick.size() > MaxUserCount) @@ -622,7 +622,7 @@ void User::SetModesInternal(const char *umodes, ...) vsnprintf(buf, BUFSIZE - 1, umodes, args); va_end(args); - if (this->server && this->server->IsSynced()) + if (this->server && this->server->IsSynced() && Anope::string(buf) != "+") Log(this, "mode") << "changes modes to " << buf; spacesepstream sep(buf); |