mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 22:03:13 +02:00
SQLINE/UNSQLINE and SVSNLINE fixes
This commit is contained in:
+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)
|
||||
|
||||
Reference in New Issue
Block a user