Skip to content

Commit 9749527

Browse files
committed
cleanup format
1 parent 66fe497 commit 9749527

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

kirc.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ parser(char *in) {
156156
if (!strncmp(in, "PING", 4)) {
157157
in[1] = 'O';
158158
raw("%s\r\n", in);
159-
}
160-
else if (in[0] == ':') {
159+
} else if (in[0] == ':') {
161160
sscanf(in, ":%[^ ] %[^:]:%[^\r]", pre, cmd, msg);
162161
sscanf(pre, "%[^!]!%[^@]@%s", nic, usr, hos);
163162
sscanf(cmd, "%[^#& ]%s", ltr, cha);
@@ -222,8 +221,8 @@ main(int argc, char **argv) {
222221
b[o + 1] = '\0';
223222
parser(b);
224223
o = 0;
225-
}
226-
else if (sl > 0) o++;
224+
} else if (sl > 0) o++;
225+
227226
if (read(fd[0], u, IRC_MSG_MAX) > 0) {
228227
for (i = 0; u[i] != '\n'; i++) continue;
229228
if (u[0] != ':') raw("%-*.*s\r\n", i, i, u);
@@ -251,8 +250,7 @@ main(int argc, char **argv) {
251250
case 'M': dprintf(fd[1], "privmsg %s :%s\n", v2, v1); break;
252251
case '?': break;
253252
}
254-
}
255-
else dprintf(fd[1], "%s", usrin);
253+
} else dprintf(fd[1], "%s", usrin);
256254
}
257255
}
258256

0 commit comments

Comments
 (0)