mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 16:43:12 +02:00
SQLINE/UNSQLINE and SVSNLINE fixes
This commit is contained in:
@@ -2020,3 +2020,6 @@ seen. gmtime warning still there
|
||||
- Fixed opermode bug which could cause the ircd to crash a while later (#0000823).
|
||||
- Changed throttling errormsg so mIRC recognizes it and waits a while.
|
||||
- Added SSL quit error messages
|
||||
- Fixed an SQLINE bug with sqlines without a reason
|
||||
- Fixed a bug effecting additions/deletions of SQLINES and deletions of SVSNLINES (may be
|
||||
the cause of #0000866)
|
||||
|
||||
+12
-5
@@ -134,10 +134,17 @@ DLLFUNC int m_sqline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
"%s", parv[1]);
|
||||
|
||||
/* Only replaces AKILL (global ban nick)'s */
|
||||
if ((bconf = Find_banEx(parv[1], CONF_BAN_NICK, CONF_BAN_TYPE_AKILL)))
|
||||
for (bconf = conf_ban; bconf; bconf = (ConfigItem_ban *)bconf->next)
|
||||
{
|
||||
if (bconf->flag.type != CONF_BAN_NICK)
|
||||
continue;
|
||||
if (bconf->flag.type2 != CONF_BAN_TYPE_AKILL)
|
||||
continue;
|
||||
if (!stricmp(bconf->mask, parv[1]))
|
||||
break;
|
||||
}
|
||||
if (bconf)
|
||||
{
|
||||
if (bconf->mask)
|
||||
MyFree(bconf->mask);
|
||||
if (bconf->reason)
|
||||
MyFree(bconf->reason);
|
||||
bconf->mask = NULL;
|
||||
@@ -147,12 +154,12 @@ DLLFUNC int m_sqline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
else
|
||||
{
|
||||
bconf = (ConfigItem_ban *) MyMallocEx(sizeof(ConfigItem_ban));
|
||||
if (parv[1])
|
||||
DupString(bconf->mask, parv[1]);
|
||||
addit = 1;
|
||||
}
|
||||
if (parv[2])
|
||||
DupString(bconf->reason, parv[2]);
|
||||
if (parv[1])
|
||||
DupString(bconf->mask, parv[1]);
|
||||
|
||||
/* CONF_BAN_NICK && CONF_BAN_TYPE_AKILL == SQLINE */
|
||||
bconf->flag.type = CONF_BAN_NICK;
|
||||
|
||||
@@ -188,7 +188,16 @@ DLLFUNC int m_svsnline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
if (parc < 3)
|
||||
return 0;
|
||||
|
||||
if ((bconf = Find_banEx(parv[3], CONF_BAN_REALNAME, CONF_BAN_TYPE_AKILL)))
|
||||
for (bconf = conf_ban; bconf; bconf = (ConfigItem_ban *)bconf->next)
|
||||
{
|
||||
if (bconf->flag.type != CONF_BAN_REALNAME)
|
||||
continue;
|
||||
if (bconf->flag.type2 != CONF_BAN_TYPE_AKILL)
|
||||
continue;
|
||||
if (!stricmp(bconf->mask, parv[3]))
|
||||
break;
|
||||
}
|
||||
if (bconf)
|
||||
{
|
||||
DelListItem(bconf, conf_ban);
|
||||
|
||||
|
||||
@@ -123,7 +123,16 @@ DLLFUNC int m_unsqline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
sendto_serv_butone_token(cptr, parv[0], MSG_UNSQLINE, TOK_UNSQLINE,
|
||||
"%s", parv[1]);
|
||||
|
||||
if ((bconf = Find_banEx(parv[1], CONF_BAN_NICK, CONF_BAN_TYPE_AKILL)))
|
||||
for (bconf = conf_ban; bconf; bconf = (ConfigItem_ban *)bconf->next)
|
||||
{
|
||||
if (bconf->flag.type != CONF_BAN_NICK)
|
||||
continue;
|
||||
if (bconf->flag.type2 != CONF_BAN_TYPE_AKILL)
|
||||
continue;
|
||||
if (!stricmp(parv[1], bconf->mask))
|
||||
break;
|
||||
}
|
||||
if (bconf)
|
||||
{
|
||||
DelListItem(bconf, conf_ban);
|
||||
if (bconf->mask)
|
||||
|
||||
@@ -1381,7 +1381,6 @@ int m_server_synch(aClient *cptr, long numeric, ConfigItem_link *aconf)
|
||||
sendto_one(cptr, "%s%s %s %s",
|
||||
ns ? "@" : ":",
|
||||
ns ? ns : me.name,
|
||||
me.name,
|
||||
(IsToken(cptr) ? TOK_SQLINE :
|
||||
MSG_SQLINE), bconf->mask);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user