1
0
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:
codemastr
2003-04-10 21:13:36 +00:00
parent 7c9ba1feda
commit d41d26a163
5 changed files with 35 additions and 8 deletions
+3
View File
@@ -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
View File
@@ -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;
+10 -1
View File
@@ -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);
+10 -1
View File
@@ -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)
-1
View File
@@ -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);
}