Some days ago I started to code an IRC bot like eggdrop for the antispam
society I am part in.
If you do not know about IRC or eggdrop you can stop here, otherwise I
would be happy if you read further on and tell me your opinions.
So… first of all, why Ruby?
I coded several websites in php and want something new, that’s all.
Some friends told me I should give Ruby a try and after reading some
tutorials it gets me because it’s very natural and easy to understand.
Eggdrop is a really great bot with many features and is the choice if
you want to operate with a botnet. However, after included many own
scripts to support regexp/realname bans and many many other features
there are some things we don’t like. Sometimes it’s tcl itself,
sometimes the way how eggdrop acts, sometimes settings which are
hardcoded in eggdrop (e.g. logging, namesx) which are not easily to
change or impossible.
Eggdrop is not really under active development and so I got the idea to
code something new myself.
Ruby is really great, after some days I got the basics finished but the
first time I struggled with Ruby was at the time I tried to implement
the userdatase and banlists.
If you want to match strings against each other and want to use
wildcards you need to use regexp. “Basic use” of ? and * are not
supported and you need to create a workaround. (my prior question to
this: How to convert a "normal" searchstring into regexp - Ruby - Ruby-Forum )
The bad side is that IRC sets bans in this form and not in regexp, also
a normal user would set its userhost as mynick!myident@.some.thing and
wouldn’t use regexp, either.
So you would need to push all those bans, invites, exempts, userhosts
and so on through this workaround and back and I don’t think that this
is a good deal.
After I took a short break to do some other work I opened my scripts
again and looked at this workaround and now I’m not really sure anymore
if Ruby is the best choice to code such a bot.
Thanks for reading - it’s not like the normal posts in here, not a
technical question nor a script request
I would like to know your opinions about this because I’m really new to
Ruby and maybe I will run into more problems which I didn’t see yet.
Is it possible to code such a bot(net) by using Ruby? (sure, but I don’t
… or maybe a better question:
Would you advise it?