diff --git a/include/s_user.h b/include/s_user.h index 1395705..50b390f 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.h,v 1.4 2002/09/13 06:50:06 fishwaldo Exp $ + * $Id: s_user.h,v 1.5 2002/09/25 07:43:27 fishwaldo Exp $ */ #ifndef INCLUDED_s_user_h @@ -34,7 +34,7 @@ extern time_t LastUsedWallops; extern int user_mode(struct Client* , struct Client* , int, char** ); extern void send_umode (struct Client* , struct Client* , int, int, char* ); -extern void send_umode_out(struct Client* , struct Client* , int); +extern void send_umode_out(struct Client*, struct Client* , struct Client* , int); extern int show_lusers(struct Client* source_p); extern int register_local_user(struct Client* ,struct Client* , char* ,char* ); diff --git a/modules/m_svscmds.c b/modules/m_svscmds.c index 8f4fcfa..5a8db06 100644 --- a/modules/m_svscmds.c +++ b/modules/m_svscmds.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_svscmds.c,v 1.7 2002/09/23 10:47:30 fishwaldo Exp $ + * $Id: m_svscmds.c,v 1.8 2002/09/25 07:43:28 fishwaldo Exp $ */ /* List of ircd includes from ../include/ */ @@ -34,6 +34,7 @@ #include "s_conf.h" #include "s_log.h" #include "s_serv.h" +#include "s_user.h" #include "send.h" #include "msg.h" #include "parse.h" @@ -133,7 +134,7 @@ _moddeinit(void) /* When we last modified the file (shown in /modlist), this is usually: */ -const char *_version = "$Revision: 1.7 $"; +const char *_version = "$Revision: 1.8 $"; #endif /* @@ -311,17 +312,11 @@ static void ms_svsjoin(struct Client *client_p, struct Client *source_p, char sjmode; char *newch; - /* if its from a client, and its not services, ignore it */ - if(!IsServices(source_p) && IsClient(source_p)) - { - sendto_one(source_p, ":%s NOTICE %s :Restricted to Services", me.name, parv[0]); - return; - } /* if its from a server, and its not ulined, ignore it */ if (!IsUlined(source_p) && IsServer(source_p)) return; - if((hunt_server(client_p, source_p, ":%s FORCEJOIN %s %s", 1, parc, parv)) != HUNTED_ISME) + if((hunt_server(client_p, source_p, ":%s SVSJOIN %s %s", 1, parc, parv)) != HUNTED_ISME) return; /* if target_p is not existant, print message @@ -481,17 +476,11 @@ static void ms_svspart(struct Client *client_p, struct Client *source_p, struct Client *target_p; struct Channel *chptr; - /* if its from a client, and its not services, ignore it */ - if(!IsServices(source_p) && IsClient(source_p)) - { - sendto_one(source_p, ":%s NOTICE %s :Restricted to Services", me.name, parv[0]); - return; - } /* if its from a server, and its not ulined, ignore it */ if (!IsUlined(source_p) && IsServer(source_p)) return; - if((hunt_server(client_p, source_p, ":%s FORCEPART %s %s", 1, parc, parv)) != HUNTED_ISME) + if((hunt_server(client_p, source_p, ":%s SVSPART %s %s", 1, parc, parv)) != HUNTED_ISME) return; /* if target_p == NULL then let the oper know */ diff --git a/src/s_user.c b/src/s_user.c index e7be9ae..21403ed 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.c,v 1.22 2002/09/24 13:49:45 fishwaldo Exp $ + * $Id: s_user.c,v 1.23 2002/09/25 07:43:28 fishwaldo Exp $ */ #include "stdinc.h" @@ -1100,7 +1100,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, char *parv me.name, parv[0]); target_p->umodes &= ~FLAGS_ADMIN; } - if (!IsUlined(target_p->from) && (target_p->umodes & FLAGS_SERVICES)) + if (!IsUlined(target_p->from) && (setflags & FLAGS_SERVICES)) { sendto_one(source_p, ":%s NOTICE %s :*** Only Services can set +S", me.name, parv[0]); @@ -1124,7 +1124,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, char *parv * compare new flags with old flags and send string which * will cause servers to update correctly. */ - send_umode_out(client_p, target_p, setflags); + send_umode_out(source_p, client_p, target_p, setflags); return 0; } @@ -1192,32 +1192,32 @@ send_umode(struct Client *client_p, struct Client *source_p, int old, * side effects - Only send ubuf out to servers that know about this client */ void -send_umode_out(struct Client *client_p, - struct Client *source_p, +send_umode_out(struct Client *source_p, struct Client *client_p, + struct Client *target_p, int old) { - struct Client *target_p; + struct Client *starget_p; char buf[BUFSIZE]; dlink_node *ptr; - send_umode(source_p, source_p, old, ALL_UMODES, buf); + send_umode(target_p, target_p, old, ALL_UMODES, buf); for(ptr = serv_list.head; ptr; ptr = ptr->next) { - target_p = ptr->data; + starget_p = ptr->data; - if((target_p != client_p) && (target_p != source_p) && (*buf)) + if((starget_p != client_p) && (starget_p != client_p) && (*buf)) { - if((!(ServerInfo.hub && IsCapable(target_p, CAP_LL))) - || (target_p->localClient->serverMask & - source_p->lazyLinkClientExists)) - sendto_one(target_p, ":%s MODE %s :%s", - client_p->name, source_p->name, buf); + if((!(ServerInfo.hub && IsCapable(starget_p, CAP_LL))) + || (starget_p->localClient->serverMask & + target_p->lazyLinkClientExists)) + sendto_one(starget_p, ":%s MODE %s :%s", + source_p->name, target_p->name, buf); } } - if (client_p && MyClient(client_p)) - send_umode(client_p, source_p, old, ALL_UMODES, buf); + if (client_p && MyClient(target_p)) + send_umode(client_p, target_p, old, ALL_UMODES, buf); } /* @@ -1403,7 +1403,7 @@ oper_up( struct Client *source_p, struct ConfItem *aconf ) sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "%s (%s@%s) is now an %s", source_p->name, source_p->username, source_p->host, (IsOperAdmin(source_p) ? "Administrator" : "Operator")); - send_umode_out(source_p, source_p, old); + send_umode_out(source_p, source_p, source_p, old); sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name); sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s", me.name, source_p->name, operprivs);