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

Comparing ircd-hybrid/trunk/modules/m_svsmode.c (file contents):
Revision 2503 by michael, Sat Oct 26 15:51:36 2013 UTC vs.
Revision 3096 by michael, Sat Mar 1 23:31:45 2014 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 1999 by the Bahamut Development Team.
5 < *  Copyright (C) 2011 by the Hybrid Development Team.
4 > *  Copyright (c) 1999 Bahamut development team.
5 > *  Copyright (c) 2011-2014 ircd-hybrid development team
6   *
7   *  This program is free software; you can redistribute it and/or modify
8   *  it under the terms of the GNU General Public License as published by
# Line 48 | Line 48
48   * \param parv     Argument vector where parv[0] .. parv[parc-1] are non-NULL
49   *                 pointers.
50   * \note Valid arguments for this command are:
51 < *      - parv[0] = sender prefix
51 > *      - parv[0] = command
52   *      - parv[1] = nickname
53   *      - parv[2] = TS (or mode, depending on svs version)
54   *      - parv[3] = mode (or services id if old svs version)
55   *      - parv[4] = optional argument (services id)
56   */
57 < static void
57 > static int
58   ms_svsmode(struct Client *client_p, struct Client *source_p,
59             int parc, char *parv[])
60   {
# Line 65 | Line 65 | ms_svsmode(struct Client *client_p, stru
65    time_t ts = 0;
66  
67    if (!HasFlag(source_p, FLAGS_SERVICE))
68 <    return;
68 >    return 0;
69  
70    if ((parc >= 4) && ((*parv[3] == '+') || (*parv[3] == '-')))
71    {
# Line 80 | Line 80 | ms_svsmode(struct Client *client_p, stru
80    }
81  
82    if ((target_p = find_person(client_p, parv[1])) == NULL)
83 <    return;
83 >    return 0;
84  
85    if (ts && (ts != target_p->tsinfo))
86 <    return;
86 >    return 0;
87  
88    setmodes = target_p->umodes;
89  
# Line 121 | Line 121 | ms_svsmode(struct Client *client_p, stru
121              detach_conf(target_p, CONF_OPER);
122              ClrOFlag(target_p);
123              DelUMode(target_p, ConfigFileEntry.oper_only_umodes);
124 <
125 <           if ((dm = dlinkFindDelete(&oper_list, target_p)) != NULL)
126 <             free_dlink_node(dm);
124 >
125 >            if ((dm = dlinkFindDelete(&oper_list, target_p)))
126 >              free_dlink_node(dm);
127            }
128          }
129  
# Line 145 | Line 145 | ms_svsmode(struct Client *client_p, stru
145          break;
146  
147        case 'S':  /* Only servers may set +S in a burst */
148 +      case 'W':  /* Only servers may set +W in a burst */
149          break;
150  
151        default:
# Line 185 | Line 186 | ms_svsmode(struct Client *client_p, stru
186  
187      send_umode(target_p, target_p, setmodes, 0xffffffff, modebuf);
188    }
189 +
190 +  return 0;
191   }
192  
193 < static struct Message svsmode_msgtab = {
193 > static struct Message svsmode_msgtab =
194 > {
195    "SVSMODE", 0, 0, 3, MAXPARA, MFLG_SLOW, 0,
196 <  {m_ignore, m_ignore, ms_svsmode, m_ignore, m_ignore, m_ignore}
196 >  { m_ignore, m_ignore, ms_svsmode, m_ignore, m_ignore, m_ignore }
197   };
198  
199   static void
# Line 204 | Line 208 | module_exit(void)
208    mod_del_cmd(&svsmode_msgtab);
209   }
210  
211 < struct module module_entry = {
211 > struct module module_entry =
212 > {
213    .node    = { NULL, NULL, NULL },
214    .name    = NULL,
215    .version = "$Revision$",

Diff Legend

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