From: Brion Vibber Date: Tue, 16 Aug 2005 23:57:53 +0000 (+0000) Subject: * (bug 3134) Remove obsolete IRC scripts from distribution X-Git-Tag: 1.6.0~1925 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=26a14d35d7875b72fb8829f398f05329806f0f3a;p=lhc%2Fweb%2Fwiklou.git * (bug 3134) Remove obsolete IRC scripts from distribution --- diff --git a/irc/.htaccess b/irc/.htaccess deleted file mode 100644 index 3a42882788..0000000000 --- a/irc/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/irc/mxircecho.py b/irc/mxircecho.py deleted file mode 100755 index b8b38332bb..0000000000 --- a/irc/mxircecho.py +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env python -# -# usage: mxircecho.py nickname server -import sys -sys.path.append('/home/kate/pylib/lib/python2.2/site-packages') - -from ircbot import SingleServerIRCBot -import threading - -class EchoReader(threading.Thread): - def __init__(self, bot): - threading.Thread.__init__(self) - self.abot = bot - - def run(self): - while True: - try: - s = raw_input() - sp = s.split("\t") - if len(sp) == 2: - channel = sp[0] - text = sp[1] - - if channel not in bot.chans: - bot.chans.append(channel) - bot.connection.join(channel) - - - # this throws an exception if not connected. - bot.connection.privmsg(channel, text) - except EOFError: - # Once the input is finished, the bot should exit - break - except: - pass - -class EchoBot(SingleServerIRCBot): - def __init__(self, chans, nickname, server): - print "*** Connecting to IRC server %s..." % server - SingleServerIRCBot.__init__(self, [(server, 6667)], nickname, "IRC echo bot") - self.chans = chans - - def on_nicknameinuse(self, c, e): - c.nick(c.get_nickname() + "_") - - def on_welcome(self, c, e): - print "*** Connected" - for chan in self.chans: - c.join(chan) - -bot = EchoBot([], sys.argv[1], sys.argv[2]); -sthr = EchoReader(bot) -sthr.start() -bot.start() diff --git a/irc/rcdumper.php b/irc/rcdumper.php deleted file mode 100644 index 32f46d7af2..0000000000 --- a/irc/rcdumper.php +++ /dev/null @@ -1,122 +0,0 @@ -query( "SELECT rc_timestamp FROM $recentchanges ORDER BY rc_timestamp DESC LIMIT 1" ); -$row = $dbr->fetchObject( $res ); -$oldTimestamp = $row->rc_timestamp; -$serverCount = 0; - -while (1) { - $res = $dbr->query( "SELECT * FROM $recentchanges WHERE rc_timestamp>'$oldTimestamp' ORDER BY rc_timestamp" ); - $rowIndex = 0; - while ( $row = $dbr->fetchObject( $res ) ) { - if ( ++$serverCount % 20 == 0 ) { - print "/server $ircServer\n"; - } - $ns = $wgLang->getNsText( $row->rc_namespace ) ; - if ( $ns ) { - $title = "$ns:{$row->rc_title}"; - } else { - $title = $row->rc_title; - } - /*if ( strlen( $row->rc_comment ) > 50 ) { - $comment = substr( $row->rc_comment, 0, 50 ); - } else {*/ - $comment = $row->rc_comment; -// } - $bad = array("\n", "\r"); - $empty = array("", ""); - $comment = str_replace($bad, $empty, $comment); - $title = str_replace($bad, $empty, $title); - $a = $title[0]; - if ($a < 'A' || $a > 'Z') - $a = 'Z'; - #if ((isset($highest)) && (($what == "<" && $a > "$highest") || ($what == ">" && $a <= "$highest"))) - if ((isset($highest) && ($a > $highest)) || (isset($lowest) && $a <= $lowest)) - continue; - $user = str_replace($bad, $empty, $row->rc_user_text); - $lastid = intval($row->rc_last_oldid); - $flag = ($row->rc_minor ? "M" : "") . ($row->rc_new ? "N" : ""); - $stupid_urlencode = array("%2F", "%3A"); - $haha_take_that = array("/", ":"); - if ( $row->rc_new ) { - $url = $newPageURLFirstPart . urlencode($title); - } else { - $url = $URLFirstPart . urlencode($title) . - "&diff=0&oldid=$lastid"; - } - $url = str_replace($stupid_urlencode, $haha_take_that, $url); - $title = str_replace("_", " ", $title); - # see http://www.irssi.org/?page=docs&doc=formats for some colour codes. prefix is \003, - # no colour (\003) switches back to the term default - $comment = preg_replace("/\/\* (.*) \*\/(.*)/", "\00315\$1\003 - \00310\$2\003", $comment); - $fullString = "\00314[[\00307$title\00314]]\0034 $flag\00310 " . - "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 \00310$comment\003\n"; - if ( $channel ) { - $fullString = "$channel\t$fullString"; - } - - print( $fullString ); - $oldTimestamp = $row->rc_timestamp; - sleep(2); - } - sleep(5); -} - -exit(); - -?>