Inouju / mambo

Teamspeak 3 chat bot
MIT License
11 stars 0 forks source link

No bot output, getting id times out #3

Open mashedkeyboard opened 8 years ago

mashedkeyboard commented 8 years ago

After starting the bot on Windows Server 2008 with the latest Erlang and Elixir, I'm getting the same issue as Infiniti: http://forum.teamspeak.com/threads/122775-Updated-Chat-bot-Mambo-IRC-style-bot-for-Teamspeak-3?p=427683#post427683

The bot doesn't connect, the number of users doesn't increase, and attempting to run Mambo.Bot.id() just times out:

iex(2)> Mambo.Bot.id() ** (exit) exited in: :gen_server.call(Mambo.Bot, :id) ** (EXIT) time out (stdlib) gen_server.erl:204: :gen_server.call/2

Any ideas?

Inouju commented 8 years ago

This usually occurs when the telnet user you supplied does not have enough permissions.

I.e.:

Are you supplying the bot with serveradmin level permissions?

mashedkeyboard commented 8 years ago

I am, yeah.

Inouju commented 8 years ago

Do you mind posting your config here? (Please remember to edit out you username, password, and IP address)

mashedkeyboard commented 8 years ago
{
  "name": "SmorfBot",
  "user": "redacted",
  "pass": "redacted",
  "host": "redacted",
  "port": 10013,
  "bot_id": "smorfbotmambo",
  "admins": ["done", "done"],
  "channels": "all",
  "scripts": [
    {"name": "Sux", "args": []},
    {"name": "Help", "args": []},
    {"name": "Benis", "args": []},
    {"name": "Utils", "args": []},
    {"name": "Title", "args": []},
    {"name": "Wolframalpha", "args": "redacted"}
  ]
}
Inouju commented 8 years ago

Everything looks fine there...

Does your server have flood protections? It is possible that your serverquery account is locked out because the bot is attempting to connect to all channels.

Try running the bot, then try connecting to the server via telnet manually using the same credentials.

mashedkeyboard commented 8 years ago

error id 0 msg OK on Telnet login. Looks fine to me...

schoerg commented 8 years ago

if you are running the bot on the same machine, 127.0.0.1 should be whitelisted by default.

mashedkeyboard commented 8 years ago

It's not on the same machine @schoerg. @Inouju, the server does have flood protection, but actually Server Admin bypasses it anyway so it's not that...

Inouju commented 8 years ago

Ah ok I think I know where the problem lies then.

What virtual server number do you use? I have a suspicion it's not 1 since your port is not default.

mashedkeyboard commented 8 years ago

@Inouju, 2390.

Inouju commented 8 years ago

Ah ok. That is indeed the issue. I will add that to the config for next release.

For now please make these changes and let me know how they turn out:

Change "use sid=1" to "use sid=2390" where sid is your server id:

mashedkeyboard commented 8 years ago

@Inouju still happening :/ Recompiled and still the same error on id()

Inouju commented 8 years ago

:( Can you run these telnet commands with the same user as the bot is attempting to use:

  1. login your_username your_password
  2. use sid=2390
  3. servernotifyregister event=textprivate
  4. clientupdate client_nickname=smorfbotmambo
  5. channellist -flags
mashedkeyboard commented 8 years ago

That all works, @Inouju. However, having left the bot running, it's now giving me output... namely, "invalid serverID". But the server ID works fine over telnet... :(

Inouju commented 8 years ago

Hm, if that server id works for you over telnet, it should work fine for the bot.

You edited both the files to use sid=2390?

I'm not sure why there would be discrepancy between when the bot does it and when you do it manually with telnet.. This is very strange indeed.

mashedkeyboard commented 8 years ago

Yeah, they both have 2390. Is there anywhere else the sid might be hiding?

Inouju commented 8 years ago

No, those are the only places where that is used. I'll have to take a closer look later

mashedkeyboard commented 8 years ago

Alright. Sorry to be a pain :( We're moving off our current TS (Enjin) anyway this week so it's not that much of a big deal - I'm migrating our servers to our own hardware so we'll be able to have it as sid 1