1
好吧所以這裏是我到目前爲止,麻煩與StreamReader的
List<string> lines = new List<string>();
using (StreamReader r = new StreamReader(f))
{
string line;
while ((line = r.ReadLine()) != null)
{
lines.Add(line);
}
}
foreach (string s in lines)
{
NetworkStream stream = irc.GetStream();
writer.WriteLine(USER);
writer.Flush();
writer.WriteLine("NICK " + NICK);
writer.Flush();
writer.WriteLine("JOIN " + s);
writer.Flush();
string trimmedString = string.Empty;
CHANNEL = s;
}
不幸的是,當我的IRC啞進入設定密碼的房間寫入出密碼,如果我做它改變通道的命令例如#lol test
測試是密碼,因爲CHANNEL = s;它與命令
writer.WriteLine("PRIVMSG " + CHANNEL + " :" + "Hello");
也就是寫出來,希望IRC的唯一途徑所以有僅是文本的開始方式的「通道」,只是#lol所以它不寫出密碼寫出密碼?
我希望你能理解我的問題。