summaryrefslogtreecommitdiff
path: root/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'logging.c')
-rw-r--r--logging.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/logging.c b/logging.c
index ed4cfcf..bf182ec 100644
--- a/logging.c
+++ b/logging.c
@@ -126,11 +126,11 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
switch(type) {
case LOG_PRIVMSG:
// Extract the username from the prefix
- extractnickfromprefix(tokens[0]);
- extractnickfromprefix(from);
+ extractnickfromprefix(tokens[0], 1);
+ extractnickfromprefix(from, 1);
// Remove the leading ":" from the real message
- stripprefix(str);
+ stripprefix(str, 1);
// Build the log filename
// If the message was sent to us, then log it in the sender's log file
@@ -211,10 +211,10 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
case LOG_TOPIC:
// Extract the username from the prefix
- extractnickfromprefix(tokens[0]);
+ extractnickfromprefix(tokens[0], 1);
// Remove the leading ":" from the topic
- stripprefix(str);
+ stripprefix(str, 1);
if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, to)) {
debugprint(DEBUG_CRIT, "Error while preparing log filename for topic, returning!\n");
@@ -265,7 +265,7 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
tokens[1][posbang] = '\0';
// Strip the prefix from the quit message
- stripprefix(str);
+ stripprefix(str, 1);
// Build a friendly message (e.g. "nick (user@host) has quit (Quit: message)")
snprintf(line, MAXCHAR, "%s (%s) has quit (%s)", tokens[1] + 1, tokens[1] + posbang + 1, str);
@@ -280,9 +280,9 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
case LOG_NICK:
// Extract old nick from the prefix
- extractnickfromprefix(tokens[1]);
+ extractnickfromprefix(tokens[1], 1);
// Strip colon from new nick
- stripprefix(str);
+ stripprefix(str, 1);
// Build a friendly message (e.g. "oldnick is now known as newnick")
snprintf(line, MAXCHAR, "%s is now known as %s", tokens[1], str);
@@ -297,7 +297,7 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
case LOG_MODE:
// Extract nick from prefix
- extractnickfromprefix(tokens[0]);
+ extractnickfromprefix(tokens[0], 1);
// Build a friendly message (e.g. "nick sets mode #channel +ov nick1 nick2")
if (!snprintf(line, MAXCHAR, "%s sets mode %s %s", tokens[0], tokens[2], str)) {