Giuseppe Bilotta [Tue, 24 Jun 2008 15:27:30 +0000 (17:27 +0200)]
message handling: improve IRC format handling for received messages
Rather than stripping colors all around and keeping other format codes,
we only strip initial and final formatting before parsing the message.
We store the original, unstripped message in #logmessage() and a
fully stripped copy of the message in #plainmessage()
This means that most plugins will now have full formatting of arguments
preserved, while stupid IRC usage of formatting whole lines will not
interfere with bot usage. Plugins that need a fully stripped version of
the message can still access it.
Giuseppe Bilotta [Tue, 24 Jun 2008 13:30:54 +0000 (15:30 +0200)]
ircsocket.rb: use syswrite since ruby's buffered io is racy
In some situations a PRIVMSG could be output twice in sequence with no
intervening newline when using the Socket#puts function. Use syswrite to
skip Ruby's buffered IO.
Yaohan Chen [Tue, 24 Jun 2008 03:29:51 +0000 (23:29 -0400)]
fake_message duplicates m.reply and m.in_thread from the :from message
this makes it possible to create a fake message, override its reply method in order
to get its "return value", even if the fake message will be handled by creating
another fake message.
Yaohan Chen [Mon, 23 Jun 2008 23:30:29 +0000 (19:30 -0400)]
fake messages will use the originating message's reply method
this allows shell plugin to capture replies of a command even if this command is
run because of a fake message
Casey Link [Mon, 23 Jun 2008 22:00:08 +0000 (18:00 -0400)]
dict.rb plugin: fixes the oxford parser so it doesn't spit out a bunch of extra crap
before:
[13:45:29] <insanity> fruitful: adjective 1 producing much fruit; fertile. 2 producing good results; productive. DERIVATIVES fruitfully adverb fruitfulness noun.
Perform another search of the Compact Oxford English Dictionary About this dictionary The Compact Oxford English Dictionary of Current English contains 145,000 words,
phrases, and definitions. Find out more about Oxford's range of English dictionaries Sign up for the AskOxford Word of...
after:
[13:58:36] <VanGogh> fruitful: adjective 1 producing much fruit; fertile. 2 producing good results; productive. DERIVATIVES fruitfully adverb fruitfulness noun.
Giuseppe Bilotta [Mon, 23 Jun 2008 16:00:42 +0000 (18:00 +0200)]
rfc2812.rb: skip unknown channel modes altogether
Some servers set non-advertized channel modes. Since we
cannot handle them (as we don't know what type they are)
and setting them crashes the bot, we remove them.
Yaohan Chen [Fri, 20 Jun 2008 20:36:00 +0000 (16:36 -0400)]
move bin/msgmerge-wrapper.rb to top level, as it is not intended for installation
path/command for the msgmerge-wrapper can be adjusted with env var, if
"ruby msgmerge-wrapper.rb" doesn't work on the platform
Giuseppe Bilotta [Fri, 20 Jun 2008 09:56:45 +0000 (11:56 +0200)]
ircbot.rb: ensure that the logger is flushed
If the bot fails to load (e.g. because of missing dependency) the user
might miss the last error messages because the logger thread wouldn't
reach completion. Ensure its closure in an END block.
Yaohan Chen [Sat, 7 Jun 2008 18:30:33 +0000 (14:30 -0400)]
recommit 33c336af346dc08b4f4f4951dd6eae7150cef481 po file per plugin
each plugin uses its own po file, no change required for plugin source, Rakefile,
plugin loader and gettext loader are modified to adjust to the change
Yaohan Chen [Fri, 6 Jun 2008 02:20:18 +0000 (22:20 -0400)]
each plugin uses its own po file
no modification in plugin source is needed, plugin loader is modified to automatically
bind to the plugin's text domain
updatepo task is modified to maintain per-plugin po file
po files are updated and cleaned
Yaohan Chen [Wed, 28 May 2008 17:03:00 +0000 (13:03 -0400)]
changed m.thread to m.in_thread, with different semantics
m.in_thread indicates that the caller of delegate is in thread (and is handled by
not creating another thread for m's mapped action)