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

Comparing ircd-hybrid/trunk/src/s_user.c (file contents):
Revision 1833 by michael, Fri Apr 19 19:16:09 2013 UTC vs.
Revision 1834 by michael, Fri Apr 19 19:50:27 2013 UTC

# Line 189 | Line 189 | show_lusers(struct Client *source_p)
189    }
190  
191    if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER))
192 <    sendto_one(source_p, RPL_LUSERCLIENT,
192 >    sendto_one(source_p, form_str(RPL_LUSERCLIENT),
193                 from, to, (Count.total-Count.invisi),
194                 Count.invisi, dlink_list_length(&global_serv_list));
195    else
196 <    sendto_one(source_p, RPL_LUSERCLIENT, from, to,
196 >    sendto_one(source_p, form_str(RPL_LUSERCLIENT), from, to,
197                 (Count.total-Count.invisi), Count.invisi, 1);
198  
199    if (Count.oper > 0)
200 <    sendto_one(source_p, RPL_LUSEROP,
200 >    sendto_one(source_p, form_str(RPL_LUSEROP),
201                 from, to, Count.oper);
202  
203    if (dlink_list_length(&unknown_list) > 0)
204 <    sendto_one(source_p, RPL_LUSERUNKNOWN,
204 >    sendto_one(source_p, form_str(RPL_LUSERUNKNOWN),
205                 from, to, dlink_list_length(&unknown_list));
206  
207    if (dlink_list_length(&global_channel_list) > 0)
208 <    sendto_one(source_p, RPL_LUSERCHANNELS,
208 >    sendto_one(source_p, form_str(RPL_LUSERCHANNELS),
209                 from, to, dlink_list_length(&global_channel_list));
210  
211    if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER))
212    {
213 <    sendto_one(source_p, RPL_LUSERME,
213 >    sendto_one(source_p, form_str(RPL_LUSERME),
214                 from, to, Count.local, Count.myserver);
215 <    sendto_one(source_p, RPL_LOCALUSERS,
215 >    sendto_one(source_p, form_str(RPL_LOCALUSERS),
216                 from, to, Count.local, Count.max_loc,
217                 Count.local, Count.max_loc);
218    }
219    else
220    {
221 <    sendto_one(source_p, RPL_LUSERME,
221 >    sendto_one(source_p, form_str(RPL_LUSERME),
222                 from, to, Count.total, 0);
223 <    sendto_one(source_p, RPL_LOCALUSERS,
223 >    sendto_one(source_p, form_str(RPL_LOCALUSERS),
224                 from, to, Count.total, Count.max_tot,
225                 Count.total, Count.max_tot);
226    }
227  
228 <  sendto_one(source_p, RPL_GLOBALUSERS,
228 >  sendto_one(source_p, form_str(RPL_GLOBALUSERS),
229               from, to, Count.total, Count.max_tot,
230               Count.total, Count.max_tot);
231  
232    if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER))
233 <    sendto_one(source_p, RPL_STATSCONN, from, to,
233 >    sendto_one(source_p, form_str(RPL_STATSCONN), from, to,
234                 Count.max_loc_con, Count.max_loc_cli, Count.totalrestartcount);
235  
236    if (Count.local > Count.max_loc_cli)
# Line 358 | Line 358 | register_local_user(struct Client *sourc
358      if (!match_conf_password(pass, conf))
359      {
360        ++ServerStats.is_ref;
361 <      sendto_one(source_p, ERR_PASSWDMISMATCH,
361 >      sendto_one(source_p, form_str(ERR_PASSWDMISMATCH),
362                   me.name, source_p->name);
363        exit_client(source_p, &me, "Bad Password");
364        return;
# Line 841 | Line 841 | set_user_mode(struct Client *client_p, s
841    if ((target_p = find_person(client_p, parv[1])) == NULL)
842    {
843      if (MyConnect(source_p))
844 <      sendto_one(source_p, ERR_NOSUCHCHANNEL,
844 >      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
845                   me.name, source_p->name, parv[1]);
846      return;
847    }
848  
849    if (source_p != target_p)
850    {
851 <     sendto_one(source_p, ERR_USERSDONTMATCH,
851 >     sendto_one(source_p, form_str(ERR_USERSDONTMATCH),
852                  me.name, source_p->name);
853       return;
854    }
# Line 863 | Line 863 | set_user_mode(struct Client *client_p, s
863          *m++ = (char)i;
864      *m = '\0';
865  
866 <    sendto_one(source_p, RPL_UMODEIS,
866 >    sendto_one(source_p, form_str(RPL_UMODEIS),
867                 me.name, source_p->name, buf);
868      return;
869    }
# Line 954 | Line 954 | set_user_mode(struct Client *client_p, s
954    }
955  
956    if (badflag)
957 <    sendto_one(source_p, ERR_UMODEUNKNOWNFLAG,
957 >    sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG),
958                 me.name, source_p->name);
959  
960    if (HasUMode(source_p, UMODE_NCHANGE) && !HasOFlag(source_p, OPER_FLAG_N))
# Line 1122 | Line 1122 | user_welcome(struct Client *source_p)
1122                 ssl_get_cipher(source_p->localClient->fd.ssl));
1123   #endif
1124  
1125 <  sendto_one(source_p, RPL_WELCOME, me.name, source_p->name,
1125 >  sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,
1126               ServerInfo.network_name, source_p->name);
1127 <  sendto_one(source_p, RPL_YOURHOST, me.name, source_p->name,
1127 >  sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,
1128               get_listener_name(source_p->localClient->listener), ircd_version);
1129 <  sendto_one(source_p, RPL_CREATED,
1129 >  sendto_one(source_p, form_str(RPL_CREATED),
1130               me.name, source_p->name, built_date);
1131 <  sendto_one(source_p, RPL_MYINFO,
1131 >  sendto_one(source_p, form_str(RPL_MYINFO),
1132               me.name, source_p->name, me.name, ircd_version, umode_buffer);
1133    show_isupport(source_p);
1134  
1135    if (source_p->id[0] != '\0')
1136 <    sendto_one(source_p, RPL_YOURID, me.name,
1136 >    sendto_one(source_p, form_str(RPL_YOURID), me.name,
1137                 source_p->name, source_p->id);
1138  
1139    show_lusers(source_p);
# Line 1145 | Line 1145 | user_welcome(struct Client *source_p)
1145      sendto_one(source_p,
1146                 ":%s NOTICE %s :*** Notice -- Please read the motd if you haven't "
1147                 "read it", me.name, source_p->name);
1148 <    sendto_one(source_p, RPL_MOTDSTART,
1148 >    sendto_one(source_p, form_str(RPL_MOTDSTART),
1149                 me.name, source_p->name, me.name);
1150 <    sendto_one(source_p, RPL_MOTD,
1150 >    sendto_one(source_p, form_str(RPL_MOTD),
1151                 me.name, source_p->name,
1152                 "*** This is the short motd ***");
1153 <    sendto_one(source_p, RPL_ENDOFMOTD,
1153 >    sendto_one(source_p, form_str(RPL_ENDOFMOTD),
1154                 me.name, source_p->name);
1155    }
1156    else  
# Line 1235 | Line 1235 | oper_up(struct Client *source_p)
1235    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s is now an operator",
1236                         get_oper_name(source_p));
1237    send_umode_out(source_p, source_p, old);
1238 <  sendto_one(source_p, RPL_YOUREOPER, me.name, source_p->name);
1238 >  sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
1239   }
1240  
1241   static char new_uid[TOTALSIDUID + 1];     /* allow for \0 */
# Line 1443 | Line 1443 | rebuild_isupport_message_line(void)
1443    int n = 0;
1444    int tokens = 0;
1445    size_t len = 0;
1446 <  size_t reserve = strlen(me.name) + HOSTLEN + strlen(RPL_ISUPPORT);
1446 >  size_t reserve = strlen(me.name) + HOSTLEN + strlen(form_str(RPL_ISUPPORT));
1447  
1448    destroy_MessageLine(isupportFile);
1449  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines