]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/channel.c
channel: fix confusing "adding to invite list" debug output
[ngircd-alex.git] / src / ngircd / channel.c
index 175f23b253562118c9dc7f19b9fc82c0535187c4..e49e5a9a6127cc3f34771af77af096fc6d951eb6 100644 (file)
@@ -697,6 +697,14 @@ Channel_TopicWho(CHANNEL *Chan)
        return Chan->topic_who;
 } /* Channel_TopicWho */
 
+
+GLOBAL unsigned int
+Channel_CreationTime(CHANNEL *Chan)
+{
+       assert(Chan != NULL);
+       return (unsigned int) Chan->creation_time;
+} /* Channel_CreationTime */
+
 #endif
 
 
@@ -834,6 +842,9 @@ Channel_Create( const char *Name )
        strlcpy( c->name, Name, sizeof( c->name ));
        c->hash = Hash( c->name );
        c->next = My_Channels;
+#ifndef STRICT_RFC
+       c->creation_time = time(NULL);
+#endif
        My_Channels = c;
        LogDebug("Created new channel structure for \"%s\".", Name);
        return c;
@@ -978,6 +989,7 @@ GLOBAL bool
 Channel_AddBan(CHANNEL *c, const char *mask )
 {
        struct list_head *h = Channel_GetListBans(c);
+       LogDebug("Adding \"%s\" to \"%s\" %s list", mask, Channel_Name(c), "ban");
        return Lists_Add(h, mask, false);
 }
 
@@ -986,6 +998,7 @@ GLOBAL bool
 Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce)
 {
        struct list_head *h = Channel_GetListInvites(c);
+       LogDebug("Adding \"%s\" to \"%s\" %s list", mask, Channel_Name(c), "invite");
        return Lists_Add(h, mask, onlyonce);
 }