mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-27 09:26:39 +02:00
Fix looking up the wrong extban in some cases.
~T => ~text => starts with ~t => ~time... fun.
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ Extban *findmod_by_bantype(char *str, char **remainder)
|
||||
|
||||
for (i=0; i <= ExtBan_highest; i++)
|
||||
{
|
||||
if (ExtBan_Table[i].letter == str[1])
|
||||
if ((str[2] == ':') && (ExtBan_Table[i].letter == str[1]))
|
||||
return &ExtBan_Table[i];
|
||||
if (ExtBan_Table[i].name && !strncmp(ExtBan_Table[i].name, str+1, strlen(ExtBan_Table[i].name)))
|
||||
return &ExtBan_Table[i];
|
||||
|
||||
@@ -372,9 +372,9 @@ char *extban_modeT_conv_param(BanContext *b, Extban *extban)
|
||||
|
||||
/* Rebuild the string.. can be cut off if too long. */
|
||||
#ifdef UHOSTFEATURE
|
||||
snprintf(retbuf, sizeof(retbuf), "~T:%s:%s:%s", uhost, action, text);
|
||||
snprintf(retbuf, sizeof(retbuf), "%s:%s:%s", uhost, action, text);
|
||||
#else
|
||||
snprintf(retbuf, sizeof(retbuf), "~T:%s:%s", action, text);
|
||||
snprintf(retbuf, sizeof(retbuf), "%s:%s", action, text);
|
||||
#endif
|
||||
return retbuf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user