| 78 |
|
|
| 79 |
|
if ((ms = find_channel_link(source_p, chptr)) == NULL) |
| 80 |
|
{ |
| 81 |
< |
sendto_one_numeric(source_p, &me, ERR_NOTONCHANNEL, chptr->chname); |
| 81 |
> |
sendto_one_numeric(source_p, &me, ERR_NOTONCHANNEL, chptr->name); |
| 82 |
|
return 0; |
| 83 |
|
} |
| 84 |
|
|
| 92 |
|
channel_set_topic(chptr, parv[2], topic_info, CurrentTime, 1); |
| 93 |
|
|
| 94 |
|
sendto_server(source_p, NOCAPS, NOCAPS, ":%s TOPIC %s :%s", |
| 95 |
< |
source_p->id, chptr->chname, |
| 95 |
> |
source_p->id, chptr->name, |
| 96 |
|
chptr->topic); |
| 97 |
|
sendto_channel_local(ALL_MEMBERS, 0, |
| 98 |
|
chptr, ":%s!%s@%s TOPIC %s :%s", |
| 99 |
|
source_p->name, |
| 100 |
|
source_p->username, |
| 101 |
|
source_p->host, |
| 102 |
< |
chptr->chname, chptr->topic); |
| 102 |
> |
chptr->name, chptr->topic); |
| 103 |
|
} |
| 104 |
|
else |
| 105 |
< |
sendto_one_numeric(source_p, &me, ERR_CHANOPRIVSNEEDED, chptr->chname); |
| 105 |
> |
sendto_one_numeric(source_p, &me, ERR_CHANOPRIVSNEEDED, chptr->name); |
| 106 |
|
} |
| 107 |
|
else /* only asking for topic */ |
| 108 |
|
{ |
| 109 |
|
if (!SecretChannel(chptr) || IsMember(source_p, chptr)) |
| 110 |
|
{ |
| 111 |
|
if (chptr->topic[0] == '\0') |
| 112 |
< |
sendto_one_numeric(source_p, &me, RPL_NOTOPIC, chptr->chname); |
| 112 |
> |
sendto_one_numeric(source_p, &me, RPL_NOTOPIC, chptr->name); |
| 113 |
|
else |
| 114 |
|
{ |
| 115 |
|
sendto_one_numeric(source_p, &me, RPL_TOPIC, |
| 116 |
< |
chptr->chname, chptr->topic); |
| 117 |
< |
sendto_one_numeric(source_p, &me, RPL_TOPICWHOTIME, chptr->chname, |
| 116 |
> |
chptr->name, chptr->topic); |
| 117 |
> |
sendto_one_numeric(source_p, &me, RPL_TOPICWHOTIME, chptr->name, |
| 118 |
|
chptr->topic_info, |
| 119 |
|
chptr->topic_time); |
| 120 |
|
} |
| 121 |
|
} |
| 122 |
|
else |
| 123 |
< |
sendto_one_numeric(source_p, &me, ERR_NOTONCHANNEL, chptr->chname); |
| 123 |
> |
sendto_one_numeric(source_p, &me, ERR_NOTONCHANNEL, chptr->name); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
return 0; |
| 165 |
|
channel_set_topic(chptr, parv[2], topic_info, CurrentTime, 0); |
| 166 |
|
|
| 167 |
|
sendto_server(source_p, NOCAPS, NOCAPS, ":%s TOPIC %s :%s", |
| 168 |
< |
source_p->id, chptr->chname, |
| 168 |
> |
source_p->id, chptr->name, |
| 169 |
|
chptr->topic); |
| 170 |
|
|
| 171 |
|
if (!IsClient(source_p)) |
| 172 |
|
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s TOPIC %s :%s", |
| 173 |
|
source_p->name, |
| 174 |
< |
chptr->chname, chptr->topic); |
| 174 |
> |
chptr->name, chptr->topic); |
| 175 |
|
|
| 176 |
|
else |
| 177 |
|
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s TOPIC %s :%s", |
| 178 |
|
source_p->name, |
| 179 |
|
source_p->username, |
| 180 |
|
source_p->host, |
| 181 |
< |
chptr->chname, chptr->topic); |
| 181 |
> |
chptr->name, chptr->topic); |
| 182 |
|
return 0; |
| 183 |
|
} |
| 184 |
|
|