BiggieStylin // The way Eric Gach does blogging.

Archive for the ‘SimpleIRC’ Category

Just an update.

Hey all. I just thought I’d take a few minutes to write a post. I know, it’s been a while again, but I’ve been pretty busy as of lately. I’m currently reading a new book, working on php-oop.net and working full time. This week I’ve also come down with a bad cold. Yesterday before getting off work I started to feel pretty crappy, so I went and layed down after work. Wound up falling asleep around 7 last night and didn’t make it back out of bed until 8:30 this morning. So far it’s just a head cold, but my whole body aches and I’ve got a slight fever. Nothing I can’t deal with though.. start popping the cold pills and I’ll be ok. Right now I just feel groggy because my whole head is clogged up.

On the programming side of things, I have been working on php-oop.net. Not much has been done recently, except I got my friend kuja to help me out with a new design. I don’t have it active on the dev site yet, but I plan on doing so as soon as we iorn out a few things with the design. Just take note that the dev site might not always work as it’s updated from SVN and could break. However, it’s given me new motivation to actually want to work on the backend of the site now. Currently, there’s only some basic user stuff implemented, which leaves a lot to be desired. At least it shows a base system that’s somewhat functional. The SiTech backend that runs the site also needs work too, so I’m sort of maintaining both projects at once.

As far as progress with SimpleIRC, I haven’t really touched it in a couple weeks. I’ve kept myself busy with other things. I really need to get back to SimpleIRC though as everyday miniE is showing more and more issues that I don’t want to take the time to fix since I am writing a new bot. Things with my new server are going smoothly. I’ve since setup a lot of new stuff like SSL, virtual e-mail addresses, and a Call of Duty game server. I admit, I don’t have a lot of time to play Call of Duty, but that’s my own fault. It’s at least nice to have a server up and running.

Well, that’s all for now. I’ll update later this week (or weekend) when I’m feeling better.

Tags: , ,

wxWidgets and Python

So recently I’ve been playing with wxWidgets and Python. I’ve enjoyed it so far, but I’ve found one problem that I haven’t really found a good solution for. When creating a window in Windows, the default background seems to be a rather dark gray. My theme for Windows is the windows classic, which shows all windows as a light grey color. The menu bar and the status bar of the application are the light grey desired, but the background of the application itself and any text label widgets I create are all dark gray. It makes no sense to me.

The solution I’ve found so far is to set the main window background to the color of the menubar background. This seems to make everything conform to the default light gray. Here’s the code from my custom wx.Frame class:

self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENUBAR))
self.SetBackgroundStyle(wx.BG_STYLE_COLOUR)

This sets the frame’s background to the correct expected color. I’m not sure if this is the way I should be going about things since I’m new to wxWidgets, so if anyone has any suggestions for me, please let me know! I’ll post an update later this week when I get further along with my client. Right now I’ve taken a break from the SimpleIRC bot part of things and am creating a GUI interface for a client. Until next time!

Tags: , ,

SimpleIRC Updates

Well, it’s been a little while since I’ve written about SimpleIRC, so it’s time for an update. I’ve been getting a lot of work done on it during my spare time (which isn’t much). I’ve fixed quite a few bugs in the main Core module and the Client code. I’ve also added some functionality pretty much everywhere, including some new modules. I still don’t know when I’ll have an offical release ready, but it’s looking promising that it will be soon!

First major change I’ve made is moving all of the modules off the MySQLdb module and into using SQLAlchemy, which offers a vast variety of methods to interact with the database, as well as support for multiple database backends. The main feature I like about it is the fact that it enables you to create an object for each table and row in the database. It makes dealing with things a lot easier. I also redesigned the database to better support changes made and to add better functionality.

So far, I’ve got the following modules completely built and working;

  • Eval
  • Factoids
  • Lart
  • Seen
  • Weather

The Core module is build, but not all the features are there yet. I’m also still working on how the handler methods work for commands, because I’d like to find a way to allow command access levels to be changed on the fly using the database, but still be specified if there is no record in the database. I’m also planning on adding functionality for users to enter their e-mail address for validation and password retreval purposes. I still have to work on the other modules annouced, but it’s coming along very nicely so far.

