mirror of
https://github.com/anope/anope.git
synced 2026-06-26 01:46:39 +02:00
Cleaned up some things, made the protocol modules use some basic inheritance to cut back on their code duplication. More work can be done in the future to remove even more of it.
This commit is contained in:
+3
-3
@@ -16,7 +16,7 @@ CommandSource::~CommandSource()
|
||||
|
||||
// Send to the user if the reply is more than one line
|
||||
if (!this->fantasy || !this->ci || this->reply.size() > 1)
|
||||
u->SendMessage(this->service->nick, message);
|
||||
u->SendMessage(this->service, message);
|
||||
else if (this->ci->botflags.HasFlag(BS_MSG_PRIVMSG))
|
||||
ircdproto->SendPrivmsg(this->service, this->ci->name, message.c_str());
|
||||
else if (this->ci->botflags.HasFlag(BS_MSG_NOTICE))
|
||||
@@ -24,7 +24,7 @@ CommandSource::~CommandSource()
|
||||
else if (this->ci->botflags.HasFlag(BS_MSG_NOTICEOPS))
|
||||
ircdproto->SendNoticeChanops(this->service, this->ci->c, message.c_str());
|
||||
else
|
||||
u->SendMessage(this->service->nick, message);
|
||||
u->SendMessage(this->service, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void CommandSource::Reply(const char *message, ...)
|
||||
va_start(args, message);
|
||||
vsnprintf(buf, BUFSIZE - 1, message, args);
|
||||
|
||||
this->reply.push_back(message);
|
||||
this->reply.push_back(buf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user