IRC Info

irc

Server: irc.dab.biz port: 6667 (SSL 6697)

/j #shellmix

Hypeshell.com

New shell server
 
 
The new server is like shellmix, but to register you have to pay 5 Euro. You only pay once. This is the only way to stop idiots and spammers.
Server features :

- Two Intel i7 CPU 2600K

- 16 GB DDR3

- Four HDD SATA3

- Separate Environment between user class

- Many IP

 - And everything looks like shellmix : )

 



Search

Comments Latest

  • Hi getting a "Server unexpectedly closed network c...
  • Great server, but tunnel is not working... :|
  • Looks like whoever installed putty on the computer...
  • Can't log into the ssh server to create a new acco...
  • I would like to help resolve this issue.

Advertising

Advertising

A simple irc bot in ruby 2

Attention: open in a new window. Print
A simple irc bot in ruby
Recently it occurred to my colleagues and me that an IRC bot could benefit our chat room discussions. I looked around a bit and I couldn't find any simple ruby IRC bots to use. However, in my searching, I did find shout-bot. Shout-bot is a simple IRC "shouter" in that it connects, reports a message, and then disconnects. Using this as a starting point, I was able to create a simple bot that stays connected to a room and responds to messages.

This bot isn't very complex and is far from perfect, but it is a good starting point if you want an irc bot that responds to just a few things. You can also find this at its github repository.
#!/usr/bin/env ruby

require 'socket'

class SimpleIrcBot

def initialize(server, port, channel)
@channel = channel
@socket = TCPSocket.open(server, port)
say "NICK IrcBot"
say "USER ircbot 0 * IrcBot"
say "JOIN ##{@channel}"
say_to_chan "#{1.chr}ACTION is here to help#{1.chr}"
end

def say(msg)
puts msg
@socket.puts msg
end

def say_to_chan(msg)
say "PRIVMSG ##{@channel} :#{msg}"
end

def run
until @socket.eof? do
msg = @socket.gets
puts msg

if msg.match(/^PING :(.*)$/)
say "PONG #{$~[1]}"
next
end

if msg.match(/PRIVMSG ##{@channel} :(.*)$/)
content = $~[1]

#put matchers here
if content.match()
say_to_chan('your response')
end
end
end
end

def quit
say "PART ##{@channel} :Daisy, Daisy, give me your answer do"
say 'QUIT'
end
end

bot = SimpleIrcBot.new("irc.freenode.net", 6667, 'ChannelName')

trap("INT"){ bot.quit }

bot.run

Add comment


Security code
Refresh

Advertising 3

Donate

Donate to keep shellmix alive


PayPal


Info BOX

Vote on shellmix !!!!

Free Shell Accounts - the biggest list on the net :-)

Who's Online

We have 1145 guests online

FaceShit info page if server is down 

name=