]> jfr.im git - solanum.git/blobdiff - ircd/send.c
Make 5614c9e6f0b (opmod as fake statusmsg) optional
[solanum.git] / ircd / send.c
index 1ecddab7e7b388aa346e6bebf4808c9a83850c40..d2a92d16a381c464b7bb5ac9e6f65d96ecd2c9e3 100644 (file)
@@ -598,22 +598,23 @@ sendto_channel_opmod(struct Client *one, struct Client *source_p,
        build_msgbuf_tags(&msgbuf, source_p);
 
        current_serial++;
+       const char *statusmsg_prefix = (ConfigChannel.opmod_send_statusmsg ? "@" : "");
 
        if(IsServer(source_p)) {
                msgbuf_cache_initf(&msgbuf_cache, &msgbuf, &strings,
-                              ":%s %s @%s :",
-                              source_p->name, command, chptr->chname);
+                              ":%s %s %s%s :",
+                              source_p->name, command, statusmsg_prefix, chptr->chname);
        } else {
                msgbuf_cache_initf(&msgbuf_cache, &msgbuf, &strings,
-                              ":%s!%s@%s %s @%s :",
+                              ":%s!%s@%s %s %s%s :",
                               source_p->name, source_p->username,
-                              source_p->host, command, chptr->chname);
+                              source_p->host, command, statusmsg_prefix, chptr->chname);
        }
 
        if (chptr->mode.mode & MODE_MODERATED) {
                linebuf_put_msgf(&rb_linebuf_old, &strings,
-                              ":%s %s @%s :",
-                              use_id(source_p), command, chptr->chname, text);
+                              ":%s %s %s%s :",
+                              use_id(source_p), command, statusmsg_prefix, chptr->chname, text);
        } else {
                linebuf_put_msgf(&rb_linebuf_old, &strings,
                               ":%s NOTICE @%s :<%s:%s> ",
@@ -623,7 +624,6 @@ sendto_channel_opmod(struct Client *one, struct Client *source_p,
        linebuf_put_msgf(&rb_linebuf_new, &strings,
                       ":%s %s =%s :",
                       use_id(source_p), command, chptr->chname);
-
        RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head)
        {
                msptr = ptr->data;