src/irc_chan.h
changeset 45 71e65564afd2
parent 38 0c2e0cb46c3a
child 69 6f298b6e0d5f
--- a/src/irc_chan.h	Thu Mar 12 22:06:01 2009 +0200
+++ b/src/irc_chan.h	Thu Mar 12 22:50:08 2009 +0200
@@ -11,6 +11,7 @@
 
 #include "irc_net.h"
 #include "irc_cmd.h"
+#include "irc_proto.h"
 #include "error.h"
 #include <sys/queue.h>
 
@@ -24,14 +25,16 @@
 };
 
 /**
- * Semantic IRC channel callbacks
+ * Semantic IRC channel callbacks.
+ *
+ * Where callbacks have irc_nm arguments, these are MAY be given as NULL if the prefix could not be parsed.
  */
 struct irc_chan_callbacks {
     /** Joined the channel */
     void (*on_self_join) (struct irc_chan *chan, void *arg);
 
     /** Someone sent a message to the channel */
-    void (*on_msg) (struct irc_chan *chan, const char *prefix, const char *msg, void *arg);
+    void (*on_msg) (struct irc_chan *chan, const struct irc_nm *source, const char *msg, void *arg);
 };
 
 /**
@@ -62,16 +65,15 @@
     /** Our identifying info */
     struct irc_chan_info info;
     
-    /** State flags */
-    struct {
+    /** State flags @{ */
         /** JOIN request sent, waiting for reply */
         bool joining;
 
         /** Currently joined to channel */
         bool joined;
 
-    } state;
-
+    // @}
+    
     /** General command handlers */
     irc_cmd_handlers_t handlers;