fix bug
This commit is contained in:
parent
dc11e3de53
commit
14c177537a
@ -45,19 +45,26 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
string strv = value.ToString() ?? "";
|
||||||
switch (part.ToLower())
|
switch (part.ToLower())
|
||||||
{
|
{
|
||||||
case "repeatignore":
|
case "repeatignore":
|
||||||
if (isadd) RepeatIgnore.Add((string)value);
|
if (isadd) RepeatIgnore.Add(strv);
|
||||||
else RepeatIgnore.Remove((string)value);
|
else RepeatIgnore.Remove(strv);
|
||||||
break;
|
break;
|
||||||
case "callbrotherqqignore":
|
case "callbrotherqqignore":
|
||||||
if (isadd) CallBrotherQQIgnore.Add((long)value);
|
if (long.TryParse(strv, out long lv))
|
||||||
else CallBrotherQQIgnore.Remove((long)value);
|
{
|
||||||
|
if (isadd) CallBrotherQQIgnore.Add(lv);
|
||||||
|
else CallBrotherQQIgnore.Remove(lv);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "qqgroupignore":
|
case "qqgroupignore":
|
||||||
if (isadd) QQGroupIgnore.Add((long)value);
|
if (long.TryParse(strv, out lv))
|
||||||
else QQGroupIgnore.Remove((long)value);
|
{
|
||||||
|
if (isadd) QQGroupIgnore.Add(lv);
|
||||||
|
else QQGroupIgnore.Remove(lv);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user