Hi everyone,
People who are frequently on IRC probably tried to create their own IRC bot. There are several ways to do so, like modifying a PHP, Perl or Python script. However, the downsides (for especially new coders) of these ways are it's relatively difficult to understand the language and using code you don't understand.
To allow these new coders to experiment with IRC bots I started [I]Simple IRC bot[/I], which runs the scripts and handles all IRC related stuff. The application works with [I]PascalScript[/I] for the script engine, which is easy to understand and work with (although advanced coders may find the syntax a bit strange).
Because this project is still in alpha/beta status, there aren't many functions yet. However, I'm working hard on adding new events/functions/features. But it's already possible to make your first IRC bot. Also, Linux and Mac OS X binaries are planned when the Windows build is stable.
More info and a download can be found at [URL]http://sircbot.limetric.com/[/URL] .
Feel free to join our IRC channel if you're in need of help ( irc.gtanet.com #sircbot ).
I like this effort of helping other programmers with IRC related code.
I guess I can help by linking to some example code as well. I wrote up an IRC networking library in C# quite a while ago, and it's been sitting around.
You can find the source here: [url]http://code.assembla.com/HeronIRC/subversion/nodes/HeronIRC[/url]
Currently the project is maintained by myself and AzuiSleet.
[QUOTE=VoiDeD;20218424]I like this effort of helping other programmers with IRC related code.
I guess I can help by linking to some example code as well. I wrote up an IRC networking library in C# quite a while ago, and it's been sitting around.
You can find the source here: [url]http://code.assembla.com/HeronIRC/subversion/nodes/HeronIRC[/url]
Currently the project is maintained by myself and AzuiSleet.[/QUOTE]
Blimey, Voided, a gift from heaven, just what I needed!
Can't wait to try this out!
However, I couldn't find anything regarding licensing, could you please provide us/me more information regarding this?
[QUOTE=Shammah;20218854]Blimey, Voided, a gift from heaven, just what I needed!
Can't wait to try this out!
However, I couldn't find anything regarding licensing, could you please provide us/me more information regarding this?[/QUOTE]
Absolutely no license whatsoever. Feel free to do whatever you like with it.
Made my own IRC bot in PHP a while ago, was quite a hassle. I see how both your library/framework could be useful for starters. Good job!
The problem with HeronIRC and turb_ his code is that new coders won't understand it. I mean, there are enough PHP/Perl/Python bots like I said before. But I wasn't able to find a good working IRC bot application for new coders. So I made my own. :)
Lua:
[url]http://upl.luahelp.com/uploads/iOjdPqD8/irc.rar[/url]
Example:
[lua]
local irc = require "irc"
local channel = "#example"
local s = irc.new{ nick = "LuaBot" } --optional username, realname
s:hook("OnConnect", function()
s:join(channel)
end)
s:hook("OnJoin", function(user, channel)
print(("%s!%s@%s joined %s"):format(user.nick, user.username, user.host, channel))
end)
s:hook("OnPart", function(user, channel)
print(("%s!%s@%s left %s"):format(user.nick, user.username, user.host, channel))
end)
s:hook("OnChat", function(user, channel, message)
print(("[%s] %s: %s"):format(channel, user.nick, message))
end)
assert(s:connect("irc.gamesurge.net")) --default port is 6667
while true do
irc.think() --does not block, so you can do other stuff in the main loop
end[/lua]
I have the equivalent in D, Ruby and Go, too, if anyone is interested.
[QUOTE=blankthemuffin;20228779][code]
def parse(self, msg):
prefix, trailing = '', None
if msg[0] == ':':
prefix, msg = msg[1:].split(' ', 1)
if msg.find(' :') != -1:
msg, trailing = msg.split(' :', 1)
args = msg.split()
args.append(trailing)
return prefix, args.pop(0), args
[/code]
The superior IRC Parser.[/QUOTE]
Shouldn't you initialize prefix to None, too?
The empty string is a horrible default value.
Hey, I'm actually having fun helping Ywa with testing the bot/pascalscript-ing etc :P :P
I think there was some reason I didn't, looking at it now probably because of old code.
I made this simple IRC bot a while ago for practice in Ruby.
[url]http://github.com/tjlevine/Ruby-Bot-for-IRC[/url]
In case someone cares. Released 0.1.0.3 and 0.1.0.4 a few days ago. Change-log can be found here: [url]http://sircbot.limetric.com/wiki/index.php/Change-log_%28Development%29[/url]
Also working on a file-system to read and write plain text & INI files.
Sorry, you need to Log In to post a reply to this thread.