| 119 |
|
{ |
| 120 |
|
char topic_info[USERHOST_REPLYLEN]; |
| 121 |
|
|
| 122 |
< |
ircsprintf(topic_info, "%s!%s@%s", source_p->name, |
| 123 |
< |
source_p->username, source_p->host); |
| 122 |
> |
snprintf(topic_info, sizeof(topic_info), "%s!%s@%s", source_p->name, |
| 123 |
> |
source_p->username, source_p->host); |
| 124 |
|
set_channel_topic(chptr, parv[2], topic_info, CurrentTime); |
| 125 |
|
|
| 126 |
|
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, |
| 127 |
|
":%s TOPIC %s :%s", |
| 128 |
|
ID(source_p), chptr->chname, |
| 129 |
< |
chptr->topic == NULL ? "" : chptr->topic); |
| 129 |
> |
chptr->topic); |
| 130 |
|
sendto_server(client_p, chptr, NOCAPS, CAP_TS6, |
| 131 |
|
":%s TOPIC %s :%s", |
| 132 |
|
source_p->name, chptr->chname, |
| 133 |
< |
chptr->topic == NULL ? "" : chptr->topic); |
| 133 |
> |
chptr->topic); |
| 134 |
|
sendto_channel_local(ALL_MEMBERS, 0, |
| 135 |
|
chptr, ":%s!%s@%s TOPIC %s :%s", |
| 136 |
|
source_p->name, |
| 137 |
|
source_p->username, |
| 138 |
|
source_p->host, |
| 139 |
< |
chptr->chname, chptr->topic == NULL ? |
| 140 |
< |
"" : chptr->topic); |
| 139 |
> |
chptr->chname, chptr->topic); |
| 140 |
|
} |
| 141 |
|
else |
| 142 |
|
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), |
| 146 |
|
{ |
| 147 |
|
if (!SecretChannel(chptr) || IsMember(source_p, chptr)) |
| 148 |
|
{ |
| 149 |
< |
if (chptr->topic == NULL) |
| 149 |
> |
if (chptr->topic[0] == '\0') |
| 150 |
|
sendto_one(source_p, form_str(RPL_NOTOPIC), |
| 151 |
|
from, to, chptr->chname); |
| 152 |
|
else |