Shitloads of updates. Check Changelog.

This commit is contained in:
fishwaldo 2002-09-13 16:30:05 +00:00
parent bdf6023ddd
commit 7c33c4d52e
58 changed files with 666 additions and 292 deletions

1
.gitattributes vendored
View file

@ -376,6 +376,7 @@ modules/m_restart.c -text
modules/m_resv.c -text
modules/m_set.c -text
modules/m_sethost.c -text
modules/m_smo.c -text
modules/m_stats.c -text
modules/m_svinfo.c -text
modules/m_svscmds.c -text

View file

@ -43,3 +43,10 @@ Symbols are:
(F) - This is version 0.9.1 Getting ready for Beta testing by Closed group.
(F) - Added m_map to core modules
(F) - HiddenServer and Ulined Servers are now set via *nice* Server command (<*optional*prefix*optional*> SERVER <name> <hops> <*new*Flags*new*> :<infoline>)
(F) - Removed all Default Capabilites from CAPAB command
(F) - Sendto_realops_flags can now send network wide if flags = FLAGS_REMOTE.
(F) - Added m_smo.c to support network wide oper messages. <prefix> SMO <flags> <level> :<message>
(F) - resv/unresv is now global (ie, network wide... )
(F) - Glines are now sent to servers when they connect
(F) - Ungline is now global
(F) - Added SWHOIS to whois. Opers and servers can set swhois

13
TODO
View file

@ -1,18 +1,7 @@
$Id: TODO,v 1.6 2002/09/13 06:50:04 fishwaldo Exp $
$Id: TODO,v 1.7 2002/09/13 16:30:02 fishwaldo Exp $
NeoStats HostServ should accept /privmsg hostserv login <username> <password> for NeoIRCD vhost support!
Does Glines get propogated to new servers that have just joined the network? I don't think so, but have to confirm.
SQlines etc need to be propogated
sendto_realops and sendto_realops_flags needs ability to send network wide (not just server wide)
update SERVER command, so Hidden, or Dynamic U-lined servers are introduced in a nicer way (Not via Server info line, as its done now)
SWHOIS support (I love it!)
POST 1.0
*Umode +b (Bots) to identify bots (iEf2002)
*it would be nice if we could pass message handlers the actuall command that triggered the handler

View file

@ -24,7 +24,7 @@ NO PARAMETERS:
+m - 'Moderated'. This will prevent any user who isn't opped,
half-opped or voiced (+o/+h/+v) from talking in the channel.
+a - 'Anonymous ops'. This will stop people who join from
+A - 'Anonymous ops'. This will stop people who join from
seeing who has ops. Any modes set in the channel will
be shown as if a server set them.
@ -32,11 +32,17 @@ NO PARAMETERS:
receive an op sync, where the server will op every user
that is opped. They will then see modes normally, and
have the true list of who has ops/half-ops/voices
Can only be set by Channel Admins (+a)
+i - 'Invite only'. This will stop anyone from joining your
channel who hasn't received an /invite or whose host isn't in
the +I list.
+O - 'Operator Only'. This will stop normal users from joining a
channel set aside for Operators only. /invite or
Invite exceptions can be used to help non-opers join the
channel.
WITH PARAMETERS:
----------------
@ -65,12 +71,16 @@ WITH PARAMETERS:
PARAMS: /mode #channel +hhhh nick1 nick2 nick3 nick4
+o - 'Op'. This gives the user full control over the channel.
+o - 'Op'. This gives the user almost control over the channel.
An opped user may op other users, set any mode, and
remove ops from whoever they want.
PARAMS: /mode #channel +oooo nick1 nick2 nick3 nick4
+a - 'Admin'. This gives the user full control over the channel.
Admin mode is given to the first user to join the
channel, and they may set options like Anonops and so on.
+b - 'Ban'. This will prevent a user from entering the channel,
based on a nick!ident@host match.

View file

@ -4,8 +4,4 @@ GLINE <user@host> :[reason]
Attempts to add a global IRC-network wide ban on
<user@host> for the reason [reason].
It takes three different opers on three different
servers to do the same GLINE within a short interval,
to have a GLINE triggered for a compiled time of hours.
- Requires Oper Priv: G

View file

@ -1,7 +1,7 @@
Help topics available to opers:
ACCEPT ADMIN AWAY CAPAB
CBURST CHALLENGE CJOIN CLIENT
CBURST CHALLENGE CLIENT
CLOSE CMODE CONNECT CREDITS
CRYPTLINK DIE DLINE DMEM
DROP EOB ERROR GLINE

View file

@ -6,9 +6,10 @@ user or channel specified.
NOTICE supports the following prefixes for sending
messages to specific clients in a channel:
@ - channel operators only
% - channel operators and half-ops
+ - operators, half-ops, and voiced users
* - channel Admins only
@ - channel operators and admins
% - channel operators and half-ops and admins
+ - operators, half-ops, and voiced users and admins
Two other targets are permitted:

View file

@ -6,9 +6,10 @@ user or channel specified.
PRIVMSG supports the following prefixes for sending
messages to specific clients in a channel:
@ - channel operators only
% - channel operators and half-ops
+ - operators, half-ops, and voiced users
* - channel Admins only
@ - channel operators and admins only
% - channel operators and half-ops and admins
+ - operators, half-ops, and voiced users and admins
Two other targets are permitted:

View file

@ -13,7 +13,7 @@ Usermodes: (* designates that the umode is oper only)
* +s - Can see generic server messages and oper kills.
* +c - Can see client connections and exits.
* +u - Can see unauthorized client connections.
* +r - Can see 'rejected' client notices.
* +R - Can see 'rejected' client notices.
* +k - Can see server kill messages.
* +f - Can see 'I-line is full' notices.
* +y - Can see stats/links/admin requests to name a few.
@ -21,5 +21,7 @@ Usermodes: (* designates that the umode is oper only)
* +n - Can see client nick changes.
* +x - Can see new server introduction and split messages.
* +b - Can see possible bot warnings.
* +a - Is marked as a server admin in whois.
* +A - Is marked as a server admin in whois.
+g - "caller id" mode only allow accept clients to message you
+r - Registered Nickname (only can be set by Services)
+S - Services Bot

View file

@ -8,3 +8,5 @@ Usermodes:
Use the /oper command to attain this.
+i - Designates this client 'invisible'.
+g - "caller id" mode only allow accept clients to message you
+x - "Hidden Host/Vhost" means this client is using a vhost,
or hidden host, and not the real host.

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: client.h,v 1.7 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: client.h,v 1.8 2002/09/13 16:30:03 fishwaldo Exp $
*/
#ifndef INCLUDED_client_h
@ -184,7 +184,12 @@ struct Client
* client->host alone
*/
char vhost[HOSTLEN +1];
/*
* client->swhois stores a swhois structure
* swhois is a string that is sent to users if set when they whois this client
* allows you to set things like :is a WebMonkey to the whois output
*/
char swhois[REALLEN +1];
/* caller ID allow list */
/* This has to be here, since a client on an on_allow_list could
@ -416,6 +421,7 @@ struct LocalUser
#define FLAGS_ADMIN 0x100000 /* Admin on server */
#define FLAGS_SERVICES 0x200000 /* Is Services */
#define FLAGS_ULINED 0x400000 /* is a ulined server? */
#define FLAGS_REMOTE 0x800000 /* sendto_realops_flags flag to send message to remote servers */
#define FLAGS_ALL FLAGS_SERVNOTICE

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: numeric.h,v 1.6 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: numeric.h,v 1.7 2002/09/13 16:30:03 fishwaldo Exp $
*/
#ifndef INCLUDED_numeric_h
@ -231,7 +231,7 @@ extern const char* form_str(int);
#define RPL_ENDOFWHOIS 318
#define RPL_WHOISCHANNELS 319
/* RPL_WHOIS_HIDDEN 320 Anothernet +h, ick! */
/* RPL_WHOISSPECIAL 320 unreal */
#define RPL_SWHOIS 320
#define RPL_LISTSTART 321
#define RPL_LIST 322
#define RPL_LISTEND 323

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: resv.h,v 1.3 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: resv.h,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#ifndef INCLUDED_resv_h
@ -65,6 +65,9 @@ extern int find_channel_resv(char *);
extern int find_nick_resv(char *);
extern void report_resv(struct Client *);
extern void send_resv(struct Client *);
extern struct ResvNick *return_nick_resv(char *);
extern int clean_resv_nick(char *);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_gline.h,v 1.4 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: s_gline.h,v 1.5 2002/09/13 16:30:03 fishwaldo Exp $
*/
#ifndef INCLUDED_s_gline_h
@ -36,7 +36,7 @@ extern struct ConfItem* find_is_glined(const char* host, const char* name);
extern int remove_gline_match(const char *user, const char *host);
extern void cleanup_glines();
extern void add_gline(struct ConfItem *);
extern void send_glines(struct Client *client_p);
#define CLEANUP_GLINES_TIME 300

View file

