mirror of
https://github.com/anope/anope.git
synced 2026-06-25 18:56:37 +02:00
Rework how CTCP messages are sent and received.
This commit is contained in:
@@ -166,12 +166,6 @@ void IRCDProto::SendGlobops(const MessageSource &source, const Anope::string &me
|
||||
Uplink::Send(source, "GLOBOPS", message);
|
||||
}
|
||||
|
||||
void IRCDProto::SendCTCPInternal(const MessageSource &source, const Anope::string &dest, const Anope::string &buf)
|
||||
{
|
||||
Anope::string s = Anope::NormalizeBuffer(buf);
|
||||
this->SendNotice(source, dest, "\1" + s + "\1");
|
||||
}
|
||||
|
||||
void IRCDProto::SendNumericInternal(int numeric, const Anope::string &dest, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
Anope::string n = Anope::ToString(numeric);
|
||||
@@ -190,17 +184,6 @@ void IRCDProto::SendTopic(const MessageSource &source, Channel *c)
|
||||
Uplink::Send(source, "TOPIC", c->name, c->topic);
|
||||
}
|
||||
|
||||
void IRCDProto::SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
va_end(args);
|
||||
Anope::string actionbuf = Anope::string("\1ACTION ") + buf + '\1';
|
||||
SendPrivmsg(source, dest, actionbuf);
|
||||
}
|
||||
|
||||
void IRCDProto::SendPing(const Anope::string &servname, const Anope::string &who)
|
||||
{
|
||||
if (servname.empty())
|
||||
@@ -243,16 +226,6 @@ void IRCDProto::SendForceNickChange(User *u, const Anope::string &newnick, time_
|
||||
Uplink::Send("SVSNICK", u->GetUID(), newnick, when);
|
||||
}
|
||||
|
||||
void IRCDProto::SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
va_end(args);
|
||||
SendCTCPInternal(source, dest, buf);
|
||||
}
|
||||
|
||||
bool IRCDProto::IsNickValid(const Anope::string &nick)
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user