Is it possible to get this script to ignore users that i add I want it to ignore some admin nicknames and some other eggdrops that run games on my server also how can I get it to show the whole sentence
# Multi-Bind Messaging (the easy way to do this)
# AKA, PutServ-O-Matic v1.1
# by speechles (w/help from egghelp! yay!)
# Construct your triggers|channel|message
# here using the format below:
# "TRIGGER|#CHANNEL|METHOD AND MESSAGE"
# add as little, or as many as you want but you
# MUST use the format described above!
# You also have a few variables to use
# %b - will be replaced with $::botnick (bots current nickname)
# %n - will be replaced with $nick (person triggering)
# %c - will be replaced with $chan (channel triggered in)
# %u - will be replaced with $uhost (person triggering unique host)
# %h - will be replaced with $hand (person triggering handle)
# %t - will be replaced with $trigger (aka 0 lindex)
# %i - will be replaced with user $input (entire thing aka 1-end lrange)
# %i1 - will be replaced with user $input (just the first word aka 1 lindex)
# %i2 - will be replaced with user $input (second to last words aka 2-end lrange)
# below are merely some examples.
variable mycommands {
"*credit card*|*|notice #CWStats :CWStats-Spam-Report: <%n %c> %t%i"
"*creditcard*|*|notice #CWStats :CWStats-Spam-Report: <%n %c> %t%i"
}
# set the flagmask here that you will use to ignore users.
# use ".chattr hand +J" to add users, you can change this flag below.
# be careful which flags you use, they are matched against channel.
variable mycommand_flag "*|J"
# Script begins - change nothing below here
bind pubm -|- "*" mycommands_proc
proc mycommands_proc {nick uhand hand chan input} {
if {![matchattr $hand $::mycommand_flag $chan]} {
foreach item $::mycommands {
set trig [lindex [split $item \|] 0]
regsub -all -nocase {%b} $trig $::botnick trig
regsub -all -nocase {%n} $trig $nick trig
regsub -all -nocase {%c} $trig $chan trig
regsub -all -nocase {%u} $trig $uhand trig
regsub -all -nocase {%h} $trig $hand trig
regsub -all -nocase {%t} $trig [lindex [split $input] 0] trig
regsub -all -nocase {%i1} $trig [lindex [split $input] 1] trig
regsub -all -nocase {%i2} $trig [join [lrange [split $input] 2 end]]] trig
regsub -all -nocase {%i} $trig [join [lrange [split $input] 1 end]]] trig
if {[string match -nocase $trig $input]} {
if {[string match -nocase [lindex [split $item \|] 1] $chan]} {
set message [join [lrange [split $item \|] 2 end]]
regsub -all -nocase {%b} $message $::botnick message
regsub -all -nocase {%n} $message $nick message
regsub -all -nocase {%c} $message $chan message
regsub -all -nocase {%u} $message $uhand message
regsub -all -nocase {%h} $message $hand message
regsub -all -nocase {%t} $message [lindex [split $input] 0] message
regsub -all -nocase {%i1} $message [lindex [split $input] 1] message
regsub -all -nocase {%i2} $message [join [lrange [split $input] 2 end]]] message
regsub -all -nocase {%i} $message [join [lrange [split $input] 1 end]]] message
putserv "$message"
}
}
}
}
}
putlog "Multi-bind messaging with action missles script loaded."
Try this one out
Last edited by speechles on Tue Dec 29, 2009 5:31 pm, edited 1 time in total.
Edited changed the above now works but still only outputs second to last word its set to show whole line set +J on myself and its still showing what ive said
# Multi-Bind Messaging (the easy way to do this)
# AKA, PutServ-O-Matic v1.1
# by speechles (w/help from egghelp! yay!)
# Construct your triggers|channel|message
# here using the format below:
# "TRIGGER|#CHANNEL|METHOD AND MESSAGE"
# add as little, or as many as you want but you
# MUST use the format described above!
# You also have a few variables to use
# %b - will be replaced with $::botnick (bots current nickname)
# %n - will be replaced with $nick (person triggering)
# %c - will be replaced with $chan (channel triggered in)
# %u - will be replaced with $uhost (person triggering unique host)
# %h - will be replaced with $hand (person triggering handle)
# %t - will be replaced with $trigger (aka 0 lindex)
# %i - will be replaced with user $input (entire thing aka 1-end lrange)
# %i1 - will be replaced with user $input (just the first word aka 1 lindex)
# %i2 - will be replaced with user $input (second to last words aka 2-end lrange)
# below are merely some examples.
variable mycommands {
"*credit card*|*|notice #CWStats :CWStats-Spam-Report: <%n %c> %t %i"
"*creditcard*|*|notice #CWStats :CWStats-Spam-Report: <%n %c> %t %i"
}
# set the flagmask here that you will use to ignore users.
# use ".chattr hand +J" to add users, you can change this flag below.
# be careful which flags you use, they are matched against channel.
variable mycommand_flag "J|J"
# Script begins - change nothing below here
bind pubm -|- "*" mycommands_proc
proc mycommands_proc {nick uhand hand chan input} {
if {![matchattr $hand $::mycommand_flag $chan]} {
foreach item $::mycommands {
set trig [lindex [split $item \|] 0]
regsub -all -nocase {%b} $trig $::botnick trig
regsub -all -nocase {%n} $trig $nick trig
regsub -all -nocase {%c} $trig $chan trig
regsub -all -nocase {%u} $trig $uhand trig
regsub -all -nocase {%h} $trig $hand trig
regsub -all -nocase {%t} $trig [lindex [split $input] 0] trig
regsub -all -nocase {%i1} $trig [lindex [split $input] 1] trig
regsub -all -nocase {%i2} $trig [join [lrange [split $input] 2 end]]] trig
regsub -all -nocase {%i} $trig [join [lrange [split $input] 1 end]]] trig
if {[string match -nocase $trig $input]} {
if {[string match -nocase [lindex [split $item \|] 1] $chan]} {
set message [join [lrange [split $item \|] 2 end]]
regsub -all -nocase {%b} $message $::botnick message
regsub -all -nocase {%n} $message $nick message
regsub -all -nocase {%c} $message $chan message
regsub -all -nocase {%u} $message $uhand message
regsub -all -nocase {%h} $message $hand message
regsub -all -nocase {%t} $trig [lindex [split $input] 0] message
regsub -all -nocase {%i1} $message [lindex [split $input] 1] message
regsub -all -nocase {%i2} $message [join [lrange [split $input] 2 end]]] message
regsub -all -nocase {%i} $message [join [lrange [split $input] 1 end]]] message
putserv "$message"
}
}
}
}
}
putlog "Multi-bind messaging with action missles script loaded."
Hi speecless the above script no longer seems to work with the new eggdrop if possible is their any way to get it to work