* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: supported.h,v 1.20.2.1 2007/01/23 01:57:56 entrope Exp $
+ * $Id: supported.h,v 1.20.2.2 2007/05/20 13:02:51 entrope Exp $
*
* Description: This file has the featureset that ircu announces on connecting
* a client. It's in this .h because it's likely to be appended
" NICKLEN=%i"
-#define FEATURES2 " MAXNICKLEN=%i" \
+#define FEATURES2 "MAXNICKLEN=%i" \
" TOPICLEN=%i" \
" AWAYLEN=%i" \
" KICKLEN=%i" \
if (change && feat->notify) /* call change notify function */
(*feat->notify)();
+
+ if (from)
+ return feature_get(from, fields, count);
}
return 0;
if (change && feat->notify) /* call change notify function */
(*feat->notify)();
+
+ if (from)
+ return feature_get(from, fields, count);
}
return 0;
parse_error("Missing name in pseudo %s block", smap->command);
else if (!smap->services)
parse_error("Missing nick in pseudo %s block", smap->command);
+ else if (!strIsAlpha(smap->command))
+ parse_error("Pseudo command %s invalid: must all be letters", smap->command);
else
valid = 1;
if (valid && register_mapping(smap))
*/
/** @file
* @brief Implementation for handling listening sockets.
- * @version $Id: listener.c,v 1.28.2.5 2007/03/18 02:33:01 entrope Exp $
+ * @version $Id: listener.c,v 1.28.2.6 2007/05/20 14:10:30 entrope Exp $
*/
#include "config.h"
continue;
len = 0;
flags[len++] = listener_server(listener) ? 'S' : 'C';
- if (show_hidden && FlagHas(&listener->flags, LISTEN_HIDDEN))
+ if (FlagHas(&listener->flags, LISTEN_HIDDEN))
+ {
+ if (!show_hidden)
+ continue;
flags[len++] = 'H';
+ }
if (FlagHas(&listener->flags, LISTEN_IPV4))
{
flags[len++] = '4';
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_admin.c,v 1.13 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_admin.c,v 1.13.2.1 2007/05/20 13:02:51 entrope Exp $
*/
/*
#include "ircd_features.h"
#include "ircd_log.h"
#include "ircd_reply.h"
+#include "match.h"
#include "msg.h"
#include "numeric.h"
#include "numnicks.h"
*/
int m_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
- struct Client *acptr;
-
assert(0 != cptr);
assert(cptr == sptr);
- if (parc > 1 && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr)))
+ if (parc > 1 && match(parv[1], cli_name(&me)))
return send_reply(sptr, ERR_NOPRIVILEGES);
return send_admin_info(sptr);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_connect.c,v 1.17 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_connect.c,v 1.17.2.1 2007/05/20 13:55:59 entrope Exp $
*/
/*
/*
* Only allow LocOps to make local CONNECTS --SRB
*/
- return 0;
+ return send_reply(cptr, ERR_NOPRIVILEGES);
}
else {
struct Client* acptr2;
struct Client* acptr3;
if (!(acptr3 = find_match_server(parv[3]))) {
- send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
- return 0;
+ return send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
}
/*
*/
/** @file
* @brief Report operators' privileges to others
- * @version $Id: m_privs.c,v 1.6.2.1 2007/03/06 02:35:24 entrope Exp $
+ * @version $Id: m_privs.c,v 1.6.2.2 2007/05/20 14:15:58 entrope Exp $
*/
#include "config.h"
for (name = ircd_strtok(&p, parv[i], " "); name;
name = ircd_strtok(&p, 0, " ")) {
if (!(acptr = FindUser(name)))
- continue;
+ send_reply(sptr, ERR_NOSUCHNICK, name);
else if (MyUser(acptr))
client_report_privs(sptr, acptr);
else
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_version.c,v 1.16 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_version.c,v 1.16.2.1 2007/05/20 13:02:51 entrope Exp $
*/
/*
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
+#include "match.h"
#include "msg.h"
#include "numeric.h"
#include "numnicks.h"
*/
int m_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
- struct Client *acptr;
- if (parc > 1 && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr)))
- send_reply(sptr, ERR_NOPRIVILEGES);
- else
- {
- send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
- debug_serveropts());
- send_supported(sptr);
- }
+ if (parc > 1 && match(parv[1], cli_name(&me)))
+ return send_reply(sptr, ERR_NOPRIVILEGES);
+
+ send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
+ debug_serveropts());
+ send_supported(sptr);
return 0;
}
*/
/** @file
* @brief Parse input from IRC clients and other servers.
- * @version $Id: parse.c,v 1.54 2005/09/27 03:54:46 entrope Exp $
+ * @version $Id: parse.c,v 1.54.2.1 2007/05/20 13:50:38 entrope Exp $
*/
#include "config.h"
TOK_SETTIME,
0, MAXPARA, MFLG_SLOW, 0, NULL,
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
- { m_unregistered, m_ignore, ms_settime, mo_settime, m_ignore }
+ { m_unregistered, m_not_oper, ms_settime, mo_settime, m_ignore }
},
{
MSG_RPING,
/* 515 */
{ ERR_BADEXPIRE, "%Tu :Bad expire time", "515" },
/* 516 */
- { ERR_DONTCHEAT, " :Don't Cheat.", "516" },
+ { ERR_DONTCHEAT, "%s :Don't Cheat.", "516" },
/* 517 */
{ ERR_DISABLED, "%s :Command disabled.", "517" },
/* 518 */