فهرست منبع

scripts/eggdrop-pisg.tcl

Christoph Berg 22 سال پیش
والد
کامیت
bd4723297f
3فایلهای تغییر یافته به همراه44 افزوده شده و 0 حذف شده
  1. 2 0
      docs/CREDITS
  2. 2 0
      docs/Changelog
  3. 40 0
      scripts/eggdrop-pisg.tcl

+ 2 - 0
docs/CREDITS

@@ -103,6 +103,8 @@ Other contributors:
    | perlbot logfile support
  * Nathan Poznick
    | Ability to specify multiple LogFiles and LogDirs.
+ * HM 2K <nfhm2k@gmail.com>
+   | eggdrop-pisg.tcl for running pisg from eggdrop
 
 I probably forgot a lot of people here, _PLEASE_ notify me if I left you
 out.. because I have a bad habit of forgetting to maintain this list :)

+ 2 - 0
docs/Changelog

@@ -2,6 +2,8 @@ pisg (0.60) - ??
    Changes by Christoph Berg:
    * Clean up loop code in _mostnicks() and fix warning about calls to
    is_ignored(undef).
+   * Added scripts/eggdrop-pisg.tcl for running pisg from eggdrop (Thanks,
+   HM2K).
 
 pisg (0.59) - Sun Oct, 3rd 2004
    Changes by Morten Brix Pedersen:

+ 40 - 0
scripts/eggdrop-pisg.tcl

@@ -0,0 +1,40 @@
+#pisg.tcl v0.15 by HM2K - auto stats script for pisg (perl irc statistics generator)
+#based on a script by Arganan
+set pisgver "0.15"
+
+#Location of pisg execuitable perl script
+set pisgexe "/home/nf/pisg/pisg"
+
+#URL of the generated stats
+set pisgurl "http://stats.nemesisforce.com/"
+
+#channel that the stats are generated for
+set pisgchan "#nemesisforce"
+
+#Users with these flags can operate this function
+set pisgflags "nm"
+
+#How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes
+set pisgtime "30"
+
+bind pub $pisgflags !stats pub:pisgcmd
+
+proc pub:pisgcmd {nick host hand chan arg} {
+	global pisgexe pisgurl pisgchan
+	append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
+	puthelp $out
+}
+
+proc pisgcmd_timer {} {
+	global pisgexe pisgurl pisgchan pisgtime
+	append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
+	puthelp $out
+	timer $pisgtime pisgcmd_timer
+}
+
+if {![info exists {pisgset}]} {
+  set pisgset 1
+  timer 2 pisgcmd_timer
+}
+
+putlog "pisg.tcl $pisgver loaded"