-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tur-undupe.tcl
30 lines (24 loc) · 1.05 KB
/
tur-undupe.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##############################################################################
# Tur-Undupe.tcl 1.0 by Turranius #
# Change !undupe below to whatever you want the trigger the script with. #
# If tur-undupe.sh is not located in /glftpd/bin/, then change the path #
# to 'set binary' below. #
##############################################################################
bind pub - !undupe pub:turundupe
## Msg undupe disabled by default. We want to see it in channel.
# bind msg - !undupe msg:turundupe
proc pub:turundupe {nick uhost handle chan arg} {
set binary {/glftpd/bin/tur-undupe.sh}
set what [lindex $arg 0]
foreach line [split [exec $binary $what] "\n"] {
putquick "PRIVMSG $chan :$line"
}
}
proc msg:turundupe { nick host hand arg } {
set binary {/glftpd/bin/tur-undupe.sh}
set what [lindex $arg 0]
foreach line [split [exec $binary $what] "\n"] {
putquick "PRIVMSG $nick :$line"
}
}
putlog "Tur-Undupe.tcl 1.0 by Turranius loaded"