/[svn]/ircd-hybrid/trunk/src/s_user.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/s_user.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2344 by michael, Fri Jun 21 12:50:33 2013 UTC revision 2345 by michael, Wed Jul 3 18:17:39 2013 UTC
# Line 64  static const char *uid_get(void); Line 64  static const char *uid_get(void);
64   * used with init_isupport, add_isupport, delete_isupport   * used with init_isupport, add_isupport, delete_isupport
65   */   */
66    
67  struct Isupport  struct Isupport
68  {  {
69    dlink_node node;    dlink_node node;
70    char *name;    char *name;
# Line 109  const unsigned int user_modes[256] = Line 109  const unsigned int user_modes[256] =
109    0,                  /* X */    0,                  /* X */
110    0,                  /* Y */    0,                  /* Y */
111    0,                  /* Z 0x5A */    0,                  /* Z 0x5A */
112    0, 0, 0, 0, 0,      /* 0x5F   */    0, 0, 0, 0, 0,      /* 0x5F   */
113    0,                  /* 0x60   */    0,                  /* 0x60   */
114    UMODE_ADMIN,        /* a */    UMODE_ADMIN,        /* a */
115    UMODE_BOTS,         /* b */    UMODE_BOTS,         /* b */
# Line 169  assemble_umode_buffer(void) Line 169  assemble_umode_buffer(void)
169   * side effects - display to client user counts etc.   * side effects - display to client user counts etc.
170   */   */
171  void  void
172  show_lusers(struct Client *source_p)  show_lusers(struct Client *source_p)
173  {  {
174    const char *from, *to;    const char *from, *to;
175    
# Line 215  show_lusers(struct Client *source_p) Line 215  show_lusers(struct Client *source_p)
215    {    {
216      sendto_one(source_p, form_str(RPL_LUSERME),      sendto_one(source_p, form_str(RPL_LUSERME),
217                 from, to, Count.total, 0);                 from, to, Count.total, 0);
218      sendto_one(source_p, form_str(RPL_LOCALUSERS),      sendto_one(source_p, form_str(RPL_LOCALUSERS),
219                 from, to, Count.total, Count.max_tot);                 from, to, Count.total, Count.max_tot);
220    }    }
221    
# Line 230  show_lusers(struct Client *source_p) Line 230  show_lusers(struct Client *source_p)
230      Count.max_loc_cli = Count.local;      Count.max_loc_cli = Count.local;
231    
232    if ((Count.local + Count.myserver) > Count.max_loc_con)    if ((Count.local + Count.myserver) > Count.max_loc_con)
233      Count.max_loc_con = Count.local + Count.myserver;      Count.max_loc_con = Count.local + Count.myserver;
234  }  }
235    
236  /* show_isupport()  /* show_isupport()
# Line 240  show_lusers(struct Client *source_p) Line 240  show_lusers(struct Client *source_p)
240   * side effects - display to client what we support (for them)   * side effects - display to client what we support (for them)
241   */   */
242  void  void
243  show_isupport(struct Client *source_p)  show_isupport(struct Client *source_p)
244  {  {
245    const dlink_node *ptr = NULL;    const dlink_node *ptr = NULL;
246    
# Line 484  register_remote_user(struct Client *sour Line 484  register_remote_user(struct Client *sour
484    assert(source_p != NULL);    assert(source_p != NULL);
485    assert(source_p->username != username);    assert(source_p->username != username);
486    
487    strlcpy(source_p->host, host, sizeof(source_p->host));    strlcpy(source_p->host, host, sizeof(source_p->host));
488    strlcpy(source_p->username, username, sizeof(source_p->username));    strlcpy(source_p->username, username, sizeof(source_p->username));
489    
490    /*    /*
# Line 872  set_user_mode(struct Client *client_p, s Line 872  set_user_mode(struct Client *client_p, s
872            }            }
873            else            else
874            {            {
             /* Only decrement the oper counts if an oper to begin with  
              * found by Pat Szuta, Perly , perly@xnet.com  
              */  
875              if (!HasUMode(source_p, UMODE_OPER))              if (!HasUMode(source_p, UMODE_OPER))
876                break;                break;
877    
# Line 1158  user_welcome(struct Client *source_p) Line 1155  user_welcome(struct Client *source_p)
1155    }    }
1156  #endif  #endif
1157    
1158    sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,    sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,
1159               ServerInfo.network_name, source_p->name);               ServerInfo.network_name, source_p->name);
1160    sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,    sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,
1161               get_listener_name(source_p->localClient->listener), ircd_version);               get_listener_name(source_p->localClient->listener), ircd_version);
# Line 1217  check_xline(struct Client *source_p) Line 1214  check_xline(struct Client *source_p)
1214   * output       - NONE   * output       - NONE
1215   * side effects - Blindly opers up given source_p, using conf info   * side effects - Blindly opers up given source_p, using conf info
1216   *                all checks on passwords have already been done.   *                all checks on passwords have already been done.
1217   *                This could also be used by rsa oper routines.   *                This could also be used by rsa oper routines.
1218   */   */
1219  void  void
1220  oper_up(struct Client *source_p)  oper_up(struct Client *source_p)
# Line 1269  valid_sid(const char *sid) Line 1266  valid_sid(const char *sid)
1266    
1267  /*  /*
1268   * init_uid()   * init_uid()
1269   *   *
1270   * inputs       - NONE   * inputs       - NONE
1271   * output       - NONE   * output       - NONE
1272   * side effects - new_uid is filled in with server id portion (sid)   * side effects - new_uid is filled in with server id portion (sid)
# Line 1287  init_uid(void) Line 1284  init_uid(void)
1284      strlcpy(new_uid, ServerInfo.sid, sizeof(new_uid));      strlcpy(new_uid, ServerInfo.sid, sizeof(new_uid));
1285    
1286    for (i = 0; i < IRC_MAXSID; ++i)    for (i = 0; i < IRC_MAXSID; ++i)
1287      if (new_uid[i] == '\0')      if (new_uid[i] == '\0')
1288        new_uid[i] = 'A';        new_uid[i] = 'A';
1289    
1290    /* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */    /* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */

Legend:
Removed from v.2344  
changed lines
  Added in v.2345

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28