* ircd/IPcheck.c (ip_registry_find): Use canonical form of IP
address to look up and compare against hash entries.
+ * ircd/ircd_parser.y (clientblock): Stash IP string in aconf->name.
+ (clienthost): Split hosts that contain '@' into username and host.
+ (clientip): Split IPs that contain '@' into username and IP.
+ (killreason): Add missing ~ to mask off DENY_FLAGS_FILE.
+
* ircd/m_silence.c (forward_silences): When we reject a silence,
splice it out of the ban list. Warn the user if he is local.
unsigned char addrbits;
aconf->username = username;
aconf->host = host;
- if (ip && ipmask_parse(ip, &aconf->address.addr, &addrbits))
+ if (ip && ipmask_parse(ip, &aconf->address.addr, &addrbits)) {
aconf->addrbits = addrbits;
- else
+ aconf->name = ip;
+ } else {
+ MyFree(ip);
aconf->addrbits = -1;
+ DupString(aconf->name, "*");
+ }
aconf->conn_class = c_class ? c_class : find_class("default");
aconf->maximum = maxlinks;
host = NULL;
username = NULL;
c_class = NULL;
- MyFree(ip);
+ ip = NULL;
};
clientitems: clientitem clientitems | clientitem;
clientitem: clienthost | clientip | clientusername | clientclass | clientpass | clientmaxlinks | error;
clienthost: HOST '=' QSTRING ';'
{
+ char *sep = strchr($3, '@');
MyFree(host);
- DupString(host, $3);
+ if (sep) {
+ *sep++ = '\0';
+ MyFree(username);
+ DupString(username, $3);
+ DupString(host, sep);
+ } else {
+ DupString(host, $3);
+ }
};
clientip: IP '=' QSTRING ';'
{
+ char *sep = strchr($3, '@');
MyFree(ip);
- DupString(ip, $3);
+ if (sep) {
+ *sep++ = '\0';
+ MyFree(username);
+ DupString(username, $3);
+ DupString(ip, sep);
+ } else {
+ DupString(ip, $3);
+ }
};
clientusername: USERNAME '=' QSTRING ';'
{
killreason: REASON '=' QSTRING ';'
{
- dconf->flags &= DENY_FLAGS_FILE;
+ dconf->flags &= ~DENY_FLAGS_FILE;
MyFree(dconf->message);
DupString(dconf->message, $3);
};