Skip to content

Commit b2a8fc8

Browse files
committed
changed userin[1] to c1 variable
1 parent f7e25d8 commit b2a8fc8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kirc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
static int conn; /* socket connection */
1717
static char sbuf[BUFF]; /* string buffer */
1818
static int verb = 0; /* verbose output (e.g. raw stream) */
19-
static int cmax = 82;
20-
static int gutl = 10;
19+
static int cmax = 80; /* max number of characters per line */
20+
static int gutl = 10; /* max character width of left column */
2121
static char *host = "irc.freenode.org"; /* irc host address */
2222
static char *chan = "kisslinux"; /* channel */
2323
static char *port = "6667"; /* port */
@@ -219,14 +219,14 @@ main(int argc, char **argv) {
219219
if (sscanf(usrin, ":%[M] %s %[^\n]\n", &c1, v2, v1) == 3 ||
220220
sscanf(usrin, ":%[Qnjpm] %[^\n]\n", &c1, v1) == 2 ||
221221
sscanf(usrin, ":%[q]\n", &c1) == 1) {
222-
switch (usrin[1]) {
222+
switch (c1) {
223223
case 'q': dprintf(fd[1], "quit\n"); break;
224224
case 'Q': dprintf(fd[1], "quit %s\n", v1); break;
225225
case 'j': dprintf(fd[1], "join %s\n", v1); break;
226226
case 'p': dprintf(fd[1], "part %s\n", v1); break;
227227
case 'm': dprintf(fd[1], "privmsg #%s :%s\n", chan, v1); break;
228-
case 'n': dprintf(fd[1], "privmsg nickserv :%s\n", v1); break;
229-
case 'M': dprintf(fd[1], "privmsg %s :%s\n", v2, v1); break;
228+
case 'n': dprintf(fd[1], "privmsg nickserv :%s\n", v1); break;
229+
case 'M': dprintf(fd[1], "privmsg %s :%s\n", v2, v1); break;
230230
case '?': break;
231231
}
232232
}

0 commit comments

Comments
 (0)