mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Removed four redundant inline comments in print_sha256_result so the function is cleaner without changing behavior or control flow.
This commit is contained in:
@@ -42,18 +42,14 @@ typedef struct {
|
|||||||
static void
|
static void
|
||||||
print_sha256_result (ChecksumCallbackInfo *info, const char *checksum, const char *filename, GError *error)
|
print_sha256_result (ChecksumCallbackInfo *info, const char *checksum, const char *filename, GError *error)
|
||||||
{
|
{
|
||||||
// So then we get the next best available channel, since we always want to print at least somewhere, it's fine
|
|
||||||
zoitechat_context *ctx = zoitechat_find_context(ph, info->servername, info->channel);
|
zoitechat_context *ctx = zoitechat_find_context(ph, info->servername, info->channel);
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
// before we print a private message to the wrong channel, we exit early
|
|
||||||
if (info->send_message) {
|
if (info->send_message) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the context isn't found the first time, we search in the server
|
|
||||||
ctx = zoitechat_find_context(ph, info->servername, NULL);
|
ctx = zoitechat_find_context(ph, info->servername, NULL);
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
// The second time we exit early, since printing in another server isn't desireable
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user