-   Programming (
-   -   X-Chat script to enter a command every minute (

eam 08-30-2004 12:59 AM

X-Chat script to enter a command every minute
Does anyone have a script for X-Chat that will enter a command at set times (I need once a minute right now)?

DanTheKiwi 08-30-2004 01:23 AM

You could probably write one even if you don't know perl! Look at thier scripting documentation, it won't be hard at all to do.

eam 08-30-2004 04:25 AM

Ok, I started something, but I ran into some trouble. Using while (1) in my script killed X-Chat (not surprisingly)... what else could I do to make it keep checking if it's been a minute?

Here's what I have so far, I think the time part works but haven't been able to test it.


#!/usr/bin/perl -w

IRC::register("EveryMin", "1.0", "", "");

while (1) {
($sec, $min, $hour, $monthday, $month, $year, $weekday, $yearday, $isdaylight) = localtime(time);
if ($sec == 1) {
IRC::send_raw("whois smb3master\r\n");

All times are GMT -5. The time now is 01:11 AM.