We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66fe497 commit 9749527Copy full SHA for 9749527
kirc.c
@@ -156,8 +156,7 @@ parser(char *in) {
156
if (!strncmp(in, "PING", 4)) {
157
in[1] = 'O';
158
raw("%s\r\n", in);
159
- }
160
- else if (in[0] == ':') {
+ } else if (in[0] == ':') {
161
sscanf(in, ":%[^ ] %[^:]:%[^\r]", pre, cmd, msg);
162
sscanf(pre, "%[^!]!%[^@]@%s", nic, usr, hos);
163
sscanf(cmd, "%[^#& ]%s", ltr, cha);
@@ -222,8 +221,8 @@ main(int argc, char **argv) {
222
221
b[o + 1] = '\0';
223
parser(b);
224
o = 0;
225
226
- else if (sl > 0) o++;
+ } else if (sl > 0) o++;
+
227
if (read(fd[0], u, IRC_MSG_MAX) > 0) {
228
for (i = 0; u[i] != '\n'; i++) continue;
229
if (u[0] != ':') raw("%-*.*s\r\n", i, i, u);
@@ -251,8 +250,7 @@ main(int argc, char **argv) {
251
250
case 'M': dprintf(fd[1], "privmsg %s :%s\n", v2, v1); break;
252
case '?': break;
253
}
254
255
- else dprintf(fd[1], "%s", usrin);
+ } else dprintf(fd[1], "%s", usrin);
256
257
258
0 commit comments