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

Adding new non IRC commands #9

Open
RobertEcker opened this issue Aug 18, 2014 · 4 comments
Open

Adding new non IRC commands #9

RobertEcker opened this issue Aug 18, 2014 · 4 comments
Labels

Comments

@RobertEcker
Copy link

  1. Non-standard IRC commands:
    Is there a way to add non-IRC commands, e.g., DICE:

Input: /DICE
Output: * Nick dices 4

  1. The main problem in my consideration is:
    How can you distinguish between "/DICE" and "/ME dices 4"
    The output should look differently than, e.g., "/ME" else this command is nonsense (you can cheat).

  2. But it depends on the client. Therefore, ...
    Is it possible, that common IRC clients understand such a command (without changing the client's code)? Or is there another way?

So my main question is:
Is adding a new non-IRC command possible without changing the any client code and looking different from, e.g., "/ME"?!

@jcowgill
Copy link
Owner

No I don't think it's possible to make it appear differently without changing any client code. I think the best way to do what you want (at least I think so) is to create an IRC bot. You have it join the channel you're doing this on and when anyone says !dice (or something similar), the bot will reply with the dice roll. You can't cheat when you do it this way and as a bonus it should work on any IRC server.

@RobertEcker
Copy link
Author

tnx for your anser

is !dice == /dice?
if the command should not displayed in the current channel, i have to write the message directly to the bot by using, e.g., "/botname dice", shouldnt i?

maybe another way would be this: server has to replace all "/dice" with "/botname dice", so this message is sent to the bot ...

but is it also possible, that
a) the jircd server perform this command and answers with, e.g., "* jircd: user dices 4"? (so it is obviously different to "user dices 4")
b) without having an explicit user(bot) called "jircd"?

@jcowgill
Copy link
Owner

is !dice == /dice?

No I did mean !dice, you type it into the channel and the bot responds.

if the command should not displayed in the current channel, i have to write the message directly to the bot by using, e.g., "/botname dice", shouldnt i?

If you really don't want the command displayed, yes you would need something like "/msg botname dice" I don't see the point in preventing this though since everyone in the channel will immediately know you sent that command from the response the bot provides.

maybe another way would be this: server has to replace all "/dice" with "/botname dice", so this message is sent to the bot ...

Yep you could do that (you'll need to write your own command in Java though)

but is it also possible, that
a) the jircd server perform this command and answers with, e.g., "* jircd: user dices 4"? (so it is obviously different to "user dices 4")
b) without having an explicit user(bot) called "jircd"?

Actually I didn't think of this but yes you could do it that way as well, but I think this would only work if an entire server was devoted to dicing. What if the user has joined multiple channels, where does the message go?

@RobertEcker
Copy link
Author

I think it is message overload to see both lines (!dice and the results) ... that's why - similar to other commands (e.g., JOIN) - you should see IMHO only the result of the message.

What if the user has joined multiple channels, where does the message go?

Independent of clients, i think you have to add another paramter like: "/dice <#channel>"

if the client is adapted, it should work without this parameter

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

No branches or pull requests

2 participants