aboutsummaryrefslogtreecommitdiff
path: root/src/espik_irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/espik_irc.c')
-rw-r--r--src/espik_irc.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/espik_irc.c b/src/espik_irc.c
index cd3a572..d0e0a07 100644
--- a/src/espik_irc.c
+++ b/src/espik_irc.c
@@ -108,9 +108,9 @@ char* irc_privmsg (char* chan, char* msg)
buf_t out;
espik_enter();
- out = make_buffer (strlen ("PRIVMSG") + 1 /* "PRIVMSG " */
- + strlen (chan) + 2 /* ":<channel> " */
- + strlen (msg) + 1); /* "<msg>EOF" */
+ out = make_buffer (strlen ("PRIVMSG") + 1 /* "PRIVMSG " */
+ + strlen (chan) + 2 /* ":<channel> "*/
+ + strlen (msg) + 1); /* "<msg>EOF" */
snprintf (out.buf, out.len, "PRIVMSG %s :%s", chan, msg);
@@ -161,9 +161,9 @@ char* irc_part (char* chan, char* msg)
sep = separate_commandline (msg);
- out = make_buffer (strlen ("PART") + 1 /* "PART " */
- + strlen (sep[0]) + 2 /* ":<chan> " */
- + strlen (sep[1]) + 1); /* "<msg>EOF" */
+ out = make_buffer (strlen ("PART") + 1 /* "PART " */
+ + strlen (sep[0]) + 2 /* ":<chan> "*/
+ + strlen (sep[1]) + 1); /* "<msg>EOF"*/
snprintf (out.buf, out.len, "PART %s :%s", sep[0], sep[1]);
}
@@ -258,16 +258,19 @@ char* irc_send (char* msg)
for (cmd = cmd_tab; cmd->cmd_name != 0; cmd++)
{
- if ((strcasecmp (cmd_and_message[0], cmd->cmd_name)) == 0)
+ if ((strcasecmp (cmd_and_message[0], cmd->cmd_name)) ==
+ 0)
{
- out = cmd->format (current_chan, cmd_and_message[1]);
+ out = cmd->format (current_chan,
+ cmd_and_message[1]);
/* Why do job after found the good to do ? */
break;
}
}
if (!out)
{
- espik_debug_print ("%s is not a know command", cmd_and_message[0]);
+ espik_debug_print ("%s is not a know command",
+ cmd_and_message[0]);
espik_leave();
return (0);
}