| 2 |
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
* |
| 4 |
|
* Copyright (c) 1999 Bahamut development team. |
| 5 |
< |
* Copyright (c) 2011-2014 ircd-hybrid development team |
| 5 |
> |
* Copyright (c) 2011-2015 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 |
| 28 |
|
#include "stdinc.h" |
| 29 |
|
#include "client.h" |
| 30 |
|
#include "ircd.h" |
| 31 |
– |
#include "server.h" |
| 31 |
|
#include "send.h" |
| 32 |
|
#include "channel_mode.h" |
| 33 |
|
#include "parse.h" |
| 54 |
|
static int |
| 55 |
|
ms_svsmode(struct Client *source_p, int parc, char *parv[]) |
| 56 |
|
{ |
| 57 |
+ |
const struct user_modes *tab = NULL; |
| 58 |
|
struct Client *target_p = NULL; |
| 59 |
|
int what = MODE_ADD; |
| 60 |
< |
unsigned int flag = 0, setmodes = 0; |
| 60 |
> |
unsigned int setmodes = 0; |
| 61 |
|
const char *modes = NULL, *extarg = NULL; |
| 62 |
|
time_t ts = 0; |
| 63 |
|
|
| 138 |
|
break; |
| 139 |
|
|
| 140 |
|
default: |
| 141 |
< |
if ((flag = user_modes[(unsigned char)*m])) |
| 141 |
> |
if ((tab = umode_map[(unsigned char)*m])) |
| 142 |
|
{ |
| 143 |
|
if (what == MODE_ADD) |
| 144 |
< |
AddUMode(target_p, flag); |
| 144 |
> |
AddUMode(target_p, tab->flag); |
| 145 |
|
else |
| 146 |
< |
DelUMode(target_p, flag); |
| 146 |
> |
DelUMode(target_p, tab->flag); |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
break; |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
if (extarg) |
| 154 |
< |
sendto_server(source_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s %s", |
| 154 |
> |
sendto_server(source_p, 0, 0, ":%s SVSMODE %s %lu %s %s", |
| 155 |
|
source_p->id, |
| 156 |
|
target_p->id, (unsigned long)target_p->tsinfo, modes, extarg); |
| 157 |
|
else |
| 158 |
< |
sendto_server(source_p, NOCAPS, NOCAPS, ":%s SVSMODE %s %lu %s", |
| 158 |
> |
sendto_server(source_p, 0, 0, ":%s SVSMODE %s %lu %s", |
| 159 |
|
source_p->id, |
| 160 |
|
target_p->id, (unsigned long)target_p->tsinfo, modes); |
| 161 |
|
|