I'm developing my own irc bot and in a channel I'm in, one of the ops is able to activate a bot but run it under his own nick without a new nick joining the channel.
For example, guy's nick is #James and he activated a bot that says hello when you do .hello:
+John: .hello
#James: Hello, John.
Any idea how is this done possibly? The only way I've been able to run my bot is to connect it to the server & channel with a completely new nick.
This really depends on how the bot is written/implemented. Some IRC clients (like MIRC or HexChat/X-Chat) support scripting. As such you're able to extend them to act just like bots even though someone is actually using them as a standard client. I could also imagine some interface being use, like a bouncer, which allows multiple clients to connect to one permanent IRC session.
there are 2 ways
eggdrops
or mIRCScripting
script like on texts, can't be triggered by yourself
example
on $*:text:/^\.h(i|ello)$/iS:#:{
msg $chan $+(h,$regml(1)) $nick
}
the difference is, when you run your bot on the same mIRC client
you can specify who is the owner of the bot, and who is not
like
on $*:text:/^\.h(i|ello)$/iS:#:{
if ($me == botname) {
msg $chan $+(h,$regml(1)) $nick
}
}
the script will only trigger, if it is running under Bot's name
Related
Any way to connect discord.js with minecraft server, i wanna type in discord my nickname in channel #reward
and got in minecraft 10 diamonds on my nickname,
i trying to use rest but idk how to implement miencraft + discord.js
someone has idea?
Discord.js does not include any features for Minecraft, however, you could use a webhook plugin (If using spigot/paper/bukkit...) or find an online webhook. You could even set up a hidden discord channel where the bot can read the webhooks and announce them in its own way.
You may be able to link RCon with your discord bot to give you diamond if you did indeed type your nickname in #reward, however, there is no official way to do this (to my knowledge)
You can user the discord java api to create the bot inside a plugin or you can use mineflayer and discord.js to create a minecraft bot and a discord bot and let them communicate using websockets.
You can use a discord java api (ex. JDA) to make a bot, which is gonna take user parameter and gonna process this through rcon
If your bot is able to interact with the commandline, you can use RCon.
MCRcon is a cross-platform rcon client which is run via the commandline.
There may also be a js library for RCon.
Using RCon:
Make sure it is able to access the #reward channel. You need to make it so it can see the messages and find usernames.
You need to execute the following command (mcrcon):
mcrcon -H <hostname> -P <RCon Port> -s (Prevents Feedback) -p <RCon Password> "give <username> diamond"
For MCRCon: https://sourceforge.net/projects/mcrcon/
Note: MCRCon is available for both Windows and Linux
If the other answers don't help, the easiest way to connect Minecraft and Discord is thru a Minecraft Plugin and Addon that lets you control your bot. The plugin is called Skript and the addon is called Vixio. There is a full tutorial on how to set it up here
I hope it works for you :)
If you're hosting your minecraft server on a pterodactyl server then you can just send a request to their api to post a command on the prompt.
Just as the title says, I want a command be done when a certain word is said in my irc channel.
Ex: If someone types "Hey!" in the channel, the server performs an action like restarting an services.
The channel is private and only I will be getting access to it.
The purpose of it will be that if I send a command from my office that I want to restart Apache (example).
Then I'll type apacherst, the irc sends the command to my server and restarts apache.
Any idea?
Thanks!
/Phew
Check out a program called Hubot. It has a plug-in mechanism to let make your chat server extensible. It supports IRC and many other protocols.
I'd like to run this IRC Eliza bot but I lack some fundamental understanding of how to do it.
https://github.com/isaacs/node-eliza
I don't know anything about IRC or how to connect to them. Could someone explain how I connect to this bot? Do I need to host it remotely? Is there a way to run an IRC client locally and connect to it locally? Currently the program just runs without error but does nothing.
I understand node.js, but I seem to missing some fundamentals in understanding IRC on how to get an IRC bot running.
The readme gives me code that executes but doesn't do anything, quoted below:
Usage
var Eliza = require('eliza/irc.js')
new Eliza({ server: 'irc.freenode.net'
, nick: 'Eliza'
, channels: ['##turtles']
, userName: 'eliza'
, realName: 'eliza' })
IRC is the a global chat system, comprised of many individual hosts, all (eventually) linked. You usually don't run a part of IRC yourself, rather you use a client to connect to one of the hosts and thus gain access to the network and everyone on it.
An IRC bot is a piece of machine code that has its own logic (Eliza's logic, in your case), and is also connected to IRC and issues IRC commands that let it join channels, talk to other people/bots, received messages, etc.
In your case, you would simply need to run the bot, and let it know which IRC server to join (that the server parameter in new Eliza({...), what nick name to choose for itself, etc.
To run the bot just run node, in any environment (your home PC? hosting?) with the contents of the sample file.
I'd like to know if some sort of bot/tool/service exists that would allow people on (regular) IRC chat to me on gtalk
so: irc user X sends a pm to MyBot (f.e.); that pm forwards to me
a irc room to chat would also work fine (so everything said in channel #abc gets into my gtalk conversation with mybot#domain.com
hope I was clear enough for you to understand what I'm looking for and that anyone knows a way for me to solve it.
Thanks!
You can use PircBotX to create an IRC bot in Java yourself, and use pm events to send gtalk messages using any old Jabber library. A quick search finds me Smack.
I did something similar once, but I made two instances of PircBotX, one to connect to the IRC server, and another to connect to this special IRC server somewhere that was configured to automatically pass on messages to popular IM protocols. I can't seem to remember what that service was called, perhaps you'll have better luck.
Well, there's the hans-irc-gtalk bot which does something like that. People need to subscribe to the messages in order to get them from gtalk. Not sure how well supported the project is.
I started looking into node and socket.io.
I already have created a simple chat application and I am amazed at how easy it was.
Now, I would like to take a little bit further and provide a list of online users that have the ability to chat with each other in private.
What would be the best way to approach this?
I read on 0.7's new room feature. Would that be a way to go? Dynamically create a new room each time 2 users need to chat in private? But how the second user is going to be notified of the new room created, so that he can connect there?
Is it better to handle all the above logic myself? Store the rooms and users server side and loop through them each time and send messages to the appropriate ones?
Thanks
If the only functionality you want is for two people to be able to send messages to one another (and not groups of people to have a room), then the logic could be something like this:
When a user connects, store their connection in an object keyed by their username (or in any other data structure that ensures you can find a specific user's connection).
When a Bob wants to talk to Jeff, send the server an event stating such.
The server looks up Jeff's Socket.IO connection in the object from step 1.
The server uses this connection to send Jeff (and only Jeff) the private message.
Hej Thomas
if theres only 2 users talking you dont need use publish att all just send that message from the client to the server and let the server locate the other client and send it down.