Lines 1-16
Link Here
|
1 |
--- icb.c.orig 2004-11-19 06:14:28.000000000 +0900 |
1 |
--- icb.c.orig 2015-08-21 19:01:12 UTC |
2 |
+++ icb.c 2014-05-17 02:34:25.000000000 +0900 |
2 |
+++ icb.c |
3 |
@@ -30,7 +30,9 @@ |
3 |
@@ -30,7 +30,6 @@ |
4 |
* |
4 |
* |
5 |
*/ |
5 |
*/ |
6 |
|
6 |
|
7 |
+#if 0 |
7 |
-static const char rcsid[] = "$Id: icb.c,v 1.3 2015/08/21 19:01:12 dhartmei Exp $"; |
8 |
static const char rcsid[] = "$Id: icb.c,v 1.15 2004/11/18 21:14:28 dhartmei Exp $"; |
|
|
9 |
+#endif |
10 |
|
8 |
|
11 |
#include <stdio.h> |
9 |
#include <stdio.h> |
12 |
#include <stdlib.h> |
10 |
#include <stdlib.h> |
13 |
@@ -40,8 +42,8 @@ |
11 |
@@ -40,8 +39,8 @@ static const char rcsid[] = "$Id: icb.c, |
14 |
|
12 |
|
15 |
extern int sync_write(int, const char *, int); |
13 |
extern int sync_write(int, const char *, int); |
16 |
|
14 |
|
Lines 21-27
Link Here
|
21 |
static void icb_ico(int, const char *); |
19 |
static void icb_ico(int, const char *); |
22 |
static void icb_iwl(int, const char *, const char *, long, |
20 |
static void icb_iwl(int, const char *, const char *, long, |
23 |
long, const char *, const char *); |
21 |
long, const char *, const char *); |
24 |
@@ -108,7 +110,7 @@ |
22 |
@@ -109,7 +108,7 @@ static unsigned off; |
25 |
*/ |
23 |
*/ |
26 |
|
24 |
|
27 |
void |
25 |
void |
Lines 30-36
Link Here
|
30 |
{ |
28 |
{ |
31 |
while (**s && strchr(skip, **s) != NULL) |
29 |
while (**s && strchr(skip, **s) != NULL) |
32 |
(*s)++; |
30 |
(*s)++; |
33 |
@@ -149,7 +151,7 @@ |
31 |
@@ -164,7 +163,7 @@ icb_recv(const char *buf, unsigned len, |
34 |
} |
32 |
} |
35 |
|
33 |
|
36 |
static unsigned char |
34 |
static unsigned char |
Lines 39-45
Link Here
|
39 |
{ |
37 |
{ |
40 |
unsigned char i = 0, j = 0, k = 0; |
38 |
unsigned char i = 0, j = 0, k = 0; |
41 |
|
39 |
|
42 |
@@ -175,10 +177,10 @@ |
40 |
@@ -190,10 +189,10 @@ icb_args(const char *data, unsigned char |
43 |
} |
41 |
} |
44 |
|
42 |
|
45 |
static void |
43 |
static void |
Lines 52-58
Link Here
|
52 |
unsigned char i, j; |
50 |
unsigned char i, j; |
53 |
char s[8192]; |
51 |
char s[8192]; |
54 |
|
52 |
|
55 |
@@ -254,7 +256,7 @@ |
53 |
@@ -269,7 +268,7 @@ icb_cmd(const char *cmd, unsigned char l |
56 |
char old_nick[256], new_nick[256]; |
54 |
char old_nick[256], new_nick[256]; |
57 |
|
55 |
|
58 |
scan(&a, old_nick, sizeof(old_nick), " ", " "); |
56 |
scan(&a, old_nick, sizeof(old_nick), " ", " "); |
Lines 61-67
Link Here
|
61 |
return; |
59 |
return; |
62 |
a += 21; |
60 |
a += 21; |
63 |
scan(&a, new_nick, sizeof(new_nick), " ", " "); |
61 |
scan(&a, new_nick, sizeof(new_nick), " ", " "); |
64 |
@@ -268,7 +270,7 @@ |
62 |
@@ -283,7 +282,7 @@ icb_cmd(const char *cmd, unsigned char l |
65 |
char nick[256], topic[256]; |
63 |
char nick[256], topic[256]; |
66 |
|
64 |
|
67 |
scan(&a, nick, sizeof(nick), " ", " "); |
65 |
scan(&a, nick, sizeof(nick), " ", " "); |
Lines 70-76
Link Here
|
70 |
return; |
68 |
return; |
71 |
a += 23; |
69 |
a += 23; |
72 |
scan(&a, topic, sizeof(topic), "", "\""); |
70 |
scan(&a, topic, sizeof(topic), "", "\""); |
73 |
@@ -279,13 +281,13 @@ |
71 |
@@ -294,13 +293,13 @@ icb_cmd(const char *cmd, unsigned char l |
74 |
char old_mod[256], new_mod[256]; |
72 |
char old_mod[256], new_mod[256]; |
75 |
|
73 |
|
76 |
scan(&a, old_mod, sizeof(old_mod), " ", " "); |
74 |
scan(&a, old_mod, sizeof(old_mod), " ", " "); |
Lines 86-92
Link Here
|
86 |
snprintf(s, sizeof(s), |
84 |
snprintf(s, sizeof(s), |
87 |
":%s MODE %s +o %s\r\n", |
85 |
":%s MODE %s +o %s\r\n", |
88 |
icb_hostid, irc_channel, old_mod); |
86 |
icb_hostid, irc_channel, old_mod); |
89 |
@@ -297,7 +299,7 @@ |
87 |
@@ -312,7 +311,7 @@ icb_cmd(const char *cmd, unsigned char l |
90 |
char nick[256]; |
88 |
char nick[256]; |
91 |
|
89 |
|
92 |
scan(&a, nick, sizeof(nick), " ", " "); |
90 |
scan(&a, nick, sizeof(nick), " ", " "); |
Lines 95-101
Link Here
|
95 |
return; |
93 |
return; |
96 |
snprintf(s, sizeof(s), ":%s KICK %s %s :booted\r\n", |
94 |
snprintf(s, sizeof(s), ":%s KICK %s %s :booted\r\n", |
97 |
icb_moderator, irc_channel, nick); |
95 |
icb_moderator, irc_channel, nick); |
98 |
@@ -508,7 +510,7 @@ |
96 |
@@ -523,7 +522,7 @@ icb_send_openmsg(int fd, const char *msg |
99 |
cmd[off++] = 0; |
97 |
cmd[off++] = 0; |
100 |
cmd[0] = off - 1; |
98 |
cmd[0] = off - 1; |
101 |
/* cmd[0] <= MAX_MSG_SIZE */ |
99 |
/* cmd[0] <= MAX_MSG_SIZE */ |
Lines 104-110
Link Here
|
104 |
} |
102 |
} |
105 |
} |
103 |
} |
106 |
|
104 |
|
107 |
@@ -533,7 +535,7 @@ |
105 |
@@ -548,7 +547,7 @@ icb_send_privmsg(int fd, const char *nic |
108 |
cmd[off++] = 0; |
106 |
cmd[off++] = 0; |
109 |
cmd[0] = off - 1; |
107 |
cmd[0] = off - 1; |
110 |
/* cmd[0] <= MAX_MSG_SIZE */ |
108 |
/* cmd[0] <= MAX_MSG_SIZE */ |