summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
committerAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
commit2dec8e767a70def4b9b04a96ae4f75e4d1013038 (patch)
tree36f5b551ff359a578e17d5e7d2f486970d759a7b /src/users.cpp
parent873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff)
Allow userless command sources
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index bbe26a11a..18bafd032 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -234,12 +234,13 @@ void User::SendMessage(const BotInfo *source, const char *fmt, ...)
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, translated_message, args);
- this->SendMessage(source, Anope::string(buf));
+ Anope::string m = buf;
+ this->SendMessage(source, buf);
va_end(args);
}
-void User::SendMessage(const BotInfo *source, Anope::string msg)
+void User::SendMessage(const BotInfo *source, const Anope::string &msg)
{
const char *translated_message = translate(this, msg.c_str());
@@ -472,7 +473,7 @@ bool User::IsRecognized(bool CheckSecure) const
*/
bool User::IsServicesOper()
{
- if (!this->nc || !this->nc->o)
+ if (!this->nc || !this->nc->IsServicesOper())
// No opertype.
return false;
else if (this->nc->o->require_oper && !this->HasMode(UMODE_OPER))