I still have some bugs left to squash, and plenty of functionality in the client itself to implement, so if anyone would like to help as a tester or developer, please let me know. I’ll update again soon as I get more accomplished and have more to talk about!

Tags: ,

SimpleIRC Update

SimpleIRC works! I’ve gotten the bot connecting to IRC and responding to commands. I’ve rewritten how the commands are handled and where they are stored. Previously, all commands, help text, usage, and access levels were stored in the module itself. I’ve made this to be more user friendly now by moving all of that to the database. I still need to do a little work on commands, but they are working! With all of that working, I can now start developing all the features of the bot. In case some of you missed it, or I forgot something, I’ll list all planned modules and features.

The bot will contain core features of account management (register, login, set access level, change password), channel management (join, part) as well as commands to show basic statistics about the bot, commands, and the system it’s running on. The stats will also extend to include an API for modules. This will enable each module to add a stats method that can be called by a specified command to the stats command.

Another module I’m adding to the bot is a Google search module. I will be rewriting this from the previous version which uses SOAP to use the new AJAX interface. The reason behind this is that Google is no longer releasing API keys required for SOAP. I’m not sure what effect this will have on the search module, but I’m hoping none.

I’ve also planned on adding a factoids module that will work similar to the one in the previous version. The new addition to this new version is that when using the bots nickname to trigger a factoid, it will also translate to perform commands if no factoid exists for that trigger. That means that saying “miniE: help” will trigger the help command if no factoid for “help” exists.

Those are the major changes I have planned so far. The following are other modules planned on being included.

  • Bartender - This is a fun module that will serve up mixed drinks, shots, or just beer on command.
  • Eval - A module to enable code evaluation. So far only PHP is planned to be supported, but I’d like to extend on that later.
  • Lart - Want to hurt someone? Lash out at them with larts!
  • Function Reference - Lookup a funcref for PHP4, PHP5, HTML, CSS1, CSS2, DOM1 and DOM2. Future plans to support other languages as well.
  • Weather Lookup - Find the current temperature for your area!
  • Temperature Conversion - Convert from F to C, C to F, F to K, C to K, K to F, or K to C
  • Spell Check - Triggered by command or by adding (sp?) after a word to verify the spelling.
  • Karma - Adds karma to users accounts. If no account is found for the user, karma is kept for the unknown user.
  • Seen - Keep track of when the last time someone was on the channel and when they left.
  • Validator - Validate your HTML and CSS documents right through IRC

That concludes the current list I have. If anyone else has any ideas for new modules or reccomendations of items to add to my current list, please let me know! I’m always open to any contribution.

Update: Sept. 30, 2007
I’ve also got trac running for the SimpleIRC project. If you would like to view it, please visit http://trac.php-oop.net/SimpleIRC/

SimpleIRC Progress

As some of you know, I’ve been working on a rewrite of SimpleIRC. SimpleIRC is a framework of sorts for IRC client connections. The core of it is finished and can be used, but I’m also working on a bot for it that will replace the current code used for my bot on irc.freenode.net, miniE. I also plan on extending work to include actual clients that include curses, gtk, qt3 and qt4.

Right now I’ve had some success in getting the bot to connect and respond to commands. All I need to get done at this point is to finalize command handling and access levels, then I can continue to develop any modules needed. I’ll probably bring the new code online as miniE once I get some of the neccisary commands that some of the channels he is in require. One module that I will complete before bringing the new code online is the factoids module. I will change some of the factoids functionality by enabling commands to be called throught he factoids module if no factoid exists under the specified text. This will enable people to start “talking to” the bot.

I’m also looking for reccomendations of new modules to add to miniE. I’m alread planning on supporting the current list (join #php-oop on freenode and use the command `help to see all commands) and a few new ones already planned. One of them is a bartender module, another will be a current weather lookup by area code. So if any of you have any suggestions, just leave them here or e-mail me and I’ll take it into consideration!