]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/channel.c
Remove construction of some TS5 linebufs.
[irc/rqf/shadowircd.git] / src / channel.c
index e372a2f9ce1793f0cf827c5f6f951fe453cd9272..626fb63a99ff32ee01f5bb1e19d220877980be2a 100644 (file)
@@ -30,8 +30,7 @@
 #include "common.h"
 #include "hash.h"
 #include "hook.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_serv.h"            /* captab */
 #include "whowas.h"
 #include "s_conf.h"            /* ConfigFileEntry, ConfigChannel */
 #include "s_newconf.h"
-#include "s_log.h"
-
-extern rb_dlink_list global_channel_list;
-
-extern struct config_channel_entry ConfigChannel;
-extern rb_bh *channel_heap;
-extern rb_bh *ban_heap;
-extern rb_bh *topic_heap;
-extern rb_bh *member_heap;
+#include "logger.h"
 
 static int channel_capabs[] = { CAP_EX, CAP_IE,
        CAP_SERVICE,
@@ -1068,8 +1059,8 @@ set_channel_topic(struct Channel *chptr, const char *topic, const char *topic_in
        {
                if(chptr->topic == NULL)
                        allocate_topic(chptr);
-               strlcpy(chptr->topic, topic, TOPICLEN + 1);
-               strlcpy(chptr->topic_info, topic_info, USERHOST_REPLYLEN);
+               rb_strlcpy(chptr->topic, topic, TOPICLEN + 1);
+               rb_strlcpy(chptr->topic_info, topic_info, USERHOST_REPLYLEN);
                chptr->topic_time = topicts;
        }
        else
@@ -1160,8 +1151,8 @@ channel_modes(struct Channel *chptr, struct Client *client_p)
 
        *mbuf = '\0';
 
-       strlcpy(final, buf1, sizeof final);
-       strlcat(final, buf2, sizeof final);
+       rb_strlcpy(final, buf1, sizeof final);
+       rb_strlcat(final, buf2, sizeof final);
        return final;
 }
 
@@ -1304,13 +1295,9 @@ send_cap_mode_changes(struct Client *client_p, struct Client *source_p,
                cap = chcap_combos[j].cap_yes;
                nocap = chcap_combos[j].cap_no;
 
-               if(cap & CAP_TS6)
-                       mbl = preflen = rb_sprintf(modebuf, ":%s TMODE %ld %s ",
-                                                  use_id(source_p), (long) chptr->channelts,
-                                                  chptr->chname);
-               else
-                       mbl = preflen = rb_sprintf(modebuf, ":%s MODE %s ",
-                                                  source_p->name, chptr->chname);
+               mbl = preflen = rb_sprintf(modebuf, ":%s TMODE %ld %s ",
+                                          use_id(source_p), (long) chptr->channelts,
+                                          chptr->chname);
 
                /* loop the list of - modes we have */
                for (i = 0; i < mode_count; i++)
@@ -1324,7 +1311,7 @@ send_cap_mode_changes(struct Client *client_p, struct Client *source_p,
                           || ((nocap & mode_changes[i].nocaps) != mode_changes[i].nocaps))
                                continue;
 
-                       if((cap & CAP_TS6) && !EmptyString(mode_changes[i].id))
+                       if(!EmptyString(mode_changes[i].id))
                                arg = mode_changes[i].id;
                        else
                                arg = mode_changes[i].arg;