mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 17:24:57 +00:00
AK: Don't add newline for outf/dbgf/warnf.
In the future all (normal) output should be written by any of the following functions: out (currently called new_out) outln dbg (currently called new_dbg) dbgln warn (currently called new_warn) warnln However, there are still a ton of uses of the old out/warn/dbg in the code base so the new functions are called new_out/new_warn/new_dbg. I am going to rename them as soon as all the other usages are gone (this might take a while.) I also added raw_out/raw_dbg/raw_warn which don't do any escaping, this should be useful if no formatting is required and if the input contains tons of curly braces. (I am not entirely sure if this function will stay, but I am adding it for now.)
This commit is contained in:
parent
4237089a21
commit
d5ffb51a83
16 changed files with 202 additions and 96 deletions
|
@ -258,14 +258,14 @@ void IRCClient::send_whois(const String& nick)
|
|||
void IRCClient::handle(const Message& msg)
|
||||
{
|
||||
#ifdef IRC_DEBUG
|
||||
outf("IRCClient::execute: prefix='{}', command='{}', arguments={}",
|
||||
outln("IRCClient::execute: prefix='{}', command='{}', arguments={}",
|
||||
msg.prefix,
|
||||
msg.command,
|
||||
msg.arguments.size());
|
||||
|
||||
size_t index = 0;
|
||||
for (auto& arg : msg.arguments)
|
||||
outf(" [{}]: {}", index++, arg);
|
||||
outln(" [{}]: {}", index++, arg);
|
||||
#endif
|
||||
|
||||
auto numeric = msg.command.to_uint();
|
||||
|
@ -489,7 +489,7 @@ void IRCClient::handle_privmsg_or_notice(const Message& msg, PrivmsgOrNotice typ
|
|||
bool is_ctcp = has_ctcp_payload(msg.arguments[1]);
|
||||
|
||||
#ifdef IRC_DEBUG
|
||||
outf("handle_privmsg_or_notice: type='{}'{}, sender_nick='{}', target='{}'",
|
||||
outln("handle_privmsg_or_notice: type='{}'{}, sender_nick='{}', target='{}'",
|
||||
type == PrivmsgOrNotice::Privmsg ? "privmsg" : "notice",
|
||||
is_ctcp ? " (ctcp)" : "",
|
||||
sender_nick,
|
||||
|
@ -671,11 +671,11 @@ void IRCClient::handle_rpl_welcome(const Message& msg)
|
|||
auto channel_str = m_config->read_entry("Connection", "AutoJoinChannels", "");
|
||||
if (channel_str.is_empty())
|
||||
return;
|
||||
dbgf("IRCClient: Channels to autojoin: {}", channel_str);
|
||||
dbgln("IRCClient: Channels to autojoin: {}", channel_str);
|
||||
auto channels = channel_str.split(',');
|
||||
for (auto& channel : channels) {
|
||||
join_channel(channel);
|
||||
dbgf("IRCClient: Auto joining channel: {}", channel);
|
||||
dbgln("IRCClient: Auto joining channel: {}", channel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ void IRCClient::send_ctcp_request(const StringView& peer, const StringView& payl
|
|||
|
||||
void IRCClient::handle_ctcp_request(const StringView& peer, const StringView& payload)
|
||||
{
|
||||
dbgf("handle_ctcp_request: {}", payload);
|
||||
dbgln("handle_ctcp_request: {}", payload);
|
||||
|
||||
if (payload == "VERSION") {
|
||||
auto version = ctcp_version_reply();
|
||||
|
@ -1187,5 +1187,5 @@ void IRCClient::handle_ctcp_request(const StringView& peer, const StringView& pa
|
|||
|
||||
void IRCClient::handle_ctcp_response(const StringView& peer, const StringView& payload)
|
||||
{
|
||||
dbgf("handle_ctcp_response({}): {}", peer, payload);
|
||||
dbgln("handle_ctcp_response({}): {}", peer, payload);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue