Skip to content

Commit 79a4296

Browse files
committed
use Logger
1 parent 78056ce commit 79a4296

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

DefaultPlugin/Sources/Twitch/Twitch.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void Connect(string roomName)
6969

7070
if (string.IsNullOrWhiteSpace(HostChannelName))
7171
{
72-
IO.CurrentIO.WriteColor("频道名不能为空!",ConsoleColor.Red);
72+
logger.LogError("HostChannelName is empty");
7373
return;
7474
}
7575

@@ -113,7 +113,7 @@ public void Connect(string roomName)
113113
}
114114
catch (Exception e)
115115
{
116-
IO.CurrentIO.WriteColor("twitch connect error!" + e.Message, ConsoleColor.Red);
116+
logger.LogError("twitch source connect error!" + e.Message);
117117

118118
Status = SourceStatus.USER_DISCONNECTED;
119119
}
@@ -155,11 +155,6 @@ public override void Disconnect()
155155
Status = SourceStatus.USER_DISCONNECTED;
156156
}
157157

158-
public bool Stauts()
159-
{
160-
return currentIRCIO != null && currentIRCIO.IsConnected;
161-
}
162-
163158
public override void Send(IMessageBase message)
164159
{
165160
currentIRCIO?.SendMessage(message.Message);

0 commit comments

Comments
 (0)