Just a quick tip on how to make your bot do an ACTION, the equivalent to /me as you might do.
There’s a control character (ascii 1) that needs to wrap your text, and the ACTION keyword added in your message.

in your “ziggi” (plugin)

//normal
$this->pm("This is a normal message");
//action
$this->pm( chr(1)."ACTION enjoys messages".chr(1) );

I intend to add a convenience method in the base ziggi, but that usually takes along time to get checked in.

I was contacted by a user today about botzilla’s inability to connect to irc.quakenet.org, and i was able to confirm.

It looks as though the server PINGs straight away, and botzilla ignores it expecting to see then end of MOTD first.

A quick would be to copy the lines that handle PINGs (in the listen method) up to the connect method just above where it looks for the MOTD.

I’ll commit this to the github repo as soon as I figure out which of my dozen copies is the proper repo. lol.

Not the project estimation tool, but no limit texas hold’em over IRC as a plugin for botzilla. It’s not ready yet, but I continue to work on it here and there as a side project. It’s been a long while since I’ve posted anything — just wanted to mention what could be coming out next.

Jun

29

I added a Color utility class to botzilla’s cls/ dir on github just now, and updated the botzilla.class to include it. This means that any plugin can use it. It’s an overloaded php5 class, so you’d have to convert it yourself to work with anything under if you still are. But I’m on 5.2.4 , so I couldn’t use __callStatic like I really wanted to. If you have that, go ahead and use it, I say.

Methods are color names from it’s internal colors array. Arguments are the text you want to color, and a background color if you want one.

There’s no spec for colors on IRC, so implementations vary. I noticed that pidgin’s colors are different than mIRC’s (from docs), and that some colors didn’t work for foreground while others didn’t work for background.

Oh well, play with it and find what works for you.

Checking changes in to github is fast and easy, and I hope to get involved with more people on other projects using git VC (as the challenge for me is going to be keeping track on what changes to pull).

This public source control makes publishing a no-brainer convenience method in the ziggi class easy.

The git diff is here.

So more more having to substr on your own,  you can have ziggi do it for you (and we like that). Only the CMD_CHAR looked for, and returns the word without that char. Or null if nothing.

Friend and (private work instance) plugin contributor John Obelenus pushed me into setting botzilla onto github tonight, after hearing about the mess that I made of my source control between botzilla versions 0.2 and 0.3 .

I made two repos,  the basic botzilla core with operator and register plugins, and another for plugins to go in the ziggi directory.

I’m still planning on tarring up another real “release”, once a few minor issues are worked out — but now you know that you can get the latest changes from github at anytime. I promise I’ll do whatever I can not to break stuff.

This blog will act as my changelog, but feel free to report any support issues to the github pages and I’ll see what I can do. botzilla’s official bug list is managed by a plugin ;)

On the list of things to do next are a small reworking of the operator reload method from Saturday, to do regex replacements instead of str_replace  ( KDE4000 had an issue there ).

CYA on github!

alarm.class.php had recently surpassed sweetass for the most downloaded plugin on this site. Noting that, I figured I’d do the right thing and fix it!  The bug had to do with same-day alarms after a restart; they would queue up in the past and never fire. One way around that (that you’ll see in the demo config) is the use of the nextAmong method, where you can queue up the appropriate time.

‘time’=> nextAmong( array(

strtotime( ‘today 11:30am’ ),

strtotime( ‘tomorrow 11:30am’ )

))

Using the recalc callback of ‘tomorrow’, these alarms should always be right. If you have irregular times (like my example of burritos every Monday and Friday), you can assign the time-strings to an array and reuse it as in the plugin code.

I didn’t add a way to add or remove alarms because of the new reload method added to the operator class. I did however add some functions that you can interface with. Alarm handles now have names, and they can be listed with the command .getAlarms . You can also get the seconds until the alarm fires by giving it as an argument to the .timetil command.

.timetil burrito

For debugging and sanity checking, I also left a public strtotime method.

I prepared a small proof of concept for how code swapping could be handled in the next release of botzilla. When I say “swapping”, I really mean making changes to a module class file and reloading it, or simply loading a brand new file, without restarting the bot. load() and reload() methods would probably be added to the operator class.

The foundation is that your class name is essentially meaningless. So your class file is fetched and its constructor given a unique generated name, written to a temporary place, and included.  Once instatiated, it takes the place of the current class in botzilla’s internal plugins array. The old class is still hanging around, but without instances. This would reset any internal data the instance had collected for itself.

This would not work particularly well for modules that contain more than one class file, so I recommend that you keep one class per file, and require_once them as needed (using explicit paths instead of relative ones).

I think I’ll get started for real after a smoke and another pot of coffee.

UPDATE

It was fairly easy to apply! Add this method to your operator class, and you’re all set!

Reload ( or load a few file) by calling it by its original class name.

.reload test

.reload alarm

It was a long time coming for this very simple plugin that reads messages from a directory — allowing  scripts and various automated processes to finally have their say in the channels. The plugin couldn’t be simpler: every so often (you decide), a directory is scanned for files, and if a file exists, it messages that content to that name.

botzilla/sayit/#botzilla

botzilla/sayit/bbby

For another look, I’ve also written a perl script demo’ing a possible human interface — but really it’s all about the robots.

The sayIt module was added to the botzilla repos today

It looks like my earlier statements about having fixed timed events were incorrect. There were some flukey things that sometimes made them work, but not cosistently. If your plugin used the BZ_ANYONE permission, or appeared first in the plugin list, then they appeared to be ok.

I’ve reworked the main botzilla class’s process method, and two ziggi class methods to once and for all allow timed events to work as laid out a few posts ago. Please note that the isEmpty method is one of those methods, making the example code in that post no longer relevant.

Please see and apply those changes found here.

This weekend, I’ll try to package a new release featuring these changes.