|
16 | 16 | static int conn; /* socket connection */
|
17 | 17 | static char sbuf[BUFF]; /* string buffer */
|
18 | 18 | 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 */ |
21 | 21 | static char *host = "irc.freenode.org"; /* irc host address */
|
22 | 22 | static char *chan = "kisslinux"; /* channel */
|
23 | 23 | static char *port = "6667"; /* port */
|
@@ -219,14 +219,14 @@ main(int argc, char **argv) {
|
219 | 219 | if (sscanf(usrin, ":%[M] %s %[^\n]\n", &c1, v2, v1) == 3 ||
|
220 | 220 | sscanf(usrin, ":%[Qnjpm] %[^\n]\n", &c1, v1) == 2 ||
|
221 | 221 | sscanf(usrin, ":%[q]\n", &c1) == 1) {
|
222 |
| - switch (usrin[1]) { |
| 222 | + switch (c1) { |
223 | 223 | case 'q': dprintf(fd[1], "quit\n"); break;
|
224 | 224 | case 'Q': dprintf(fd[1], "quit %s\n", v1); break;
|
225 | 225 | case 'j': dprintf(fd[1], "join %s\n", v1); break;
|
226 | 226 | case 'p': dprintf(fd[1], "part %s\n", v1); break;
|
227 | 227 | 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; |
230 | 230 | case '?': break;
|
231 | 231 | }
|
232 | 232 | }
|
|
0 commit comments