@ -1,7 +1,7 @@
#
# Makefile.in for ircd/modules
#
# $Id: Makefile.in,v 1.8 2002/09/13 07:05:32 fishwaldo Exp $
# $Id: Makefile.in,v 1.9 2002/09/13 16:30:03 fishwaldo Exp $
#
CC = @CC@
AR = @AR@
@ -90,8 +90,10 @@ SRCS = \
m_restart.c \
m_resv.c \
m_set.c \
m_smo.c \
m_stats.c \
m_svinfo.c \
m_swhois.c \
m_testline.c \
m_time.c \
m_topic.c \

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_kill.c,v 1.4 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_kill.c,v 1.5 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -64,7 +64,7 @@ _moddeinit(void)
mod_del_cmd(&kill_msgtab);
}
const char *_version = "$Revision: 1.4 $";
const char *_version = "$Revision: 1.5 $";
#endif
/*
** mo_kill
@ -134,7 +134,7 @@ static void mo_kill(struct Client *client_p, struct Client *source_p,
/* Do not change the format of this message. There's no point in changing messages
* that have been around for ever, for no reason.. */
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Received KILL message for %s. From %s Path: %s (%s)",
target_p->name, parv[0], me.name, reason);
@ -263,14 +263,14 @@ static void ms_kill(struct Client *client_p, struct Client *source_p,
*/
if (IsOper(source_p)) /* send it normally */
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Received KILL message for %s. From %s Path: %s!%s!%s!%s %s",
target_p->name, parv[0], source_p->user->server,
source_p->host, source_p->username, source_p->name, reason);
}
else
{
sendto_realops_flags(FLAGS_SKILL, L_ALL,
sendto_realops_flags(FLAGS_SKILL|FLAGS_REMOTE, L_ALL,
"Received KILL message for %s. From %s %s",
target_p->name, parv[0], reason);
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_message.c,v 1.6 2002/09/13 09:17:14 fishwaldo Exp $
* $Id: m_message.c,v 1.7 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -122,7 +122,7 @@ _moddeinit(void)
mod_del_cmd(&notice_msgtab);
}
const char *_version = "$Revision: 1.6 $";
const char *_version = "$Revision: 1.7 $";
#endif
/*
@ -691,7 +691,7 @@ flood_attack_client(int p_or_n, struct Client *source_p,
{
if (target_p->localClient->flood_noticed == 0)
{
sendto_realops_flags(FLAGS_BOTS, L_ALL,
sendto_realops_flags(FLAGS_BOTS|FLAGS_REMOTE, L_ALL,
"Possible Flooder %s [%s@%s] on %s target: %s",
source_p->name, source_p->username,
source_p->vhost,
@ -747,7 +747,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p,
{
if (chptr->flood_noticed == 0)
{
sendto_realops_flags(FLAGS_BOTS, L_ALL,
sendto_realops_flags(FLAGS_BOTS|FLAGS_REMOTE, L_ALL,
"Possible Flooder %s [%s@%s] on %s target: %s",
source_p->name, source_p->username,
source_p->vhost,
@ -864,7 +864,7 @@ handle_opers(int p_or_n, char *command, struct Client *client_p,
/* Check if someones msg'ing opers@our.server */
if (strcmp(nick, "opers") == 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL, "To opers: From: %s: %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "To opers: From: %s: %s",
source_p->name, text);
return;
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_nick.c,v 1.7 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_nick.c,v 1.8 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -97,7 +97,7 @@ _moddeinit(void)
mod_del_cmd(&client_msgtab);
}
const char *_version = "$Revision: 1.7 $";
const char *_version = "$Revision: 1.8 $";
#endif
/*
@ -338,7 +338,7 @@ static void ms_nick(struct Client *client_p, struct Client *source_p,
strcat(tbuf, " ");
}
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Dropping server %s due to (invalid) command 'NICK' "
"with only %d arguments. (Buf: '%s')",
client_p->name, parc, tbuf);
@ -363,7 +363,7 @@ static void ms_nick(struct Client *client_p, struct Client *source_p,
/* check the length of the clients gecos */
if(strlen(parv[9]) > REALLEN)
{
sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Long realname from server %s for %s",
parv[7], parv[1]);
parv[9][REALLEN] = '\0';
}
@ -438,7 +438,7 @@ static void ms_client(struct Client *client_p, struct Client *source_p,
/* check length of clients gecos */
if (strlen(name) > REALLEN)
{
sendto_realops_flags(FLAGS_ALL, L_ALL, "Long realname from server %s for %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Long realname from server %s for %s",
parv[0], parv[1]);
name[REALLEN] = '\0';
}
@ -451,7 +451,7 @@ static void ms_client(struct Client *client_p, struct Client *source_p,
*/
if((target_p = find_id(id)))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"ID collision on %s(%s <- %s)(both killed)",
target_p->name, target_p->from->name,
client_p->name);
@ -714,7 +714,7 @@ nick_from_server(struct Client *client_p, struct Client *source_p, int parc,
/* we only allow Ulined Servers to set +s */
if ((flag & FLAGS_SERVICES) && (!IsUlined(source_p->from))) {
sendto_one(source_p, ":%s NOTICE %s :*** Only Ulined Services can set +S", me.name, source_p->name);
sendto_realops_flags(FLAGS_ALL, L_ALL, "Warning, Non-Ulined Server %s tried to set %s as +S", source_p->from->name, source_p->name);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Warning, Non-Ulined Server %s tried to set %s as +S", source_p->from->name, source_p->name);
/* we don't allow them to get +S, so do a continue */
continue;
}
@ -823,7 +823,7 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
if(!newts || !target_p->tsinfo ||
(newts == target_p->tsinfo))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick collision on %s(%s <- %s)(both killed)",
target_p->name, target_p->from->name,
client_p->name);
@ -861,12 +861,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
else
{
if(sameuser)
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick collision on %s(%s <- %s)(older killed)",
target_p->name, target_p->from->name,
client_p->name);
else
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick collision on %s(%s <- %s)(newer killed)",
target_p->name, target_p->from->name,
client_p->name);
@ -899,7 +899,7 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
if(!newts || !target_p->tsinfo || (newts == target_p->tsinfo) ||
!source_p->user)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick change collision from %s to %s(%s <- %s)(both killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
@ -937,12 +937,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
(!sameuser && newts > target_p->tsinfo))
{
if(sameuser)
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick change collision from %s to %s(%s <- %s)(older killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
else
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick change collision from %s to %s(%s <- %s)(newer killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
@ -965,12 +965,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
else
{
if(sameuser)
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick collision on %s(%s <- %s)(older killed)",
target_p->name, target_p->from->name,
client_p->name);
else
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Nick collision on %s(%s <- %s)(newer killed)",
target_p->name, target_p->from->name,
client_p->name);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_server.c,v 1.5 2002/09/13 09:17:14 fishwaldo Exp $
* $Id: m_server.c,v 1.6 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -67,7 +67,7 @@ _moddeinit(void)
{
mod_del_cmd(&server_msgtab);
}
const char *_version = "$Revision: 1.5 $";
const char *_version = "$Revision: 1.6 $";
#endif
int bogus_host(char *host);
@ -107,9 +107,9 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
*/
if (!DoesTS(client_p))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,"Link %s dropped, non-TS server",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,"Link %s dropped, non-TS server",
get_client_name(client_p, HIDE_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,"Link %s dropped, non-TS server",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,"Link %s dropped, non-TS server",
get_client_name(client_p, MASK_IP));
exit_client(client_p, client_p, client_p, "Non-TS server");
return;
@ -128,11 +128,11 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
case -1:
if (ConfigFileEntry.warn_no_nline)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Unauthorized server connection attempt from %s: No entry for "
"servername %s", get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Unauthorized server connection attempt from %s: No entry for "
"servername %s", get_client_name(client_p, MASK_IP), name);
}
@ -143,11 +143,11 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
break;
case -2:
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Unauthorized server connection attempt from %s: Bad password "
"for server %s", get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Unauthorized server connection attempt from %s: Bad password "
"for server %s", get_client_name(client_p, MASK_IP), name);
@ -157,11 +157,11 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
break;
case -3:
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Unauthorized server connection attempt from %s: Invalid host "
"for server %s", get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Unauthorized server connection attempt from %s: Invalid host "
"for server %s", get_client_name(client_p, MASK_IP), name);
@ -172,10 +172,10 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
/* servername is > HOSTLEN */
case -4:
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Invalid servername %s from %s",
name, get_client_name(client_p, HIDE_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Invalid servername %s from %s",
name, get_client_name(client_p, MASK_IP));
@ -198,11 +198,11 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
* Definitely don't do that here. This is from an unregistered
* connect - A1kmm.
*/
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Attempt to re-introduce server %s from %s", name,
get_client_name(client_p, HIDE_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Attempt to re-introduce server %s from %s", name,
get_client_name(client_p, MASK_IP));
@ -216,7 +216,7 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
if(IsCapable(client_p, CAP_HUB))
{
ClearCap(client_p,CAP_LL);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LazyLinks to a hub from a hub, thats a no-no.");
}
else
@ -225,7 +225,7 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
if(!client_p->localClient->serverMask)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"serverMask is full!");
/* try and negotiate a non LL connect */
ClearCap(client_p,CAP_LL);
@ -237,7 +237,7 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
if(!IsCapable(client_p, CAP_HUB))
{
ClearCap(client_p,CAP_LL);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LazyLinks to a leaf from a leaf, thats a no-no.");
}
}
@ -257,7 +257,7 @@ static void mr_server(struct Client *client_p, struct Client *source_p,
/* if this server is trying to set itself Ulined, its Not allowed, so exit it */
if (srvopt && SERVER_ULINED) {
sendto_realops_flags(FLAGS_ALL, L_ALL, "Server %s trying to U line itself. No Way, Nadda, I dun think so", client_p->name);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Server %s trying to U line itself. No Way, Nadda, I dun think so", client_p->name);
exit_client(client_p, client_p, client_p, "Got a Gline Instead");
return;
}
@ -333,10 +333,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
sendto_one(client_p, "ERROR :Server %s already exists", name);
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s cancelled, server %s already exists",
get_client_name(client_p, SHOW_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s cancelled, server %s already exists",
client_p->name, name);
@ -356,10 +356,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
* for a while and servers to send stuff to the wrong place.
*/
sendto_one(client_p,"ERROR :Nickname %s already exists!", name);
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s cancelled: Server/nick collision on %s",
/* inpath */ get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s cancelled: Server/nick collision on %s",
get_client_name(client_p, MASK_IP), name);
exit_client(client_p, client_p, client_p, "Nick as Server");
@ -431,10 +431,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
if (!hlined || (IsCapable(client_p, CAP_LL) && !IsCapable(client_p, CAP_HUB)))
{
/* OOOPs nope can't HUB */
sendto_realops_flags(FLAGS_ALL, L_ADMIN, "Non-Hub link %s introduced %s.",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN, "Non-Hub link %s introduced %s.",
get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Non-Hub link %s introduced %s.",
get_client_name(client_p, MASK_IP), name);
@ -446,10 +446,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
if (llined)
{
/* OOOPs nope can't HUB this leaf */
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s introduced leafed server %s.",
get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s introduced leafed server %s.",
client_p->name, name);
/* If it is new, we are probably misconfigured, so split the
@ -484,10 +484,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
if(strlen(name) > HOSTLEN)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s introduced server with invalid servername %s",
get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s introduced server with invalid servername %s",
client_p->name, name);
@ -505,7 +505,7 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
set_server_gecos(target_p, info);
if (IsUlined(target_p)) sendto_realops_flags(FLAGS_ALL, L_ALL, "Link %s introduced a dynamic Ulined server %s", client_p->name, target_p->name);
if (IsUlined(target_p)) sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Link %s introduced a dynamic Ulined server %s", client_p->name, target_p->name);
target_p->serv->up = find_or_add(parv[0]);
target_p->servptr = source_p;
@ -533,10 +533,10 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
continue;
if (!(aconf = bclient_p->serv->sconf))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Lost N-line for %s on %s. Closing",
get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Lost N-line for %s on %s. Closing",
get_client_name(client_p, MASK_IP), name);
exit_client(client_p, client_p, client_p, "Lost N line");
@ -553,7 +553,7 @@ static void ms_server(struct Client *client_p, struct Client *source_p,
target_p->info);
}
sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
sendto_realops_flags(FLAGS_EXTERNAL|FLAGS_REMOTE, L_ALL,
"Server %s being introduced by %s",
target_p->name, source_p->name);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_sjoin.c,v 1.6 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_sjoin.c,v 1.7 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -62,7 +62,7 @@ _moddeinit(void)
mod_del_cmd(&sjoin_msgtab);
}
const char *_version = "$Revision: 1.6 $";
const char *_version = "$Revision: 1.7 $";
#endif
/*
* ms_sjoin
@ -330,7 +330,7 @@ static void ms_sjoin(struct Client *client_p,
*/
if (buflen >= (BUFSIZE - 6 - NICKLEN))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Long SJOIN from server: %s(via %s) (ignored)",
source_p->name, client_p->name);
return;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_cburst.c,v 1.3 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: m_cburst.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -60,7 +60,7 @@ _moddeinit(void)
mod_del_cmd(&cburst_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
** m_cburst
@ -135,7 +135,7 @@ ms_cburst(struct Client *client_p,
}
else
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** CBURST request received from non LL capable server! [%s]",
client_p->name);
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_challenge.c,v 1.3 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: m_challenge.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -55,7 +55,7 @@ _moddeinit(void)
return;
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
#else
@ -80,7 +80,7 @@ _moddeinit(void)
mod_del_cmd(&challenge_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
* m_challenge - generate RSA challenge for wouldbe oper
@ -132,7 +132,7 @@ static void m_challenge( struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p,":%s NOTICE %s :Can't attach conf!",
me.name,source_p->name);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Failed OPER attempt by %s (%s@%s) can't attach conf!",
source_p->name, source_p->username, source_p->host);
attach_conf(source_p, oconf);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_cryptlink.c,v 1.4 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: m_cryptlink.c,v 1.5 2002/09/13 16:30:03 fishwaldo Exp $
*/
/*
@ -68,7 +68,7 @@
void _modinit(void) {}
void _moddeinit(void) {}
const char *_version = "$Revision: 1.4 $";
const char *_version = "$Revision: 1.5 $";
#endif
#else
@ -114,7 +114,7 @@ _moddeinit(void)
mod_del_cmd(&cryptlink_msgtab);
}
const char *_version = "$Revision: 1.4 $";
const char *_version = "$Revision: 1.5 $";
#endif
@ -374,7 +374,7 @@ static void cryptlink_serv(struct Client *client_p, struct Client *source_p,
if(IsCapable(client_p, CAP_HUB))
{
ClearCap(client_p,CAP_LL);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LazyLinks to a hub from a hub, thats a no-no.");
}
else
@ -383,7 +383,7 @@ static void cryptlink_serv(struct Client *client_p, struct Client *source_p,
if(!client_p->localClient->serverMask)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"serverMask is full!");
/* try and negotiate a non LL connect */
ClearCap(client_p,CAP_LL);
@ -395,7 +395,7 @@ static void cryptlink_serv(struct Client *client_p, struct Client *source_p,
if (!IsCapable(client_p, CAP_HUB))
{
ClearCap(client_p,CAP_LL);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LazyLinks to a leaf from a leaf, thats a no-no.");
}
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_eob.c,v 1.3 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: m_eob.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -54,7 +54,7 @@ _moddeinit(void)
mod_del_cmd(&eob_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
* ms_eob - EOB command handler
@ -64,7 +64,7 @@ const char *_version = "$Revision: 1.3 $";
static void ms_eob(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"End of burst from %s (%d seconds)",
source_p->name,
(signed int)(CurrentTime - source_p->firsttime));

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_gline.c,v 1.6 2002/09/13 09:17:13 fishwaldo Exp $
* $Id: m_gline.c,v 1.7 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -70,12 +70,14 @@ static int invalid_gline(struct Client *, char *, char *, char *);
static void ms_gline(struct Client*, struct Client*, int, char**);
static void mo_gline(struct Client*, struct Client*, int, char**);
static void mo_ungline(struct Client*, struct Client*, int, char**);
static void ms_ungline(struct Client *, struct Client *,int ,char **);
struct Message gline_msgtab[] = {
{"GLINE", 0, 0, 3, 0, MFLG_SLOW, 0,
{m_unregistered, m_not_oper, ms_gline, mo_gline}},
{"UNGLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
{m_unregistered, m_not_oper, m_error, mo_ungline}}
{m_unregistered, m_not_oper, ms_ungline, mo_ungline}}
};
#ifndef STATIC_MODULES
@ -95,7 +97,7 @@ _moddeinit(void)
mod_del_cmd(&gline_msgtab[1]);
}
const char *_version = "$Revision: 1.6 $";
const char *_version = "$Revision: 1.7 $";
#endif
/*
* mo_gline()
@ -243,7 +245,7 @@ static void ms_gline(struct Client *client_p,
const char *reason = NULL; /* reason for "victims" demise */
struct Client *acptr;
/* hyb-7 style gline (post beta3) */
/* Gline has just been set by a user */
if(parc == 4 && IsPerson(source_p))
{
oper_nick = parv[0];
@ -254,7 +256,13 @@ static void ms_gline(struct Client *client_p,
host = parv[2];
reason = parv[3];
}
/* none of the above */
/* gline coming in from a recently connected server */
else if (IsServer(source_p)) {
oper_server = parv[0];
user = parv[1];
host = parv[2];
reason = parv[3];
}
else
return;
@ -262,21 +270,25 @@ static void ms_gline(struct Client *client_p,
* and its faked, as the oper isnt sending the gline..
* check they're real --fl_ */
/* we need acptr for LL introduction anyway -davidt */
if((acptr = find_server(oper_server)))
{
if((acptr = find_client(oper_nick)) == NULL)
if (IsServer(source_p))
acptr = find_server(source_p->name);
else {
if((acptr = find_server(oper_server)))
{
if((acptr = find_client(oper_nick)) == NULL)
return;
}
else
return;
}
else
return;
if(invalid_gline(acptr, user, host, (char *)reason))
if(invalid_gline(acptr, user, host, (char *)reason))
return;
/* send in hyb-7 to compatable servers */
sendto_server(client_p, acptr, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
":%s GLINE %s %s :%s",
oper_nick, user, host, reason);
parv[0], user, host, reason);
if (ConfigFileEntry.glines)
{
/* I dont like the idea of checking for x non-wildcard chars in a
@ -286,20 +298,21 @@ static void ms_gline(struct Client *client_p,
if (check_wild_gline(user, host))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
if (!IsServer(source_p))
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s!%s@%s on %s is requesting a gline without %d non-wildcard characters for [%s@%s] [%s]",
oper_nick, oper_user, oper_host, oper_server, ConfigFileEntry.min_nonwildcard,
user, host, reason);
return;
}
sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
oper_nick, oper_user, oper_host, oper_server,
user, host, reason);
if(!IsServer(source_p))
sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
oper_nick, oper_user, oper_host, oper_server,
user, host, reason);
set_local_gline(oper_nick, oper_user, oper_host, oper_server, user, host, reason);
log_gline(oper_nick, oper_user, oper_host, oper_server, user, host, reason);
if (!IsServer(source_p)) log_gline(oper_nick, oper_user, oper_host, oper_server, user, host, reason);
}
}
@ -370,6 +383,7 @@ invalid_gline(struct Client *source_p, char *luser, char *lhost,
{
if(strchr(luser, '!'))
{
if (!IsServer(source_p))
sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in gline",
me.name, source_p->name);
return 1;
@ -418,7 +432,7 @@ set_local_gline(const char *oper_nick,
aconf->hold = CurrentTime + ConfigFileEntry.gline_time;
add_gline(aconf);
sendto_realops_flags(FLAGS_ALL, L_ALL,
if (oper_host) sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s!%s@%s on %s has triggered gline for [%s@%s] [%s]",
oper_nick, oper_user, oper_host, oper_server,
user, host, reason);
@ -558,6 +572,7 @@ static void mo_ungline(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, ":%s NOTICE %s :Un-glined [%s@%s]",
me.name, parv[0],user, host);
sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s UNGLINE %s@%s", source_p->name, user, host);
sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s has removed the G-Line for: [%s@%s]",
get_oper_name(source_p), user, host );
@ -572,3 +587,56 @@ static void mo_ungline(struct Client *client_p, struct Client *source_p,
return;
}
}
/*
** ms_ungline
**
** parv[0] = sender nick
** parv[1] = gline to remove
*/
static void ms_ungline(struct Client *client_p, struct Client *source_p,
int parc,char *parv[])
{
char *user,*host;
if (!ConfigFileEntry.glines)
{
return;
}
if ( (host = strchr(parv[1], '@')) || *parv[1] == '*' )
{
/* Explicit user@host mask given */
if(host) /* Found user@host */
{
user = parv[1]; /* here is user part */
*(host++) = '\0'; /* and now here is host */
}
else
{
user = "*"; /* no @ found, assume its *@somehost */
host = parv[1];
}
}
else
{
return;
}
if(remove_gline_match(user, host))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s has removed the G-Line for: [%s@%s]",
get_oper_name(source_p), user, host );
ilog(L_NOTICE, "%s removed G-Line for [%s@%s]",
get_oper_name(source_p), user, host);
return;
}
else
{
/* if its not on this server, just ignore it */
return;
}
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_join.c,v 1.7 2002/09/13 06:50:06 fishwaldo Exp $
* $Id: m_join.c,v 1.8 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -64,7 +64,7 @@ _moddeinit(void)
{
mod_del_cmd(&join_msgtab);
}
const char *_version = "$Revision: 1.7 $";
const char *_version = "$Revision: 1.8 $";
#endif
static void do_join_0(struct Client *client_p, struct Client *source_p);
@ -165,7 +165,7 @@ m_join(struct Client *client_p,
{
sendto_one(source_p, form_str(ERR_UNAVAILRESOURCE),
me.name, source_p->name, name);
sendto_realops_flags(FLAGS_SPY, L_ALL,
sendto_realops_flags(FLAGS_SPY|FLAGS_REMOTE, L_ALL,
"User %s (%s@%s) is attempting to join locally juped channel %s",
source_p->name, source_p->username, source_p->host, name);
continue;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_kline.c,v 1.7 2002/09/13 09:17:13 fishwaldo Exp $
* $Id: m_kline.c,v 1.8 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -86,7 +86,7 @@ _moddeinit(void)
mod_del_cmd(&dline_msgtab[0]);
mod_del_cmd(&dline_msgtab[1]);
}
const char *_version = "$Revision: 1.7 $";
const char *_version = "$Revision: 1.8 $";
#endif
/* Local function prototypes */
@ -304,7 +304,7 @@ ms_kline(struct Client *client_p, struct Client *source_p,
if (valid_user_host(source_p, kuser, khost))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** %s!%s@%s on %s is requesting an Invalid K-Line for [%s@%s] [%s]",
source_p->name, source_p->username, source_p->host, source_p->user->server,
kuser, khost, kreason);
@ -313,7 +313,7 @@ ms_kline(struct Client *client_p, struct Client *source_p,
if (valid_wild_card(kuser, khost))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** %s!%s@%s on %s is requesting a K-Line without %d wildcard chars for [%s@%s] [%s]",
source_p->name, source_p->username, source_p->host, source_p->user->server,
ConfigFileEntry.min_nonwildcard, kuser, khost, kreason);
@ -1000,7 +1000,7 @@ already_placed_kline(struct Client *source_p, char *luser, char *lhost)
*/
/* they can? here was me thinking it was only remote clients :P */
if(!MyClient(source_p))
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** Remote K-Line [%s@%s] already K-Lined by [%s@%s] - %s",
luser, lhost, aconf->user, aconf->host, reason);
else

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_lljoin.c,v 1.5 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_lljoin.c,v 1.6 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -63,7 +63,7 @@ _moddeinit(void)
mod_del_cmd(&lljoin_msgtab);
}
const char *_version = "$Revision: 1.5 $";
const char *_version = "$Revision: 1.6 $";
#endif
/*
* m_lljoin
@ -100,7 +100,7 @@ static void ms_lljoin(struct Client *client_p,
if(uplink && !IsCapable(uplink,CAP_LL))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LLJOIN requested from non LL server %s",
client_p->name);
return;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_llnick.c,v 1.3 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_llnick.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -60,7 +60,7 @@ _moddeinit(void)
mod_del_cmd(&llnick_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
* m_llnick
@ -84,7 +84,7 @@ static void ms_llnick(struct Client *client_p,
if(!IsCapable(client_p,CAP_LL) || !IsCapable(client_p, CAP_HUB))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"*** LLNICK requested from non LL server %s",
client_p->name);
return;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_oper.c,v 1.4 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_oper.c,v 1.5 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -74,7 +74,7 @@ _moddeinit(void)
mod_del_cmd(&oper_msgtab);
}
const char *_version = "$Revision: 1.4 $";
const char *_version = "$Revision: 1.5 $";
#endif
/*
@ -112,7 +112,7 @@ m_oper(struct Client *client_p, struct Client *source_p,
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name);
if (ConfigFileEntry.failed_oper_notice)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Failed OPER attempt - host mismatch by %s (%s@%s)",
source_p->name, source_p->username,
source_p->host);
@ -137,7 +137,7 @@ m_oper(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p,":%s NOTICE %s :Can't attach conf!",
me.name,source_p->name);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Failed OPER attempt by %s (%s@%s) can't attach conf!",
source_p->name, source_p->username,
source_p->host);
@ -162,7 +162,7 @@ m_oper(struct Client *client_p, struct Client *source_p,
sendto_one(source_p,form_str(ERR_PASSWDMISMATCH),me.name, parv[0]);
if (ConfigFileEntry.failed_oper_notice)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Failed OPER attempt by %s (%s@%s)",
source_p->name, source_p->username,
source_p->host);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_resv.c,v 1.3 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_resv.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
@ -38,16 +38,18 @@
#include "hash.h"
static void mo_resv(struct Client *, struct Client *, int, char **);
static void ms_resv(struct Client *, struct Client *, int, char **);
static void mo_unresv(struct Client *, struct Client *, int, char **);
static void ms_unresv(struct Client *, struct Client *, int, char **);
struct Message resv_msgtab = {
"RESV", 0, 0, 3, 0, MFLG_SLOW | MFLG_UNREG, 0,
{m_ignore, m_not_oper, m_ignore, mo_resv}
{m_ignore, m_not_oper, ms_resv, mo_resv}
};
struct Message unresv_msgtab = {
"UNRESV", 0, 0, 2, 0, MFLG_SLOW | MFLG_UNREG, 0,
{m_ignore, m_not_oper, m_ignore, mo_unresv}
{m_ignore, m_not_oper, ms_unresv, mo_unresv}
};
#ifndef STATIC_MODULES
@ -65,13 +67,14 @@ _moddeinit(void)
mod_del_cmd(&unresv_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
* mo_resv()
* parv[0] = sender prefix
* parv[1] = channel/nick to forbid
* parv[2] = reason
*/
static void mo_resv(struct Client *client_p, struct Client *source_p,
@ -95,10 +98,11 @@ static void mo_resv(struct Client *client_p, struct Client *source_p,
}
sendto_one(source_p,
":%s NOTICE %s :A local RESV has been placed on channel: %s [%s]",
":%s NOTICE %s :A RESV has been placed on channel: %s [%s]",
me.name, source_p->name, resv_p->name, resv_p->reason);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s RESV %s :%s", me.name, parv[1], parv[2]);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has placed a local RESV on channel: %s [%s]",
get_oper_name(source_p),
resv_p->name, resv_p->reason);
@ -130,7 +134,8 @@ static void mo_resv(struct Client *client_p, struct Client *source_p,
me.name, source_p->name,
resv_p->name, resv_p->reason);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s RESV %s :%s", me.name, parv[1], parv[2]);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has placed a local RESV on nick: %s [%s]",
get_oper_name(source_p),
resv_p->name, resv_p->reason);
@ -141,6 +146,48 @@ static void mo_resv(struct Client *client_p, struct Client *source_p,
me.name, source_p->name, parv[1]);
}
/*
* ms_resv()
* Process a resv from a server
* parv[0] = sender prefix
* parv[1] = channel/nick to forbid
* parv[2] = reason
*/
static void ms_resv(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) {
if(BadPtr(parv[1]))
return;
/* if it doesn't come from a Server drop it */
if (!IsServer(source_p))
return;
/* relay it to other servers */
sendto_server(client_p, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s RESV %s :%s", source_p->name, parv[1], parv[2]);
if(IsChannelName(parv[1]))
{
struct ResvChannel *resv_p;
resv_p = create_channel_resv(parv[1], parv[2], 0);
}
else if(clean_resv_nick(parv[1]))
{
struct ResvNick *resv_p;
resv_p = create_nick_resv(parv[1], parv[2], 0);
}
}
/*
* mo_unresv()
* parv[0] = sender prefix
@ -179,7 +226,7 @@ static void mo_unresv(struct Client *client_p, struct Client *source_p,
":%s NOTICE %s :The local RESV has been removed on channel: %s",
me.name, source_p->name, parv[1]);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has removed the local RESV for channel: %s",
get_oper_name(source_p), parv[1]);
@ -213,9 +260,76 @@ static void mo_unresv(struct Client *client_p, struct Client *source_p,
":%s NOTICE %s :The local RESV has been removed on nick: %s",
me.name, source_p->name, parv[1]);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has removed the local RESV for nick: %s",
get_oper_name(source_p), parv[1]);
}
}
}
/*
* ms_unresv()
* parv[0] = sender prefix
* parv[1] = channel/nick to unforbid
*/
static void ms_unresv(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) {
if (!IsServer(source_p))
return;
/* relay it to other servers */
sendto_server(client_p, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s UNRESV %s", source_p->name, parv[1]);
if(IsChannelName(parv[1]))
{
struct ResvChannel *resv_p;
if(!ResvChannelList ||
!(resv_p = (struct ResvChannel *)hash_find_resv(parv[1])))
{
/* we can't find the resv here, so just ignore it */
return;
}
else if(resv_p->conf)
{
sendto_one(source_p,
":%s NOTICE %s :The RESV for channel: %s is in the config file and must be removed by hand.",
me.name, source_p->name, parv[1]);
return;
}
/* otherwise, delete it */
else
{
delete_channel_resv(resv_p);
}
}
else if(clean_resv_nick(parv[1]))
{
struct ResvNick *resv_p;
if(!ResvNickList || !(resv_p = return_nick_resv(parv[1])))
{
/* we cna't find the resv here on this server, so just ignore it */
return;
}
else if(resv_p->conf)
{
sendto_one(source_p,
":%s NOTICE %s :The RESV for nick: %s is in the config file and must be removed by hand.",
me.name, source_p->name, parv[1]);
return;
}
else
{
delete_nick_resv(resv_p);
}
}
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_set.c,v 1.3 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_set.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
/* rewritten by jdc */
@ -64,7 +64,7 @@ _moddeinit(void)
mod_del_cmd(&set_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/* Structure used for the SET table itself */
struct SetStruct
@ -173,7 +173,7 @@ static void quote_autoconnall( struct Client *source_p, int newval)
{
if(newval >= 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,"%s has changed AUTOCONNALL to %i",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"%s has changed AUTOCONNALL to %i",
source_p->name, newval);
GlobalSetOptions.autoconn = newval;
@ -232,14 +232,14 @@ static void quote_idletime( struct Client *source_p, int newval )
{
if (newval == 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has disabled idletime checking",
source_p->name);
GlobalSetOptions.idletime = 0;
}
else
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has changed IDLETIME to %i",
source_p->name, newval);
GlobalSetOptions.idletime = (newval*60);
@ -307,7 +307,7 @@ static void quote_max( struct Client *source_p, int newval )
GlobalSetOptions.maxclients = newval;
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s!%s@%s set new MAXCLIENTS to %d (%d current)",
source_p->name, source_p->username, source_p->host,
GlobalSetOptions.maxclients, Count.local);
@ -355,7 +355,7 @@ static void quote_spamnum( struct Client *source_p, int newval )
{
if (newval == 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has disabled ANTI_SPAMBOT", source_p->name);
GlobalSetOptions.spam_num = newval;
return;
@ -368,7 +368,7 @@ static void quote_spamnum( struct Client *source_p, int newval )
{
GlobalSetOptions.spam_num = newval;
}
sendto_realops_flags(FLAGS_ALL, L_ALL,"%s has changed SPAMNUM to %i",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"%s has changed SPAMNUM to %i",
source_p->name, GlobalSetOptions.spam_num);
}
else
@ -392,7 +392,7 @@ static void quote_spamtime( struct Client *source_p, int newval )
{
GlobalSetOptions.spam_time = newval;
}
sendto_realops_flags(FLAGS_ALL, L_ALL,"%s has changed SPAMTIME to %i",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"%s has changed SPAMTIME to %i",
source_p->name, GlobalSetOptions.spam_time);
}
else
@ -438,7 +438,7 @@ static void quote_splitmode(struct Client *source_p, char *charval)
/* OFF */
if(newval == 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s is disabling splitmode",
get_oper_name(source_p));
@ -450,7 +450,7 @@ static void quote_splitmode(struct Client *source_p, char *charval)
/* ON */
else if(newval == 1)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s is enabling and activating splitmode",
get_oper_name(source_p));
@ -463,7 +463,7 @@ static void quote_splitmode(struct Client *source_p, char *charval)
/* AUTO */
else if(newval == 2)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s is enabling automatic splitmode",
get_oper_name(source_p));
@ -486,7 +486,7 @@ static void quote_splitnum(struct Client *source_p, int newval)
{
if(newval >= 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has changed SPLITNUM to %i",
source_p->name, newval);
split_servers = newval;
@ -504,7 +504,7 @@ static void quote_splitusers(struct Client *source_p, int newval)
{
if(newval >= 0)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has changed SPLITUSERS to %i",
source_p->name, newval);
split_users = newval;

115
modules/m_smo.c Normal file
View file

@ -0,0 +1,115 @@
/************************************************************************
* IRC - Internet Relay Chat. m_smo.c module - recieve global oper messages
* Copyright (C) 2001 NeoIRCd Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: m_smo.c,v 1.1 2002/09/13 16:30:03 fishwaldo Exp $
*/
/* List of ircd includes from ../include/ */
#include "stdinc.h"
#include "handlers.h"
#include "client.h"
#include "common.h" /* FALSE bleah */
#include "ircd.h"
#include "irc_string.h"
#include "numeric.h"
#include "fdlist.h"
#include "s_bsd.h"
#include "s_conf.h"
#include "s_log.h"
#include "s_serv.h"
#include "send.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
#include "hash.h"
#include "whowas.h"
/* Declare the void's initially up here, as modules dont have an
* include file, we will normally have client_p, source_p, parc
* and parv[] where:
*
* client_p == client issuing command
* source_p == where the command came from
* parc == the number of parameters
* parv == an array of the parameters
*/
static void ms_smo(struct Client *client_p, struct Client *source_p,
int parc, char *parv[]);
/* Show the commands this module can handle in a msgtab
* and give the msgtab a name, here its test_msgtab
*/
struct Message smo_msgtab = {
"SMO", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
{m_ignore, m_ignore, ms_smo, m_ignore}
};
/* Thats the msgtab finished */
#ifndef STATIC_MODULES
/* Here we tell it what to do when the module is loaded */
void
_modinit(void)
{
/* This will add the commands in test_msgtab (which is above) */
mod_add_cmd(&smo_msgtab);
}
/* here we tell it what to do when the module is unloaded */
void
_moddeinit(void)
{
/* This will remove the commands in test_msgtab (which is above) */
mod_del_cmd(&smo_msgtab);
}
/* When we last modified the file (shown in /modlist), this is usually:
*/
const char *_version = "$Revision: 1.1 $";
#endif
/*
* m_smo
* process a global oper message
* parv[0] = sender prefix (Server)
* parv[1] = flags for realops (Contains FLAGS_REMOTE.. be carefull)
* parv[2] = level for realops
* parv[3] = actual message
*/
static void ms_smo(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
int flags;
flags = atoi(parv[1]);
/* this is just a double check for servers that *DONT* set the right flags */
flags &= ~FLAGS_REMOTE;
/* if its not from a server, or a Services Client drop the message */
if (!IsServer(source_p))
return;
if (IsClient(source_p) && (!IsServices(source_p)))
return;
printf("gothere %x %d\n", flags, flags);
sendto_realops_flags(flags, atoi(parv[2]), "From %s: %s", source_p->name, parv[3]);
sendto_server(client_p, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s SMO %s %s :%s", source_p->name, parv[1], parv[2], parv[3]);
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_svinfo.c,v 1.3 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_svinfo.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
#include "stdinc.h"
#include "handlers.h"
@ -56,7 +56,7 @@ _moddeinit(void)
mod_del_cmd(&svinfo_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
* ms_svinfo - SVINFO message handler
@ -88,10 +88,10 @@ static void ms_svinfo(struct Client *client_p, struct Client *source_p,
* TS_ONLY we can't fall back to the non-TS protocol so
* we drop the link -orabidoo
*/
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s dropped, wrong TS protocol version (%s,%s)",
get_client_name(source_p, SHOW_IP), parv[1], parv[2]);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s dropped, wrong TS protocol version (%s,%s)",
get_client_name(source_p, MASK_IP), parv[1], parv[2]);
exit_client(source_p, source_p, source_p, "Incompatible TS version");
@ -107,13 +107,13 @@ static void ms_svinfo(struct Client *client_p, struct Client *source_p,
if (deltat > ConfigFileEntry.ts_max_delta)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
get_client_name(source_p, SHOW_IP),
(unsigned long) CurrentTime,
(unsigned long) theirtime,
(int) deltat);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
get_client_name(source_p, MASK_IP),
(unsigned long) CurrentTime,
@ -131,7 +131,7 @@ static void ms_svinfo(struct Client *client_p, struct Client *source_p,
if (deltat > ConfigFileEntry.ts_warn_delta)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Link %s notable TS delta (my TS=%lu, their TS=%lu, delta=%d)",
source_p->name,
(unsigned long) CurrentTime,

View file

@ -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.3 2002/09/13 06:54:34 fishwaldo Exp $
* $Id: m_svscmds.c,v 1.4 2002/09/13 16:30:03 fishwaldo Exp $
*/
/* List of ircd includes from ../include/ */
@ -104,7 +104,7 @@ _moddeinit(void)
/* When we last modified the file (shown in /modlist), this is usually:
*/
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
@ -138,7 +138,7 @@ static void ms_svshost(struct Client *client_p, struct Client *source_p,
return;
} else {
sendto_realops_flags(FLAGS_ALL, L_ALL, "Non U-Lined Server %s is attempting to use svshost on %s", source_p->name, target_p->name);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Non U-Lined Server %s is attempting to use svshost on %s", source_p->name, target_p->name);
return;
}
} else {
@ -171,7 +171,7 @@ static void ms_svsnick(struct Client *client_p, struct Client *source_p,
if (!IsClient(target_p))
return;
if (!IsUlined(source_p)) {
sendto_realops_flags(FLAGS_ALL, L_ALL, "Non U-Lined Server %s is attempting to use svsnick on %s", source_p->name, target_p->name);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Non U-Lined Server %s is attempting to use svsnick on %s", source_p->name, target_p->name);
return;
}
/* first find the target that we want to change */
@ -253,7 +253,7 @@ static void ms_svsid(struct Client *client_p, struct Client *source_p,
if (!IsClient(target_p))
return;
if (!IsUlined(source_p)) {
sendto_realops_flags(FLAGS_ALL, L_ALL, "Non U-Lined Server %s is attempting to use svsid on %s", source_p->name, target_p->name);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Non U-Lined Server %s is attempting to use svsid on %s", source_p->name, target_p->name);
return;
}
/* set the new ID */

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_who.c,v 1.7 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_who.c,v 1.8 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
#include "tools.h"
@ -60,7 +60,7 @@ _moddeinit(void)
{
mod_del_cmd(&who_msgtab);
}
const char *_version = "$Revision: 1.7 $";
const char *_version = "$Revision: 1.8 $";
#endif
static void do_who_on_channel(struct Client *source_p,
struct Channel *chptr, char *real_name,
@ -434,7 +434,7 @@ static void do_who_list(struct Client *source_p, struct Channel *chptr,
{
target_p = chanadmins_ptr->data;
if(member || !IsInvisible(target_p))
do_who(source_p, target_p, chname, admins_flag);
do_who(source_p, target_p, chname, "@");
chanadmins_ptr = chanadmins_ptr->next;
}
else

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_whois.c,v 1.6 2002/09/13 06:50:07 fishwaldo Exp $
* $Id: m_whois.c,v 1.7 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -76,7 +76,7 @@ _moddeinit(void)
mod_del_cmd(&whois_msgtab);
}
const char *_version = "$Revision: 1.6 $";
const char *_version = "$Revision: 1.7 $";
#endif
/*
** m_whois
@ -489,6 +489,7 @@ static void whois_person(struct Client *source_p,struct Client *target_p, int gl
/* although we should fill in parc and parv, we don't ..
be careful of this when writing whois hooks */
printf("doing whois\n");
if(MyClient(source_p))
hook_call_event("doing_whois", &hd);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: channel.c,v 1.7 2002/09/13 09:17:14 fishwaldo Exp $
* $Id: channel.c,v 1.8 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -1198,12 +1198,12 @@ check_spambot_warning(struct Client *source_p, const char *name)
{
/* Its already known as a possible spambot */
if (name != NULL)
sendto_realops_flags(FLAGS_BOTS, L_ALL,
sendto_realops_flags(FLAGS_BOTS|FLAGS_REMOTE, L_ALL,
"User %s (%s@%s) trying to join %s is a possible spambot",
source_p->name, source_p->username,
source_p->host, name);
else
sendto_realops_flags(FLAGS_BOTS, L_ALL,
sendto_realops_flags(FLAGS_BOTS|FLAGS_REMOTE, L_ALL,
"User %s (%s@%s) is a possible spambot",
source_p->name, source_p->username,
source_p->host);
@ -1256,7 +1256,7 @@ void check_splitmode(void *unused)
{
splitmode = 1;
sendto_realops_flags(FLAGS_ALL,L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE,L_ALL,
"Network split, activating splitmode");
eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
}
@ -1265,7 +1265,7 @@ void check_splitmode(void *unused)
{
splitmode = 0;
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Network rejoined, deactivating splitmode");
eventDelete(check_splitmode, NULL);
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: channel_mode.c,v 1.10 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: channel_mode.c,v 1.11 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -209,7 +209,7 @@ add_id(struct Client *client_p, struct Channel *chptr, char *banid, int type)
list = &chptr->invexlist;
break;
default:
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"add_id() called with unknown ban type %d!", type);
return 0;
}
@ -279,7 +279,7 @@ del_id(struct Channel *chptr, char *banid, int type)
list = &chptr->invexlist;
break;
default:
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"del_id() called with unknown ban type %d!", type);
return 0;
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: client.c,v 1.7 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: client.c,v 1.8 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
#include "config.h"
@ -297,7 +297,7 @@ check_pings_list(dlink_list *list)
aconf->port = 0;
aconf->hold = CurrentTime + 60;
add_temp_kline(aconf);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Idle time limit exceeded for %s - temp k-lining",
get_client_name(client_p, HIDE_IP));
@ -324,10 +324,10 @@ check_pings_list(dlink_list *list)
if (IsServer(client_p) || IsConnecting(client_p) ||
IsHandshake(client_p))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"No response from %s, closing link",
get_client_name(client_p, HIDE_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"No response from %s, closing link",
get_client_name(client_p, MASK_IP));
ilog(L_NOTICE, "No response from %s, closing link",
@ -418,7 +418,7 @@ check_klines(void)
if (aconf->status & CONF_EXEMPTDLINE)
continue;
sendto_realops_flags(FLAGS_ALL, L_ALL,"DLINE active for %s",
sendto_realops_flags(FLAGS_ALL||FLAGS_REMOTE, L_ALL,"DLINE active for %s",
get_client_name(client_p, HIDE_IP));
if (ConfigFileEntry.kline_with_connection_closed &&
@ -474,7 +474,7 @@ check_klines(void)
continue;
}
sendto_realops_flags(FLAGS_ALL, L_ALL, "GLINE active for %s",
sendto_realops_flags(FLAGS_ALL||FLAGS_REMOTE, L_ALL, "GLINE active for %s",
get_client_name(client_p, HIDE_IP));
if(ConfigFileEntry.kline_with_connection_closed &&
@ -514,7 +514,7 @@ check_klines(void)
continue;
}
sendto_realops_flags(FLAGS_ALL, L_ALL, "KLINE active for %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "KLINE active for %s",
get_client_name(client_p, HIDE_IP));
if(ConfigFileEntry.kline_with_connection_closed &&
@ -576,7 +576,7 @@ static void update_client_exit_stats(struct Client* client_p)
if (IsServer(client_p))
{
--Count.server;
sendto_realops_flags(FLAGS_EXTERNAL, L_ALL,
sendto_realops_flags(FLAGS_EXTERNAL|FLAGS_REMOTE, L_ALL,
"Server %s split from %s",
client_p->name, client_p->servptr->name);
}
@ -863,7 +863,7 @@ free_exited_clients(void *unused)
next = ptr->next;
if (ptr->data == NULL)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Warning: null client on dead_list!");
dlinkDelete(ptr, &dead_list);
free_dlink_node(ptr);
@ -911,7 +911,7 @@ static void exit_one_client(struct Client *client_p,
*/
if (IsMe(source_p))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"ERROR: tried to exit me! : %s", comment);
return; /* ...must *never* exit self!! */
}
@ -1158,10 +1158,10 @@ void dead_link(struct Client *client_p)
if (!IsPerson(client_p) && !IsUnknown(client_p) && !IsClosing(client_p))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Closing link to %s: %s",
get_client_name(client_p, HIDE_IP), notice);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Closing link to %s: %s",
get_client_name(client_p, MASK_IP), notice);
}
@ -1183,7 +1183,7 @@ void exit_aborted_clients(void)
next = ptr->next;
if (ptr->data == NULL)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Warning: null client on abort_list!");
dlinkDelete(ptr, &abort_list);
free_dlink_node(ptr);
@ -1373,7 +1373,7 @@ int exit_client(
if (source_p->servptr == &me)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s was connected for %d seconds. %d/%d sendK/recvK.",
source_p->name, (int)(CurrentTime - source_p->firsttime),
source_p->localClient->sendK,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: hash.c,v 1.4 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: hash.c,v 1.5 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -697,7 +697,7 @@ get_or_create_channel(struct Client *client_p, char *chname, int *isnew)
{
if (IsServer(client_p))
{
sendto_realops_flags(FLAGS_DEBUG, L_ALL,
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, L_ALL,
"*** Long channel name from %s (%d > %d): %s",
client_p->name,
len,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: ircd.c,v 1.6 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: ircd.c,v 1.7 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -283,7 +283,7 @@ set_time(void)
if(gettimeofday(&newtime, NULL) == -1)
{
ilog(L_ERROR, "Clock Failure (%d)", errno);
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Clock Failure (%d), TS can be corrupted", errno);
restart("Clock Failure");

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: ircdauth.c,v 1.4 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: ircdauth.c,v 1.5 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -603,7 +603,7 @@ GreetUser(struct Client *client)
client->servptr = find_server(client->user->server);
if (!client->servptr)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,"Ghost killed: %s on invalid server %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"Ghost killed: %s on invalid server %s",
client->name,
client->user->server);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: list.c,v 1.3 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: list.c,v 1.4 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -139,7 +139,7 @@ void free_user(struct User* user, struct Client* client_p)
if (user->joined || user->refcnt < 0 ||
user->invited.head || user->channel.head)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"* %#lx user (%s!%s@%s) %#lx %#lx %#lx %d %d *",
(unsigned long)client_p, client_p ? client_p->name : "<noname>",
client_p->username, client_p->host, (unsigned long)user,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: listener.c,v 1.3 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: listener.c,v 1.4 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -417,7 +417,7 @@ accept_connection(int pfd, void *data)
*/
if((last_oper_notice + 20) <= CurrentTime)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,"All connections in use. (%s)",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"All connections in use. (%s)",
get_listener_name(listener));
last_oper_notice = CurrentTime;
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_error.c,v 1.3 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: m_error.c,v 1.4 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -60,19 +60,19 @@ void m_error(struct Client *client_p, struct Client *source_p,
if (client_p == source_p)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"ERROR :from %s -- %s",
get_client_name(client_p, HIDE_IP), para);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"ERROR :from %s -- %s",
get_client_name(client_p, MASK_IP), para);
}
else
{
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"ERROR :from %s via %s -- %s",
source_p->name, get_client_name(client_p, MASK_IP), para);
sendto_realops_flags(FLAGS_ALL, L_ADMIN,"ERROR :from %s via %s -- %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,"ERROR :from %s via %s -- %s",
source_p->name,
get_client_name(client_p, HIDE_IP), para);
}
@ -92,9 +92,9 @@ void ms_error(struct Client *client_p, struct Client *source_p,
source_p->name, para);
if (client_p == source_p)
sendto_realops_flags(FLAGS_ALL, L_ALL,"ERROR :from %s -- %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"ERROR :from %s -- %s",
get_client_name(client_p, MASK_IP), para);
else
sendto_realops_flags(FLAGS_ALL, L_ALL,"ERROR :from %s via %s -- %s", source_p->name,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"ERROR :from %s via %s -- %s", source_p->name,
get_client_name(client_p, MASK_IP), para);
}

View file

@ -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: messages.tab,v 1.4 2002/09/05 10:48:36 fishwaldo Exp $
* $Id: messages.tab,v 1.5 2002/09/13 16:30:04 fishwaldo Exp $
*/
static char * replies[] = {
@ -344,7 +344,7 @@ static char * replies[] = {
/* 317 RPL_WHOISIDLE, */ ":%s 317 %s %s %d %d :seconds idle, signon time",
/* 318 RPL_ENDOFWHOIS, */ ":%s 318 %s %s :End of /WHOIS list.",
/* 319 RPL_WHOISCHANNELS, */ ":%s 319 %s %s :%s",
/* 320 */ NULL,
/* 320 RPL_SWHOIS, */ ":%s 320 %s %s :%s",
/* 321 RPL_LISTSTART, */ ":%s 321 %s Channel :Users Name",
/* 322 RPL_LIST, */ ":%s 322 %s %s %d :%s",
/* 323 RPL_LISTEND, */ ":%s 323 %s :End of /LIST",

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: modules.c,v 1.5 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: modules.c,v 1.6 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -459,7 +459,7 @@ mo_modreload (struct Client *client_p, struct Client *source_p, int parc, char *
if((load_one_module(parv[1]) == -1) && check_core)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Error reloading core module: %s: terminating ircd",
parv[1]);
ilog(L_CRIT, "Error loading core module %s: terminating ircd", parv[1]);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: parse.c,v 1.5 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: parse.c,v 1.6 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -377,7 +377,7 @@ handle_command(struct Message *mptr, struct Client *client_p,
return(-1);
}
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Dropping server %s due to (invalid) command '%s'"
"with only %d arguments (expecting %d).",
client_p->name, mptr->cmd, i, mptr->parameters);
@ -634,7 +634,7 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
if (IsServer(client_p))
{
sendto_realops_flags(FLAGS_DEBUG, L_ALL,
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, L_ALL,
"Not dropping server %s (%s) for Fake Direction",
client_p->name, source_p->name);
return -1;
@ -697,7 +697,7 @@ remove_unknown(struct Client *client_p, char *lsender, char *lbuffer)
if (IsClient(client_p))
{
sendto_realops_flags(FLAGS_DEBUG, L_ALL,
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, L_ALL,
"Weirdness: Unknown client prefix (%s) from %s, Ignoring %s",
lbuffer,
get_client_name(client_p, HIDE_IP), lsender);
@ -723,11 +723,11 @@ remove_unknown(struct Client *client_p, char *lsender, char *lbuffer)
me.name, lsender, me.name);
else
{
sendto_realops_flags(FLAGS_DEBUG, L_ADMIN,
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, L_ADMIN,
"Unknown prefix (%s) from %s, Squitting %s",
lbuffer, get_client_name(client_p, SHOW_IP), lsender);
sendto_realops_flags(FLAGS_DEBUG, L_OPER,
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, L_OPER,
"Unknown prefix (%s) from %s, Squitting %s",
lbuffer, client_p->name, lsender);
@ -812,7 +812,7 @@ do_numeric(char numeric[],
* unfortunately, it did not work. --Dianora
*/
if(atoi(numeric) != ERR_NOSUCHNICK)
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"*** %s(via %s) sent a %s numeric to me: %s",
source_p->name, client_p->name, numeric, buffer);
return;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: restart.c,v 1.3 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: restart.c,v 1.4 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -57,7 +57,7 @@ void server_reboot(void)
{
int i;
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Restarting server...");
ilog(L_NOTICE, "Restarting server...");

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: resv.c,v 1.3 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: resv.c,v 1.4 2002/09/13 16:30:04 fishwaldo Exp $
*/
#include "stdinc.h"
@ -234,6 +234,19 @@ report_resv(struct Client *source_p)
resv_np->name, resv_np->reason);
}
void
send_resv(struct Client *source_p)
{
struct ResvChannel *resv_cp;
struct ResvNick *resv_np;
for (resv_cp = ResvChannelList; resv_cp; resv_cp = resv_cp->next)
sendto_one(source_p, ":%s RESV %s :%s", me.name, resv_cp->name, resv_cp->reason);
for (resv_np = ResvNickList; resv_np; resv_np = resv_np->next)
sendto_one(source_p, ":%s RESV %s :%s", me.name, resv_np->name, resv_np->reason);
}
int
clean_resv_nick(char *nick)
{

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_auth.c,v 1.4 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: s_auth.c,v 1.5 2002/09/13 16:30:05 fishwaldo Exp $
*/
/*
@ -306,7 +306,7 @@ static int start_auth_query(struct AuthRequest* auth)
}
if ((MAXCONNECTIONS - 10) < fd)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,"Can't allocate fd for auth on %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"Can't allocate fd for auth on %s",
get_client_name(auth->client, SHOW_IP));
fd_close(fd);
return 0;

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_bsd.c,v 1.4 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: s_bsd.c,v 1.5 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -157,7 +157,7 @@ void report_error(int level, const char* text, const char* who, int error)
{
who = (who) ? who : "";
sendto_realops_flags(FLAGS_DEBUG, level, text, who, strerror(error));
sendto_realops_flags(FLAGS_DEBUG|FLAGS_REMOTE, level, text, who, strerror(error));
ilog(L_ERROR, text, who, strerror(error));
}
@ -436,12 +436,12 @@ void error_exit_client(struct Client* client_p, int error)
if (error == 0)
{
/* Admins get the real IP */
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Server %s closed the connection",
get_client_name(client_p, SHOW_IP));
/* Opers get a masked IP */
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Server %s closed the connection",
get_client_name(client_p, MASK_IP));
@ -459,7 +459,7 @@ void error_exit_client(struct Client* client_p, int error)
}
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s had been connected for %d day%s, %2d:%02d:%02d",
client_p->name, connected/86400,
(connected/86400 == 1) ? "" : "s",

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_conf.c,v 1.5 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: s_conf.c,v 1.6 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -422,7 +422,7 @@ check_client(struct Client *client_p, struct Client *source_p, char *username)
break;
case TOO_MANY:
sendto_realops_flags(FLAGS_FULL, L_ALL,
sendto_realops_flags(FLAGS_FULL|FLAGS_REMOTE, L_ALL,
"Too many on IP for %s (%s).",
get_client_name(source_p, SHOW_IP),
source_p->localClient->sockhost);
@ -436,7 +436,7 @@ check_client(struct Client *client_p, struct Client *source_p, char *username)
break;
case I_LINE_FULL:
sendto_realops_flags(FLAGS_FULL, L_ALL,
sendto_realops_flags(FLAGS_FULL|FLAGS_REMOTE, L_ALL,
"I-line is full for %s (%s).",
get_client_name(source_p, SHOW_IP),
source_p->localClient->sockhost);
@ -456,7 +456,7 @@ check_client(struct Client *client_p, struct Client *source_p, char *username)
/* jdc - lists server name & port connections are on */
/* a purely cosmetical change */
inetntop(source_p->localClient->aftype, &IN_ADDR(source_p->localClient->ip), ipaddr, HOSTIPLEN);
sendto_realops_flags(FLAGS_UNAUTH, L_ALL,
sendto_realops_flags(FLAGS_UNAUTH|FLAGS_REMOTE, L_ALL,
"Unauthorised client connection from %s [%s] on [%s/%u].",
get_client_name(source_p, SHOW_IP),
ipaddr,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_gline.c,v 1.4 2002/09/13 06:50:08 fishwaldo Exp $
* $Id: s_gline.c,v 1.5 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -182,3 +182,28 @@ expire_glines()
}
}
/*
*
* send_glines
*
* inputs - Client to send to.
* outputs - none
* side effects - Sends the current gline list to a newly connected irc server
*/
void
send_glines(struct Client *client_p)
{
dlink_node *gline_node;
dlink_node *next_node;
struct ConfItem *kill_ptr;
for(gline_node = glines.head; gline_node; gline_node = next_node)
{
kill_ptr = gline_node->data;
next_node = gline_node->next;
sendto_one(client_p, ":%s GLINE %s %s :%s", me.name, kill_ptr->name, kill_ptr->host, kill_ptr->passwd);
}
}

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_serv.c,v 1.10 2002/09/13 09:17:14 fishwaldo Exp $
* $Id: s_serv.c,v 1.11 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -58,6 +58,8 @@
#include "memory.h"
#include "channel.h" /* chcap_usage_counts stuff...*/
#include "hook.h"
#include "resv.h"
#include "s_gline.h"
extern char *crypt();
@ -153,7 +155,7 @@ void slink_error(unsigned int rpl, unsigned int len, unsigned char *data,
assert(len < 256);
data[len-1] = '\0';
sendto_realops_flags(FLAGS_ALL, L_ALL, "SlinkError for %s: %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "SlinkError for %s: %s",
server_p->name, data);
exit_client(server_p, server_p, &me, "servlink error -- terminating link");
}
@ -951,7 +953,7 @@ int server_estab(struct Client *client_p)
CONF_SERVER)))
{
/* This shouldn't happen, better tell the ops... -A1kmm */
sendto_realops_flags(FLAGS_ALL, L_ALL, "Warning: Lost connect{} block "
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "Warning: Lost connect{} block "
"for server %s(this shouldn't happen)!", host);
return exit_client(client_p, client_p, client_p, "Lost connect{} block!");
}
@ -1022,11 +1024,11 @@ int server_estab(struct Client *client_p)
{
if (fork_server(client_p) < 0 )
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Warning: fork failed for server %s -- check servlink_path (%s)",
get_client_name(client_p, HIDE_IP),
ConfigFileEntry.servlink_path);
sendto_realops_flags(FLAGS_ALL, L_OPER, "Warning: fork failed for server "
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER, "Warning: fork failed for server "
"%s -- check servlink_path (%s)",
get_client_name(client_p, MASK_IP),
ConfigFileEntry.servlink_path);
@ -1072,7 +1074,7 @@ int server_estab(struct Client *client_p)
dlinkDelete(m, &unknown_list);
dlinkAdd(client_p, m, &serv_list);
} else {
sendto_realops_flags(FLAGS_ALL, L_ADMIN, "Tried to register (%s) server but it was already registered!?!", host);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN, "Tried to register (%s) server but it was already registered!?!", host);
exit_client(client_p, client_p, client_p, "Tried to register server but it was already registered?!?");
}
@ -1091,17 +1093,17 @@ int server_estab(struct Client *client_p)
if (aconf->flags & CONF_FLAGS_ULINED) {
SetUlined(client_p);
sendto_realops_flags(FLAGS_ALL, L_ALL, "In-Comming Link with %s is Ulined", inpath_ip);
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "In-Comming Link with %s is Ulined", inpath_ip);
ilog(L_NOTICE, "In-Comming link with %s is Ulined", inpath_ip);
}
/* Show the real host/IP to admins */
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Link with %s established: (%s) link",
inpath_ip,show_capabilities(client_p));
/* Now show the masked hostname/IP to opers */
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Link with %s established: (%s) link",
inpath,show_capabilities(client_p));
@ -1131,6 +1133,19 @@ int server_estab(struct Client *client_p)
} else
fd_note(client_p->localClient->fd, "Server: %s", client_p->name);
/*
** Send reserved nickname and channel information to the other server
** these can be dynamic (ie, set from other servers) or config based
** seeing as both types should be applied to the entire network
*/
send_resv(client_p);
/*
** send the Glines list now to this server
**
*/
send_glines(client_p);
/*
** Old sendto_serv_but_one() call removed because we now
** need to send different names to different servers
@ -1844,7 +1859,7 @@ void set_autoconn(struct Client *source_p,char *parv0,char *name,int newval)
else
aconf->flags &= ~CONF_FLAGS_ALLOW_AUTO_CONN;
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"%s has changed AUTOCONN for %s to %i",
parv0, name, newval);
sendto_one(source_p,
@ -1942,10 +1957,10 @@ serv_connect(struct ConfItem *aconf, struct Client *by)
*/
if ((client_p = find_server(aconf->name)))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Server %s already present from %s",
aconf->name, get_client_name(client_p, SHOW_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Server %s already present from %s",
aconf->name, get_client_name(client_p, MASK_IP));
if (by && IsPerson(by) && !MyClient(by))
@ -1999,7 +2014,7 @@ serv_connect(struct ConfItem *aconf, struct Client *by)
*/
if (!attach_connect_block(client_p, aconf->name, aconf->host))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Host %s is not enabled for connecting:no C/N-line",
aconf->name);
if (by && IsPerson(by) && !MyClient(by))
@ -2123,10 +2138,10 @@ serv_connect_callback(int fd, int status, void *data)
/* We have an error, so report it and quit */
/* Admins get to see any IP, mere opers don't *sigh*
*/
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Error connecting to %s[%s]: %s", client_p->name,
client_p->host, comm_errstr(status));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Error connecting to %s: %s",
client_p->name, comm_errstr(status));
exit_client(client_p, client_p, &me, comm_errstr(status));
@ -2139,9 +2154,9 @@ serv_connect_callback(int fd, int status, void *data)
client_p->name, CONF_SERVER);
if (!aconf)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"Lost connect{} block for %s", get_client_name(client_p, HIDE_IP));
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"Lost connect{} block for %s", get_client_name(client_p, MASK_IP));
exit_client(client_p, client_p, &me, "Lost connect{} block");
return;
@ -2192,11 +2207,11 @@ serv_connect_callback(int fd, int status, void *data)
*/
if (IsDead(client_p))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN,
"%s[%s] went dead during handshake",
client_p->name,
client_p->host);
sendto_realops_flags(FLAGS_ALL, L_OPER,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER,
"%s went dead during handshake", client_p->name);
exit_client(client_p, client_p, &me, "Went dead during handshake");
return;
@ -2311,9 +2326,9 @@ void cryptlink_init(struct Client *client_p,
void cryptlink_error(struct Client *client_p, char *type,
char *reason, char *client_reason)
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN, "%s: CRYPTLINK %s error - %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN, "%s: CRYPTLINK %s error - %s",
get_client_name(client_p, SHOW_IP), type, reason);
sendto_realops_flags(FLAGS_ALL, L_OPER, "%s: CRYPTLINK %s error - %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_OPER, "%s: CRYPTLINK %s error - %s",
get_client_name(client_p, MASK_IP), type, reason);
ilog(L_ERROR, "%s: CRYPTLINK %s error - %s",
get_client_name(client_p, SHOW_IP), type, reason);

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_user.c,v 1.11 2002/09/13 09:17:14 fishwaldo Exp $
* $Id: s_user.c,v 1.12 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -402,7 +402,7 @@ register_local_user(struct Client *client_p, struct Client *source_p,
&&
!(IsExemptLimits(source_p)) )
{
sendto_realops_flags(FLAGS_FULL, L_ALL,
sendto_realops_flags(FLAGS_FULL|FLAGS_REMOTE, L_ALL,
"Too many clients, rejecting %s[%s].",
nick, source_p->host);
@ -416,7 +416,7 @@ register_local_user(struct Client *client_p, struct Client *source_p,
if (!valid_username(source_p->username))
{
sendto_realops_flags(FLAGS_REJ, L_ALL,
sendto_realops_flags(FLAGS_REJ|FLAGS_REMOTE, L_ALL,
"Invalid username: %s (%s@%s)",
nick, source_p->username, source_p->host);
ServerStats->is_ref++;
@ -496,7 +496,7 @@ register_local_user(struct Client *client_p, struct Client *source_p,
dlinkDelete(m, &unknown_list);
dlinkAdd(source_p, m, &lclient_list);
} else {
sendto_realops_flags(FLAGS_ALL, L_ADMIN, "Tried to register %s (%s@%s) but I couldn't find it?!?",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN, "Tried to register %s (%s@%s) but I couldn't find it?!?",
nick, source_p->username, source_p->host);
exit_client(client_p, source_p, &me, "Client exited");
return CLIENT_EXITED;
@ -543,7 +543,7 @@ register_remote_user(struct Client *client_p, struct Client *source_p,
if (source_p->servptr == NULL)
{
sendto_realops_flags(FLAGS_ALL, L_ALL,"Ghost killed: %s on invalid server %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,"Ghost killed: %s on invalid server %s",
source_p->name, source_p->user->server);
kill_client(client_p, source_p, "%s (Server doesn't exist)",
@ -582,7 +582,7 @@ register_remote_user(struct Client *client_p, struct Client *source_p,
{
kill_client(client_p, source_p, "%s GHOST (no server found)",
me.name);
sendto_realops_flags(FLAGS_ALL, L_ALL, "No server %s for user %s[%s@%s] from %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL, "No server %s for user %s[%s@%s] from %s",
user->server, source_p->name, source_p->username,
source_p->host, source_p->from->name);
source_p->flags |= FLAGS_KILLED;
@ -956,7 +956,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, char *parv
if (IsServer(source_p))
{
sendto_realops_flags(FLAGS_ALL, L_ADMIN, "*** Mode for User %s from %s",
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ADMIN, "*** Mode for User %s from %s",
parv[1], source_p->name);
return 0;
}
@ -1327,7 +1327,7 @@ check_X_line(struct Client *client_p, struct Client *source_p)
{
if (aconf->port == 1)
{
sendto_realops_flags(FLAGS_REJ, L_ALL,
sendto_realops_flags(FLAGS_REJ|FLAGS_REMOTE, L_ALL,
"X-line Rejecting [%s] [%s], user %s",
source_p->info,
reason,
@ -1338,7 +1338,7 @@ check_X_line(struct Client *client_p, struct Client *source_p)
return (CLIENT_EXITED);
}
else
sendto_realops_flags(FLAGS_REJ, L_ALL,
sendto_realops_flags(FLAGS_REJ|FLAGS_REMOTE, L_ALL,
"X-line Warning [%s] [%s], user %s",
source_p->info,
reason,
@ -1414,9 +1414,9 @@ oper_up( struct Client *source_p, struct ConfItem *aconf )
if (IsOperAdmin(source_p))
source_p->umodes |= FLAGS_ADMIN;
sendto_realops_flags(FLAGS_ALL, L_ALL,
"%s (%s@%s) is now an operator", source_p->name,
source_p->username, source_p->host);
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);
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,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: send.c,v 1.6 2002/09/13 06:50:09 fishwaldo Exp $
* $Id: send.c,v 1.7 2002/09/13 16:30:05 fishwaldo Exp $
*/
#include "stdinc.h"
@ -153,7 +153,7 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf)
#ifdef INVARIANTS
if (IsMe(to))
{
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Trying to send message to myself!");
return 0;
}
@ -164,7 +164,7 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf)
if (linebuf_len(&to->localClient->buf_sendq) > get_sendq(to))
{
if (IsServer(to))
sendto_realops_flags(FLAGS_ALL, L_ALL,
sendto_realops_flags(FLAGS_ALL|FLAGS_REMOTE, L_ALL,
"Max SendQ limit exceeded for %s: %u > %lu",
get_client_name(to, HIDE_IP),
linebuf_len(&to->localClient->buf_sendq),
@ -1143,6 +1143,9 @@ sendto_realops_flags(int flags, int level, const char *pattern, ...)
linebuf_donebuf(&linebuf);
}
}
/* should we send this as a global message? */
if (flags & FLAGS_REMOTE)
sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, ":%s SMO %d %d :%s", me.name, flags, level, nbuf);
} /* sendto_realops_flags() */
/*