src/irc_log.c
changeset 75 ff6272398d2e
parent 70 a9a4c5e6aa30
child 80 1b989bc67760
--- a/src/irc_log.c	Thu Mar 26 22:54:25 2009 +0200
+++ b/src/irc_log.c	Thu Mar 26 23:15:55 2009 +0200
@@ -162,24 +162,6 @@
 }
 
 /**
- * Parse the prefix into a nickmask and pass on to irc_log_event
- */
-static err_t irc_log_event_prefix (struct irc_log_ctx *ctx, struct irc_log_chan *chan_ctx, const char *prefix,
-        const char *type, const char *target, const char *message)
-{
-    char prefix_buf[IRC_PREFIX_MAX];
-    struct irc_nm nm;
-    err_t err;
-
-    // parse nickmask
-    if ((err = irc_nm_parse(&nm, prefix_buf, prefix)))
-        return err;
-
-    // log
-    return irc_log_event(ctx, chan_ctx, &nm, type, target, message);
-}
-
-/**
  * Log a simple channel event of the form:
  *
  * :nm <type> <channel> [<msg>]
@@ -190,7 +172,7 @@
     
     const char *msg = line->args[1];
 
-    irc_log_event_prefix(chan_ctx->ctx, chan_ctx, line->prefix, line->command, NULL, msg);
+    irc_log_event(chan_ctx->ctx, chan_ctx, line->source, line->command, NULL, msg);
 }
 
 /**
@@ -221,7 +203,7 @@
     }
     
     // log
-    irc_log_event_prefix(chan_ctx->ctx, chan_ctx, line->prefix, line->command, NULL, message);
+    irc_log_event(chan_ctx->ctx, chan_ctx, line->source, line->command, NULL, message);
 }
 
 /**
@@ -236,7 +218,7 @@
     const char *target = line->args[1];    
     const char *msg = line->args[2];
 
-    irc_log_event_prefix(chan_ctx->ctx, chan_ctx, line->prefix, line->command, target, msg);
+    irc_log_event(chan_ctx->ctx, chan_ctx, line->source, line->command, target, msg);
 }
 
 /**