]>
Commit | Line | Data |
---|---|---|
1 | # HG changeset patch | |
2 | # Parent c79daa66df29a7364a619a77de910104acc6c9a3 | |
3 | ||
4 | diff -r c79daa66df29 include/version.h | |
5 | --- a/include/version.h Sat Jul 20 13:33:10 2013 +0100 | |
6 | +++ b/include/version.h Sat Jul 20 13:53:10 2013 +0100 | |
7 | @@ -9,6 +9,7 @@ | |
8 | extern const char *version; | |
9 | extern const char *creation; | |
10 | extern const char *infotext[]; | |
11 | +extern const char *sourcestext[]; | |
12 | extern const char *generation; | |
13 | ||
14 | #endif /* INCLUDED_version_h */ | |
15 | diff -r c79daa66df29 ircd/m_info.c | |
16 | --- a/ircd/m_info.c Sat Jul 20 13:33:10 2013 +0100 | |
17 | +++ b/ircd/m_info.c Sat Jul 20 13:53:10 2013 +0100 | |
18 | @@ -105,17 +105,15 @@ | |
19 | */ | |
20 | int m_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
21 | { | |
22 | - const char **text = infotext; | |
23 | + const char **text; | |
24 | ||
25 | if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) != | |
26 | HUNTED_ISME) | |
27 | - return 0; | |
28 | + return 0; | |
29 | ||
30 | - while (text[212]) | |
31 | - { | |
32 | + for (text=infotext;*text;text++) | |
33 | send_reply(sptr, RPL_INFO, *text); | |
34 | - text++; | |
35 | - } | |
36 | + | |
37 | send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s", | |
38 | creation, generation); | |
39 | send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s", | |
40 | @@ -133,26 +131,26 @@ | |
41 | */ | |
42 | int ms_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) | |
43 | { | |
44 | - const char **text = infotext; | |
45 | + const char **text; | |
46 | ||
47 | if (IsServer(sptr)) | |
48 | return 0; | |
49 | ||
50 | if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) != | |
51 | HUNTED_ISME) | |
52 | - return 0; | |
53 | - while (text[212]) | |
54 | + return 0; | |
55 | + | |
56 | + if (!IsOper(sptr)) | |
57 | { | |
58 | - if (!IsOper(sptr)) | |
59 | + for (text=infotext;*text;text++) | |
60 | send_reply(sptr, RPL_INFO, *text); | |
61 | - text++; | |
62 | } | |
63 | - if (IsOper(sptr)) | |
64 | + else | |
65 | { | |
66 | - while (*text) | |
67 | - send_reply(sptr, RPL_INFO, *text++); | |
68 | - send_reply(sptr, RPL_INFO, ""); | |
69 | + for (text=sourcestext;*text;text++) | |
70 | + send_reply(sptr, RPL_INFO, *text); | |
71 | } | |
72 | + | |
73 | send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s", | |
74 | creation, generation); | |
75 | send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s", | |
76 | @@ -171,27 +169,27 @@ | |
77 | { | |
78 | const char **text = infotext; | |
79 | ||
80 | - if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) == | |
81 | + if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) != | |
82 | HUNTED_ISME) | |
83 | + return 0; | |
84 | + | |
85 | + if (parv[1] == NULL) | |
86 | { | |
87 | - while (text[212]) | |
88 | - { | |
89 | - if (!IsOper(sptr)) | |
90 | - send_reply(sptr, RPL_INFO, *text); | |
91 | - text++; | |
92 | - } | |
93 | - if (IsOper(sptr) && (NULL != parv[1])) | |
94 | - { | |
95 | - while (*text) | |
96 | - send_reply(sptr, RPL_INFO, *text++); | |
97 | - send_reply(sptr, RPL_INFO, ""); | |
98 | - } | |
99 | - send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s", | |
100 | - creation, generation); | |
101 | - send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s", | |
102 | - myctime(cli_firsttime(&me))); | |
103 | - send_reply(sptr, RPL_ENDOFINFO); | |
104 | + for (text=infotext;*text;text++) | |
105 | + send_reply(sptr, RPL_INFO, *text); | |
106 | } | |
107 | + else | |
108 | + { | |
109 | + for (text=sourcestext;*text;text++) | |
110 | + send_reply(sptr, RPL_INFO, *text); | |
111 | + } | |
112 | + | |
113 | + send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s", | |
114 | + creation, generation); | |
115 | + send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s", | |
116 | + myctime(cli_firsttime(&me))); | |
117 | + send_reply(sptr, RPL_ENDOFINFO); | |
118 | + | |
119 | return 0; | |
120 | } | |
121 | ||
122 | diff -r c79daa66df29 ircd/version.c.SH | |
123 | --- a/ircd/version.c.SH Sat Jul 20 13:33:10 2013 +0100 | |
124 | +++ b/ircd/version.c.SH Sat Jul 20 13:53:10 2013 +0100 | |
125 | @@ -81,7 +81,10 @@ | |
126 | "Thanks goes to all other people who contributed to any version.", | |
127 | "A full listing of all coders can be found in doc/Authors in the", | |
128 | "source.", | |
129 | - "", | |
130 | + 0, | |
131 | +}; | |
132 | + | |
133 | +const char *sourcestext[] = { | |
134 | "Sources:", | |
135 | !SUB!THIS! | |
136 |