7
public static string SERVER = "irc.rizon.net";
private static int PORT = 6667;
private static string USER = "Test C# Irc bot";
private static string NICK = "Testing";
private static string CHANNEL = "#Test0x40";
public static void Main(string[] args)
{
NetworkStream stream;
TcpClient irc;
StreamReader reader;
StreamWriter writer;
irc = new TcpClient(SERVER, PORT);
stream = irc.GetStream();
reader = new StreamReader(stream);
writer = new StreamWriter(stream);
writer.WriteLine("NICK " + NICK);
writer.Flush();
writer.WriteLine("JOIN " + CHANNEL);
writer.Flush();
Console.ReadKey(true);
}
왜 내 IRC 봇이 연결되지 않습니까?IRC 봇이 연결되지 않는 이유는 무엇입니까?
무엇 연결 안된다고 생각하니? 오류가 있습니까? –
포트 6667이 차단되었는지 확인하십시오. 필자는 6667을 차단 한 프록시 서버 뒤에 있습니다. 6667에서 IRC에 연결할 수 없습니다. –
@ Mr. 샤프 : 봇이 실제로 연결되어 있지 않습니까? 예 : 만약 당신이'/ 누가 테스트 중입니까?'(나는 올바른 명령이라고 생각합니다) 그가 거기 있지 않습니까? StreamReader에서 읽으면 서버에서 오류 메시지가 표시됩니까? –