hi everybody
i have a little problem, i want a simple tcl that write a message from a notice of a particular user with particular host.
example:
/notice mybot TEST1
on irc:
<mybot> TEST1
thanks in advance to all
Code: Select all
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# output channels
set output_chans {#channel1 #channel2}
# user host:
# *user@*.host.com,
# user@some.host.com
# user@some.*.com
# *@some.host.com
set user_host "user@some.host.com"
#################################################
bind notc - * notc_proc
proc notc_proc { nick uhost hand arg {dest ""}} {
global output_chans user_host
if {[string match $user_host $uhost]} {
foreach nchan [split $output_chans] {
if {$nchan != ""} {
if {[botonchan $nchan]} {
putquick "PRIVMSG $nchan :$arg"
}
}
}
}
}
putlog "simple-notice.tcl ver 0.1 by tomekk loaded"
Code: Select all
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# output channels
set output_chans {#channel1 #channel2}
# user host:
# *user@*.host.com,
# user@some.host.com
# user@some.*.com
# *@some.host.com
set user_host "user@some.host.com"
#################################################
bind notc - * notc_proc
proc notc_proc { nick uhost hand arg {dest ""}} {
global output_chans user_host botnick
if {$dest == ""} {
set dest $botnick
}
if {$dest == $botnick} {
if {[string match $user_host $uhost]} {
foreach nchan [split $output_chans] {
if {$nchan != ""} {
if {[botonchan $nchan]} {
putquick "PRIVMSG $nchan :$arg"
}
}
}
}
}
}
putlog "simple-notice.tcl ver 0.1 by tomekk loaded"