irc

Regular expression to match IRC nickname

人走茶凉 提交于 2019-12-04 13:45:34
问题 How would I use a regular expression to match an IRC nickname? This is being done in Ruby if that makes a difference (it probably will, with the syntax of the regex, but who knows.) EDIT: An IRC nickname can contain any letter, number, or any of the following characters: < - [ ] \ ^ { } 回答1: # If you are testing a single string irc_nick_re = /\A[a-z_\-\[\]\\^{}|`][a-z0-9_\-\[\]\\^{}|`]*\z/i # If you are scanning them out of a larger string irc_nick_re = /(?<=[^a-z_\-\[\]\\^{}|`])[a-z_\-\[\]\\

IRC Bot: Error - Registration Timeout

痴心易碎 提交于 2019-12-04 09:13:00
I'm making a simple IRC Bot in C. And I finally got the bot connecting and receiving information. My code is supposed to be sending as well, but the server is acting as if it is not sending anything. When The bot connects, I receive this: Recieved: :roc.esper.net NOTICE AUTH :*** Looking up your hostname... Recieved: :roc.esper.net NOTICE AUTH :*** Found your hostname at which point my code sends this: Sent: NICK Goo Sent: USER Goo * * :Goo I determined from using wireshark that this is the registration you should send after the initial connect. However, I'm not sure the data is actually

IRC channel for iPhone developers? [closed]

泪湿孤枕 提交于 2019-12-04 08:55:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I was wondering if there is a good IRC channel around somewhere that allows iPhone developers to get together and talk about code and etc. Any channel already around that people are using? 回答1: It's #iphonedev on irc.freenode.net. Without the dash. There's also #cocoa-init. It's a new channel focused on asking

My Ruby IRC bot doesn't connect to the IRC server. What am I doing wrong?

筅森魡賤 提交于 2019-12-04 08:40:31
require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC Bot" channel = "#0x40" s = TCPSocket.open(server, port) s.print("USER Testing", 0) s.print("NICK #{nick}", 0) s.print("JOIN #{channel}", 0) This IRC bot doesn't connect to the IRC server, What am I doing wrong? greg It failed with this message: :irc.shakeababy.net 461 * USER :Not enough parameters so change your code. For example, this one works: require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC Bot" channel = "#0x40" s = TCPSocket.open(server, port) print("addr: ", s.addr.join(":"), "\n") print(

Programming a simple IRC (Internet-Relay-Chat) Client

好久不见. 提交于 2019-12-04 07:35:17
问题 I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with Shoes as a graphical front-end. My question to you, kind-sirs, what do I need to become familiar with to start on this great adventure (besides shoes and Ruby of course)? I imagine there is some-sort of specification on IRC Protocol. Any pointers? 回答1: An earlier post mentioned RFC1459. While it is a very good introduction to

Best tutorial for application multicasting? [closed]

大城市里の小女人 提交于 2019-12-04 07:09:42
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I've recently become aware that there's a distinction between IP multicasting (which apparently doesn't work that well on the public internet) and application multicasting (which is apparently used in IRC and PSYC, per http://en.wikipedia.org/wiki/Multicast ). Is there a good tutorial on implementing application-level multicasting? I thought the whole point of multicast was to reduce bandwidth for

Building an IRC bot in Java

一曲冷凌霜 提交于 2019-12-04 05:04:04
After some googling an obvious answer or starting point for a Java IRC bot has not presented itself, my question; is there an existing framework to help me do build an IRC bot? Failing that, is this possible using Sockets in Java to do this and has anyone seen an example around the web? cheers guys. Ondra Žižka SilverTrout has many, but simple plugins . Similar approach as PircBot, only pluggable. IRClib IRC-API - Mavenized . I haven't tried. Seems to be quite well designed. Documentation and javadocs can be found on the main page. ThimBot by David Lloyd, JBoss. PircBot is the most famous and

Upgrading socket to SSLSocket with STARTTLS: recv failed

一个人想着一个人 提交于 2019-12-03 17:06:26
I am trying to upgrade a socket to an SSLSocket using STARTTLS. On InspIRCd's wiki this is how its supposed to work >> STARTTLS << :test2.chatspike.net 670 nickname :STARTTLS successful, go ahead with TLS handshake (SSL Handshake) So in my code I've written (slightly simplified) else if (code.equals("670")) { SSLSocketFactory sslSocketFactory = ((SSLSocketFactory) SSLSocketFactory.getDefault()); SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket( socket, socket.getInetAddress().getHostAddress(), socket.getPort(), true); sslSocket.startHandshake(); bufferedReader = new

Node.js JavaScript: Simulate Keypress on Server (Like a Macro)

北城余情 提交于 2019-12-03 16:38:34
I am trying to get a node.js script to simulate a keypress, such as the up arrow or the a button. Specifically, I am trying to make a clone of Twitch Plays Pokemon . Basically, whenever a command (up, down, left, right, a, b, select, start) is sent via IRC, the server simulates a keypress, which in turn controls a gameboy emulator. So far, I have written this with the IRC module for node.js: var config = { channels: ["#tron"], server: "irc.freenode.net", botName: "wyatt" }; var irc = require("irc"); var bot = new irc.Client(config.server, config.botName, { channels: config.channels }); var

Python, recreate a socket and automatically reconnect

巧了我就是萌 提交于 2019-12-03 14:30:50
I'm writing a IRC bot in Python. Source: http://pastebin.com/gBrzMFmA ( sorry for pastebin, i don't know how to efficently/correctly use the code tagthing on here ) When the "irc" socket dies, is there anyway I could go about detecting if its dead and then automatically reconnecting? I was googling for awhile now and found that I would have to create a new socket. I was trying and added stuff like catching socket.error in the while True: but it seems to just hang and not reconnect correctly.. Thanks for help in advance DharmaTurtle Answered here: Python : Check if IRC connection is lost (PING