Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server password #28

Open
Ghezzo opened this issue Feb 28, 2013 · 16 comments
Open

Server password #28

Ghezzo opened this issue Feb 28, 2013 · 16 comments

Comments

@Ghezzo
Copy link

Ghezzo commented Feb 28, 2013

The IRC server I'm trying to connect to requires a server password, would be nice it that could be added. Everything else seems to work just fine but the password is missing.

@ElvenSpellmaker
Copy link
Collaborator

Try looking at my code, I have just tried to implement channel and server password handling. I'm hoping at some point pogo will pull my code.

#26

@Ghezzo
Copy link
Author

Ghezzo commented Feb 28, 2013

It doesn't seem to work, it doesn't show the password in the output, and also spams empty log messages filling up the log file making it huge.

@ElvenSpellmaker
Copy link
Collaborator

Does it just say "PASS" then?

@Ghezzo
Copy link
Author

Ghezzo commented Feb 28, 2013

Yes, only PASS.

@ElvenSpellmaker
Copy link
Collaborator

OK I'll take a look now, and hopefully will find my error.

@ElvenSpellmaker
Copy link
Collaborator

OK try what I have just pushed now, on my end I now get the password in the PASS message. =)

@Ghezzo
Copy link
Author

Ghezzo commented Feb 28, 2013

Now it connects to the server but it doesn't join a channel. It shows the server MOTD and then nothing.

@ElvenSpellmaker
Copy link
Collaborator

OK is your config file as needed?

If you wanted to join a channel called #phpbot404 with no password and #cs with password foobarbaz you would have:

'channels' => array(
'#phpbot404' => '',
'#cs' => 'foobarbaz',
),

If you are sure your config. is correct, please may you post a log output, thanks. =)

@Ghezzo
Copy link
Author

Ghezzo commented Feb 28, 2013

28.02.2013 - 20:23:28 [ COMMAND ] PASS removedpassword
28.02.2013 - 20:23:28 [ COMMAND ] NICK ghezzotest
28.02.2013 - 20:23:28 [ COMMAND ] USER ghezzotest Layne-Obserdia.de ghezzotest :ghezzotest
28.02.2013 - 20:23:28 [ LOG ] :tmi.twitch.tv 001 ghezzotest :connected to TMI
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 002 ghezzotest :your host is TMI
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 003 ghezzotest :this server is pretty new
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 004 ghezzotest tmi.twitch.tv 0.0.1 w n
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 375 ghezzotest :- tmi.twitch.tv Message of the day -
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 372 ghezzotest :- not much to say here
28.02.2013 - 20:23:29 [ LOG ] :tmi.twitch.tv 376 ghezzotest :End of /MOTD command

And then nothing after that.

The config is:

'channels' => array(
'#ghezzotest' => 'removedpassword',
),

@ElvenSpellmaker
Copy link
Collaborator

Hmm it seems like that should work... I just tested my code on a private room and it connected fine...

I don't have a server that needs a password to try my code out on, but I really don't see why it would not work. My code also doesn't complain if you try to join an passwordless channel with a password and it says it can't connect to a channel if the password is wrong...

It seems very strange to me.

@ElvenSpellmaker
Copy link
Collaborator

Are you still receiving this weird bug?
If I had a server with a password to try then I could try and debug it, but without access to that configuration I can't. =S

@Ghezzo
Copy link
Author

Ghezzo commented Mar 2, 2013

Yes I am, if you want to you can create an account on twitch.tv and the irc password is the same as on the website.

@ElvenSpellmaker
Copy link
Collaborator

Hmmm, when I try to connect to that server, I get the infinite loop problem (when I clone the code here) and I can't work that one out, but if you aren't then I know why your bot isn't connecting to any channels.

Super3 put in some code which checks for "Welcome" in the MOTD and if it's not there then the bot doesn't try and connect to any channels and from your log above the MOTD doesn't have "Welcome" in it!

if (stripos( $data, 'Welcome' ) !== false) {

That is a very silly check, but at this moment I think the best way is to look for "End of /MOTD command" instead.

Try the latest push and fingers crossed it works.

I really do need to get to the bottom of that infinite loop though, if you were getting it and I still am.

@Ghezzo
Copy link
Author

Ghezzo commented Mar 3, 2013

Now it connects and accepts commands, thanks!

@ElvenSpellmaker
Copy link
Collaborator

Great! \o/

@nathanaelbaaij
Copy link

Connecting to irc.twitch.tv

I get this error can you help me out?

socket_create(): Unable to create socket [0]: An address incompatible with the requested protocol was used. in E:\xampp\htdocs\github\IRC-Bot\Classes\Library\IRC\Bot.php on line 195

log:

21.10.2014 - 19:36:50 [ COMMAND ] PASS password
21.10.2014 - 19:36:50 [ COMMAND ] NICK disputatio
21.10.2014 - 19:36:50 [ COMMAND ] USER disputatio Layne-Obserdia.de disputatio :disputatio
21.10.2014 - 19:36:50 [ LOG ] TEST: BEFORE SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] TEST: AFTER SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 001 disputatio :Welcome, GLHF!
21.10.2014 - 19:36:51 [ LOG ] TEST: BEFORE SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] TEST: AFTER SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 002 disputatio :Your host is tmi.twitch.tv
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 003 disputatio :This server is rather new
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 004 disputatio :-
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 375 disputatio :-
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 372 disputatio :You are in a maze of twisty passages, all alike.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 376 disputatio :>
21.10.2014 - 19:36:51 [ LOG ] TEST: BEFORE SOCKET SELECT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants