133 |
|
|
134 |
|
if (accept_remote) |
135 |
|
{ |
136 |
< |
int topic_differs = strcmp(chptr->topic ? chptr->topic : "", topic); |
136 |
> |
int topic_differs = strcmp(chptr->topic, topic); |
137 |
|
|
138 |
|
set_channel_topic(chptr, topic, setby, remote_topic_ts); |
139 |
|
|
140 |
|
if (topic_differs) |
141 |
|
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s TOPIC %s :%s", |
142 |
|
ConfigServerHide.hide_servers ? me.name : source_p->name, |
143 |
< |
chptr->chname, chptr->topic == NULL ? "" : chptr->topic); |
143 |
> |
chptr->chname, chptr->topic); |
144 |
|
} |
145 |
|
|
146 |
|
/* |
208 |
|
set_topic(struct Client *source_p, struct Channel *chptr, time_t topicts, |
209 |
|
const char *topicwho, const char *topic) |
210 |
|
{ |
211 |
< |
int new_topic = strcmp(chptr->topic ? chptr->topic : "", topic); |
211 |
> |
int new_topic = strcmp(chptr->topic, topic); |
212 |
|
|
213 |
|
set_channel_topic(chptr, topic, topicwho, topicts); |
214 |
|
|
216 |
|
if (new_topic) |
217 |
|
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s TOPIC %s :%s", |
218 |
|
ConfigServerHide.hide_servers ? me.name : source_p->name, |
219 |
< |
chptr->chname, chptr->topic == NULL ? "" : chptr->topic); |
219 |
> |
chptr->chname, chptr->topic); |
220 |
|
|
221 |
|
sendto_server(source_p, chptr, CAP_TBURST, NOCAPS, |
222 |
|
":%s TBURST %lu %s %lu %s :%s", |
223 |
|
me.name, (unsigned long)chptr->channelts, chptr->chname, |
224 |
|
(unsigned long)chptr->topic_time, |
225 |
< |
chptr->topic_info == NULL ? "" : chptr->topic_info, |
226 |
< |
chptr->topic == NULL ? "" : chptr->topic); |
225 |
> |
chptr->topic_info, |
226 |
> |
chptr->topic); |
227 |
|
sendto_server(source_p, chptr, CAP_TB, CAP_TBURST, |
228 |
|
":%s TB %s %lu %s :%s", |
229 |
|
me.name, chptr->chname, |
230 |
|
(unsigned long)chptr->topic_time, |
231 |
< |
chptr->topic_info == NULL ? "" : chptr->topic_info, |
232 |
< |
chptr->topic == NULL ? "" : chptr->topic); |
231 |
> |
chptr->topic_info, |
232 |
> |
chptr->topic); |
233 |
|
} |