/[svn]/ircd-hybrid-7.2/modules/core/m_join.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/modules/core/m_join.c

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

revision 852 by michael, Thu Jun 1 10:53:00 2006 UTC revision 853 by db, Thu Feb 22 06:01:30 2007 UTC
# Line 303  m_join(struct Client *client_p, struct C Line 303  m_join(struct Client *client_p, struct C
303   * inputs       - parv[0] = uid   * inputs       - parv[0] = uid
304   *                parv[1] = ts   *                parv[1] = ts
305   *                parv[2] = channel name   *                parv[2] = channel name
306   *                parv[3] = modes   *                parv[3] = modes (Deprecated)
307   * output       - none   * output       - none
308   * side effects - handles remote JOIN's sent by servers. In TSora   * side effects - handles remote JOIN's sent by servers. In TSora
309   *                remote clients are joined using SJOIN, hence a   *                remote clients are joined using SJOIN, hence a
# Line 321  ms_join(struct Client *client_p, struct Line 321  ms_join(struct Client *client_p, struct
321    int keep_our_modes = 1;    int keep_our_modes = 1;
322    int keep_new_modes = 1;    int keep_new_modes = 1;
323    int isnew = 0;    int isnew = 0;
   const char *s = NULL;  
324    const char *servername = NULL;    const char *servername = NULL;
325    struct Channel *chptr = NULL;    struct Channel *chptr = NULL;
326    struct Mode mode, *oldmode;    struct Mode mode, *oldmode;
# Line 347  ms_join(struct Client *client_p, struct Line 346  ms_join(struct Client *client_p, struct
346    mode.mode = mode.limit = 0;    mode.mode = mode.limit = 0;
347    mode.key[0] = '\0';    mode.key[0] = '\0';
348    
   for (s = parv[3]; *s; ++s)  
   {  
     switch (*s)  
     {  
       case 't':  
         mode.mode |= MODE_TOPICLIMIT;  
         break;  
       case 'n':  
         mode.mode |= MODE_NOPRIVMSGS;  
         break;  
       case 's':  
         mode.mode |= MODE_SECRET;  
         break;  
       case 'm':  
         mode.mode |= MODE_MODERATED;  
         break;  
       case 'i':  
         mode.mode |= MODE_INVITEONLY;  
         break;  
       case 'p':  
         mode.mode |= MODE_PRIVATE;  
         break;  
       case 'k':  
         if (parc < 5 + args)  
           return;  
   
         strlcpy(mode.key, parv[4 + args], sizeof(mode.key));  
         args++;  
         break;  
       case 'l':  
         if (parc < 5 + args)  
           return;  
   
         mode.limit = atoi(parv[4 + args]);  
         args++;  
         break;  
     }  
   }  
   
   
349    if ((chptr = hash_find_channel(parv[2])) == NULL)    if ((chptr = hash_find_channel(parv[2])) == NULL)
350    {    {
351      isnew = 1;      isnew = 1;

Legend:
Removed from v.852  
changed lines
  Added in v.853

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