]> jfr.im git - solanum.git/blobdiff - modules/m_topic.c
map: make flatten_links dump a flattened map instead of blocking it (closes #48)
[solanum.git] / modules / m_topic.c
index b175612e23a27706c3a9134ac8c9cac9db0c4e2d..b59378a3e3842df18d9e7e1459338c6e933559c8 100644 (file)
@@ -40,6 +40,7 @@
 #include "modules.h"
 #include "packet.h"
 #include "tgchange.h"
+#include "logger.h"
 
 static int m_topic(struct Client *, struct Client *, int, const char **);
 static int ms_topic(struct Client *, struct Client *, int, const char **);
@@ -118,7 +119,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
                }
 
                if(((chptr->mode.mode & MODE_TOPICLIMIT) == 0 ||
-                                       get_channel_access(source_p, msptr, CHANROLE_TOPIC) >= CHFL_CHANOP) &&
+                                       get_channel_access(source_p, msptr, MODE_ADD) >= CHFL_CHANOP) &&
                                (!MyClient(source_p) ||
                                 can_send(chptr, source_p, msptr)))
                {
@@ -163,7 +164,8 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
 
                        sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
                                        me.name, source_p->name, chptr->chname,
-                                       chptr->topic_info, chptr->topic_time);
+                                       chptr->topic_info,
+                                       (unsigned long)chptr->topic_time);
                }
        }
 
@@ -190,7 +192,7 @@ ms_topic(struct Client *client_p, struct Client *source_p, int parc, const char
        set_channel_topic(chptr, parv[4], parv[2], atoi(parv[3]));
 
        sendto_channel_local(ALL_MEMBERS, chptr, ":%s TOPIC %s :%s",
-                            source_p->name, parv[1], 
+                            source_p->name, parv[1],
                             chptr->topic == NULL ? "" : chptr->topic);
 
        return 0;