#TheZone
Welcome to TheZoneIRC Network | irc://irc.tzirc.com

Irssi AutoCLW (Auto Caps-lock Wednesday) perl script


posted by Dennis
Aug 26, 2010

Downloads: 123
File size: 1.2kB
Views: 889
Irssi AutoCLW (Auto Caps-lock Wednesday) perl script

Ladies and gentlemen,

After attempting to relearn what little bit of perl I used to know and reading through the horrid documentation for irssi scripting, I submit to you, for your approval, AutoCLW.pl.

During Caps-lock Wednesday, this script will automate your nick change on the server to uppercase as well as change any messages sent to #TheZone to uppercase (without having to use the caps-lock or the shift key). When CLW is over, it will return your nick to normal, as well as any text sent to the channel.

Download irssiAutoCLW.zip, extract AutoCLW.pl, and save to your ~/.irssi/scripts/autorun folder (or create them if you don't have them). No special permissions or she-bang (ie: #!/usr/bin/perl) is necessary to get the script running. There are a couple of variables to edit inside the script to get it working on your system, when you open the script you will see them. If you're using this under Windows, the perl script will be garbled due to Linux line endings, open the script in Notepad++ or something that can handle these line endings in order to edit the script variables.

Once the script is added, simply restart irssi or type /script load autorun/AutoCLW.pl

-Dennis

Change log:

Version 0.1 - initial release
Version 0.2 - fixed if statement in upper case name sub routine, altered signal sub call
Version 0.3 - fixed issue with global variable that prevented the script from executing when loaded prior to CLW

Known issues which I plan to fix:

1. If CLW is specified between dates, it won't function properly using the 24 hour time scheme (low priority since there's a set time for CLW)
2. If you run more than one server in irssi, and TheZoneIRC is not focused, AutoCLW might not change your nick (untested, medium priority)
3. I am hooking chat text to check the time, I plan to write a timer subroutine rather than do this, for now this works fine (high priority)

Copyright Right:The:Fuck:Now. #TheZone

Powered by Community Server (Non-Commercial Edition), by Telligent Systems