ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_topic.c
(Generate patch)

Comparing ircd-hybrid-8/modules/m_topic.c (file contents):
Revision 1178 by michael, Mon Aug 15 08:11:31 2011 UTC vs.
Revision 1203 by michael, Tue Aug 23 20:06:08 2011 UTC

# Line 119 | Line 119 | m_topic(struct Client *client_p, struct
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),
# Line 147 | Line 146 | m_topic(struct Client *client_p, struct
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

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)