Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Control panel for the bot #33

Open
NanoSector opened this issue Apr 6, 2015 · 6 comments
Open

Control panel for the bot #33

NanoSector opened this issue Apr 6, 2015 · 6 comments

Comments

@NanoSector
Copy link
Member

I've been looking into opening ports with php. Apparently we can open ports with sockets.

Because the bot can't listen to input by itself, we could make it listen to input from another socket and associated port.

The advantage to this would be we could use control panels in all kinds of formats. We can make a web based panels, graphical platform independent panels, mobile panels, you name it. You're not bound to PHP as programming language. And you can remotely control the bot instead of just locally.

Disadvantage would be that the bot needs additional components to be managed and we need a standard for interpreting commands, plus implementations for commands (and probably authentication in the meantime, so random idiots can't connect and control it).

We could possibly make this a module.

@NanoSector
Copy link
Member Author

With the new non blocking socket implementation we can just let this hook into the Loop event and go with the flow :)

I've been trying to work on a module like this but can't get a desktop application done, my C# knowledge is too limited. We should also be able to make a web control panel though.

@Amunak
Copy link
Contributor

Amunak commented Aug 23, 2015

A web-based control panel would be the best as it would be very easily accessible from anywhere without being bound to a specific platform.

@NanoSector
Copy link
Member Author

Okay. Would you have an idea of what protocol to use to talk to the bot?

@Amunak
Copy link
Contributor

Amunak commented Aug 25, 2015

Basically there are two options - we either make an API that can be used by anything else, in which case I'd try to go with REST and use JSON to pass the data and stuff, but that would mean having a full-featured webserver running. In which case we may as well just serve the webpages directly from the bot. Or just go with whatever, implement our own protocol that would be easiest for us, but it may not be ideal.

We could use something like https://github.com/reactphp/react to handle that for us (it could actually handle the bot loop and stuff for us too... should've found out about that earlier).

@NanoSector
Copy link
Member Author

[01:59] <NanoSector> amunak: i like the idea of using react, is it too late to do that?
[02:02] <NanoSector> yup, it is
[02:02] <NanoSector> meh.
[02:02] <amunak> well
[02:02] <amunak> probably not too late
[02:02] <NanoSector> but a lot of work to port
[02:02] <amunak> the bot is written well (I hope! :P) so it shouldn't be too bad
[02:03] <amunak> depends
[02:03] <NanoSector> i hope so too :P
[02:03] <NanoSector> also, what do you think of passing objects as outgoing data instead of just strings
[02:03] <NanoSector> like
[02:03] <amunak> I mean we can just use its server for now, perhaps the application loop and stuff, and we can rewrite whatever else is left later
[02:03] <NanoSector> $this->bot->out(new IRCCommands::notify($user, $message));
[02:03] <amunak> yeah sounds great
[02:03] <NanoSector> or w/e
[02:04] <NanoSector> yeah
[02:04] <NanoSector> perhaps it's possible to integrate the server part into a module
[02:04] <NanoSector> so it's just plug and play
[02:04] <amunak> it should be

@NanoSector NanoSector modified the milestone: 3.0 Oct 22, 2016
@NanoSector
Copy link
Member Author

Removing the 3.0 milestone because this really is a module request and not a core feature.

@NanoSector NanoSector removed this from the 3.0 milestone May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants