I was trying to make a C# IRC Twitch Bot but i just couldn´t connect to
so i tried to code from a user and it worked. I was able to connect to irc.twitch.tv ( Used the username and password from the “bot-account” ) .
The part that i marked red in the code (
http://imgur.com/jSwtKI2 ) doesn´t work.
( password is censored )
Nothing happens when i write PING . ( The Bot doesnt write PONG )
In the console it shows the messages from the users ( in my channel ) so im connected for sure.
Many thanks in advance .
If you mean that nothing happens when you type PING in the chat, then that is expected. Such a message would be received in the format (more or less):
:email@example.com PRIVMSG #monstercat: PING
…and thus not start with PING. Your bot should only respond with PONG when the server sends a message with the PING prefix. If this is not the case, and you only mean that the bot doesn’t respond when you manually set
buf to “PING”, then it could be because of this bit:
output.Write(buf.Replace("PING", "PONG") + "\r\n");
Since all received messages already end with \r\n you are effectively sending:
Hm. Thanks for the answer. But do you have any ideas how to make him answer to specific text messages ?
for example “PONG” to" PING" ?
I dont have a lot of experience in working with C#
So, i tryed to implement it in C#, so if anyone needs an IRC-Message-Parser Method for C# : (Works totally fine now)
public static IrcMessage ParseIrcMessage(string rawMessage)
var prefix = "";
var arguments = new Stack<string>();
var message = "";
throw new BadIrcMessageException("Message is empty.");
var hasPrefix = rawMessage == ':' && rawMessage != '@';
@Lepstr made a message parser in C# you could use. Modify this to your liking so that you can isolate the message part of a PRIVMSG and respond appropriately.
The irc servers were recently moved over to Amazon. The ip you’re using for your bot might be wrong.
We've spent considerable amount of time over the last half year preparing to migrate our chat system to AWS EC2 servers. We're finally ready to start the transition (and identify any misconfigurations / new scaling concerns in the new environment).
As this will affect third-party developers significantly, I want to
a) make you aware b) ask for suggestions to make this transition less painful for you
Our current rollout plans are as follows:
Migrate channels one-by-one on a whitelist bas…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.