SOURCES: t0xirc.php (NEW) - cli interface

glen glen at pld-linux.org
Fri Mar 31 23:40:19 CEST 2006


Author: glen                         Date: Fri Mar 31 21:40:19 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- cli interface

---- Files affected:
SOURCES:
   t0xirc.php (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/t0xirc.php
diff -u /dev/null SOURCES/t0xirc.php:1.1
--- /dev/null	Fri Mar 31 23:40:19 2006
+++ SOURCES/t0xirc.php	Fri Mar 31 23:40:14 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/php
+<?
+/*
+ nagiosalert.php 2006 Mikael Fridh <mikael.fridh at ongame.com>
+ Telnets to an eggdrop and .say's messages to a channel
+ modified and cleaned up by Elan RuusamĂe <glen at pld-linux.org>
+*/
+
+error_reporting(E_ALL & ~E_NOTICE);
+require "/usr/share/php/t0xirc.php";
+
+$opt = getopt("u:p:h:P:c:m:");
+
+$mybot =& new t0xirc_bot($opt['u'], $opt['p'], $opt['h'], $opt['P']);
+$mybot->connect() or die("Unable to connect\n");
+$mybot->say($opt['m'], $opt['c']);
+
+printf("Connected to %s default chan %s.\n", $mybot->bot_nick, $mybot->channel['name']);
+
+$mybot->disconnect();
+
+?>
================================================================


More information about the pld-cvs-commit mailing list