equal
deleted
inserted
replaced
27 |
27 |
28 #ifndef LOCALE_PATH |
28 #ifndef LOCALE_PATH |
29 #define LOCALE_PATH "/var/lib/nobody/data/locale" |
29 #define LOCALE_PATH "/var/lib/nobody/data/locale" |
30 #endif |
30 #endif |
31 |
31 |
32 short active = 1; |
|
33 |
|
34 void sigproc () |
32 void sigproc () |
35 { |
33 { |
36 signal (SIGTERM, sigproc); |
34 signal (SIGTERM, sigproc); |
37 active = 0; |
|
38 } |
35 } |
39 |
36 |
40 int main (int argc, char **argv) |
37 int main (int argc, char **argv) |
41 { |
38 { |
42 UC uc; |
39 UC uc; |
103 fgets (buf, 512, message.stream); |
100 fgets (buf, 512, message.stream); |
104 |
101 |
105 if ((command = irc_parsemessage (buf, &message))) { |
102 if ((command = irc_parsemessage (buf, &message))) { |
106 printf ("%10s %s %s\n", command, message.channel, message.line); |
103 printf ("%10s %s %s\n", command, message.channel, message.line); |
107 } else { |
104 } else { |
108 if ((msg = parse (&message, &active)) != NULL) { |
105 if ((msg = parse (&message)) != NULL) { |
109 fprintf (message.stream, "%s\r\n", msg); |
106 fprintf (message.stream, "%s\r\n", msg); |
110 printf ("%10s %s", "WRITE", msg); |
107 printf ("%10s %s", "WRITE", msg); |
111 } |
108 } |
112 } |
109 } |
113 } |
110 } |