Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

x-chat script from cato

allo3c038727a427
diff --git a/addon/yacy-xchat-plugin.py b/addon/yacy-xchat-plugin.py
new file mode 100644
index 000000000..72a11d6ec
--- /dev/null
+++ b/addon/yacy-xchat-plugin.py
@@ -0,0 +1,18 @@
+import xchat
+import urllib
+import re
+import string
+
+__module_name__ = "yacy"
+__module_version__ = "0.1"
+__module_description__ = "Shows yacys current PPM"
+
+user = "admin"
+password = "password"
+host = "localhost:8080"
+def yacy_ppm(word, word_eol, userdata):
+ for line in urllib.urlopen("http://"+user+":"+password+"@"+host+"/xml/status_p.xml").readlines():
+ if re.compile("<ppm>").search(line):
+ xchat.command("me 's YaCy is crawling at "+line.strip().strip("<ppm/>")+" pages per minute.")
+
+xchat.hook_command("YACY_SHOW",yacy_ppm,help="/yacy_show - shows the current ppm")