* introduce unreg_privmsg_func: unreg_privmsg_func()/unreg_notice_func() - both of which reverse the effect of reg_privmsg_func()/reg_notice_func()
* fix minor autoinvite issue: UserAutoInvite (aka: '!uset autoinvite ..') no longer invites you to channels you weren't in if the server you are on just reconnected to the network
* alter account-finding on local services clients: non +k users on the local services server are now no longer referred to as services (at least not in regard to accounts..)
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-57
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
#
+2004-05-01 11:17:11 GMT adam <akl@gamesurge.net> patch-57
+
+ Summary:
+ introduce unreg_privmsg_func, fix minor autoinvite issue, alter account-finding on local services clients
+ Revision:
+ srvx--devo--1.3--patch-57
+
+ * introduce unreg_privmsg_func: unreg_privmsg_func()/unreg_notice_func() - both of which reverse the effect of reg_privmsg_func()/reg_notice_func()
+
+ * fix minor autoinvite issue: UserAutoInvite (aka: '!uset autoinvite ..') no longer invites you to channels you weren't in if the server you are on just reconnected to the network
+
+ * alter account-finding on local services clients: non +k users on the local services server are now no longer referred to as services (at least not in regard to accounts..)
+
+
+ modified files:
+ ChangeLog src/chanserv.c src/nickserv.c src/proto-common.c
+ src/proto-p10.c src/proto.h srvx.conf.example
+
+
2004-04-29 01:57:00 GMT Michael Poole <mdpoole@troilus.org> patch-56
Summary:
if(!IsUserSuspended(channel)
&& IsUserAutoInvite(channel)
&& (channel->access >= channel->channel->lvlOpts[lvlInviteMe])
- && !self->burst)
+ && !self->burst
+ && !user->uplink->burst)
irc_invite(chanserv, user, cn);
continue;
}
return 0;
}
if (IsLocal(target)) {
- send_message(user, service, "NSMSG_USER_IS_SERVICE", target->nick);
+ if (IsService(target))
+ send_message(user, service, "NSMSG_USER_IS_SERVICE", target->nick);
+ else
+ send_message(user, service, "MSG_USER_AUTHENTICATE", target->nick);
return 0;
}
if (!(hi = target->handle_info)) {
{
struct userNode *from;
struct userNode *who;
+#ifdef WITH_PROTOCOL_P10
+ extern char *his_servername;
+ extern char *his_servercomment;
+#endif
if (argc < 3)
return 0;
return 1;
}
irc_numeric(from, RPL_WHOISUSER, "%s %s %s * :%s", who->nick, who->ident, who->hostname, who->info);
+#ifdef WITH_PROTOCOL_P10
+ if (his_servername && his_servercomment)
+ irc_numeric(from, RPL_WHOISSERVER, "%s %s :%s", who->nick, his_servername, his_servercomment);
+ else
+#endif
irc_numeric(from, RPL_WHOISSERVER, "%s %s :%s", who->nick, who->uplink->name, who->uplink->description);
+
if (IsOper(who)) {
irc_numeric(from, RPL_WHOISOPERATOR, "%s :is a megalomaniacal power hungry tyrant", who->nick);
}
static unsigned int num_notice_funcs;
static struct dict *unbursted_channels;
+char *his_servername;
+char *his_servercomment;
+
static struct userNode *AddUser(struct server* uplink, const char *nick, const char *ident, const char *hostname, const char *modes, const char *numeric, const char *userinfo, time_t timestamp, const char *realip);
/* Numerics can be XYY, XYYY, or XXYYY; with X's identifying the
const char *str, *desc;
int numnick, usermask, max_users;
char numer[COMBO_NUMERIC_LEN+1];
+ extern char *his_servername;
+ extern char *his_servercomment;
/* read config items */
str = conf_get_data("server/ping_freq", RECDB_QSTRING);
inttobase64(numer, (numnick << 12) + (usermask & 0x00fff), 3);
else
inttobase64(numer, (numnick << 18) + (usermask & 0x3ffff), 5);
+ str = conf_get_data("server/his_servername", RECDB_QSTRING);
+ his_servername = str ? strdup(str) : NULL;
+ str = conf_get_data("server/his_servercomment", RECDB_QSTRING);
+ his_servercomment = str ? strdup(str) : NULL;
str = conf_get_data("server/hostname", RECDB_QSTRING);
desc = conf_get_data("server/description", RECDB_QSTRING);
if (!str || !desc) {
privmsg_funcs[numeric] = handler;
}
+void
+unreg_privmsg_func(struct userNode *user, privmsg_func_t handler)
+{
+ unsigned int x;
+
+ if (!user || handler)
+ return; /* this really only works with users */
+
+ memset(privmsg_funcs+user->num_local, 0, sizeof(privmsg_func_t));
+
+ for (x = user->num_local+1; x < num_privmsg_funcs; x++)
+ memmove(privmsg_funcs+x-1, privmsg_funcs+x, sizeof(privmsg_func_t));
+
+ privmsg_funcs = realloc(privmsg_funcs, num_privmsg_funcs*sizeof(privmsg_func_t));
+ num_privmsg_funcs--;
+}
+
+
void
reg_notice_func(struct userNode *user, privmsg_func_t handler)
{
notice_funcs[numeric] = handler;
}
+void
+unreg_notice_func(struct userNode *user, privmsg_func_t handler)
+{
+ unsigned int x;
+
+ if (!user || handler)
+ return; /* this really only works with users */
+
+ memset(notice_funcs+user->num_local, 0, sizeof(privmsg_func_t));
+
+ for (x = user->num_local+1; x < num_notice_funcs; x++)
+ memmove(notice_funcs+x-1, notice_funcs+x, sizeof(privmsg_func_t));
+
+ memset(notice_funcs+user->num_local, 0, sizeof(privmsg_func_t));
+ notice_funcs = realloc(notice_funcs, num_notice_funcs*sizeof(privmsg_func_t));
+ num_notice_funcs--;
+}
+
void
reg_oper_func(oper_func_t handler)
{
#ifdef WITH_PROTOCOL_P10
struct server* GetServerN(const char *numeric);
struct userNode* GetUserN(const char *numeric);
+extern char *his_servername;
+extern char *his_servercomment;
#endif
/* Basic protocol parsing support. */
typedef void (*privmsg_func_t) (struct userNode *user, struct userNode *target, char *text, int server_qualified);
void reg_privmsg_func(struct userNode *user, privmsg_func_t handler);
void reg_notice_func(struct userNode *user, privmsg_func_t handler);
+void unreg_privmsg_func(struct userNode *user, privmsg_func_t handler);
+void unreg_notice_func(struct userNode *user, privmsg_func_t handler);
typedef void (*oper_func_t) (struct userNode *user);
void reg_oper_func(oper_func_t handler);
"max_cycles" "30"; // max uplink cycles before giving up
// Admin information is traditionally: location, location, email
"admin" ("IRC Network", "Gotham City, GO", "Mr Commissioner <james.gordon@police.gov>");
+ /* the following two settings are for ircu's HEAD_IN_SAND features, and are equivelent to
+ * the F: lines in ircu's ircd.conf. both can be disabled by commenting them out. */
+ "his_servername" "*.Generic.NET"; // hidden server name, shown in remote /whois requests
+ "his_servercomment" "The Generic, Boring IRC Network";
};
// controlling how services (mostly NickServ) send mail