Open MSIKT4AV opened 4 years ago
I have not done this in years but according to RFC1459 you simply need to send a PASS
with your password before logging in.
I updated the code to include a example usage
https://github.com/Hammster/php-irc-bot/blob/1d4508bf58b6e736160e6c9150a1103135c8abce/bot.php#L6-L18
Still i cant login. Look:
Guest PASS :Unknown command Guest JOIN :You have not registered
What network are you trying to join, some require you to do something like
/connect chat.freenode.net 6667 foo:password
/msg NickServ IDENTIFY foo password
Please look up the according docs or the IRC you're connecting to. My code is the one according to RFC1459, but it's up to the IRC server to decide how the login system works
I try connect to: https://poorchat.net/channels/api https://prnt.sc/qv42k1
By HexChat is working, but not by php code. I dont know how to write this
From https://old.poorchat.net/faq you can see
/msg Poorchat LOGIN [nazwa_uzytkownika] [haslo]
so this means you need to send a message after setting your user
fputs($socket, "USER " . $nickname . " 0 * :" . $master . "'s Bot\n");
fputs($socket, "NICK " . $nickname . "\n");
fputs($socket, "PRIVMSG Poorchat LOGIN " . $nickname . " " . $password . "\n");
:irc.poorchat.net 451 Guest JOIN :You have not registered :irc.poorchat.net 451 Guest PRIVMSG :You have not registered
;/ can you try connect to this chat? i can give you password/login
How add code to login as user by name and password?