Permalink
Browse files

* Singleton crash hiba oka megtalálva így mostantól nem kell plusz fv…

… ahhoz hogy az eredeti funkciót lehessen használni.
  • Loading branch information...
1 parent 000b5d9 commit e9254ac9aeb645d670ea65bffa598cbaa7746d30 Megax committed May 6, 2012
Showing with 3 additions and 16 deletions.
  1. +3 −16 Core/Schumix.Irc/Sender.cs
View
@@ -26,24 +26,11 @@ namespace Schumix.Irc
{
public sealed class Sender
{
+ private readonly IgnoreChannel sIgnoreChannel = Singleton<IgnoreChannel>.Instance;
private readonly SendMessage sSendMessage = Singleton<SendMessage>.Instance;
private readonly object WriteLock = new object();
private Sender() {}
- // másik fáljból van csak hibát nem tudom orvosolni =/
- private bool IsIgnore(string Name)
- {
- try
- {
- var db = SchumixBase.DManager.QueryFirstRow("SELECT* FROM ignore_channels WHERE Channel = '{0}'", Name.ToLower());
- return !db.IsNull() ? true : false;
- }
- catch
- {
- return true;
- }
- }
-
public void NameInfo(string nick, string user, string userinfo)
{
lock(WriteLock)
@@ -73,7 +60,7 @@ public void Join(string channel)
{
lock(WriteLock)
{
- if(!IsIgnore(channel))
+ if(!sIgnoreChannel.IsIgnore(channel))
sSendMessage.WriteLine("JOIN {0}", channel);
}
}
@@ -82,7 +69,7 @@ public void Join(string channel, string pass)
{
lock(WriteLock)
{
- if(!IsIgnore(channel))
+ if(!sIgnoreChannel.IsIgnore(channel))
sSendMessage.WriteLine("JOIN {0} {1}", channel, pass);
}
}

0 comments on commit e9254ac

Please sign in to comment.