To Set the "Main" Channel (the channel were all active ops should be noticed about users joining the help channel) Type:.channel set <#irc-help-channel-name> +hops-helpchan
.channel set <#irc-main-channel-name> +hops-mainchan
Code: Select all
#Settings
# The Maxium Idle Time for a Channel Operator before excluding them
# from the help channel notice (default is 170 about 2hrs)
set hops_idletime "170"
# %nick == The nickname of the IRC User that joined the help channel
# %chan == The name of the IRC Help channel
# %host == The IRC user@Host Address for the IRC User that joined the help channel
set hops_opmsg "*** %chan -- HelpOps(%nick): is requesting help!"
#Script
proc hops:join {nick host handle channel} {
global hops_opwait
if {(![isbotnick $nick]) && ([channel get $channel hops-helpchan])} {
utimer $hops_opwait [list _hops:join $nick $host $handle $channel]
return
}
}
proc _hops:join {nick host handle channel} {
global hops_idletime hops_opmsg
if {([onchan $nick $channel]) && (![isop $nick $channel]) && (![ishalfop $nick $channel]) &&
(![isvoice $nick $channel])} {
regsub -all "%nick" "$hops_opmsg" "$nick" opmsg
regsub -all "%chan" "$opmsg" "$channel" opmsg
regsub -all "%host" "$opmsg" "$host" opmsg
foreach mchan [channels] {
if {[channel get $mchan hops-mainchan]} {
foreach onick [chanlist $mchan] {
if {[isop $onick $mchan]} {
if {[getchanidle "$onick" "$mchan"] < $hops_idletime} {
puthelp "NOTICE $onick :$opmsg"
}
}
}
}
}
return
}
}
proc hops:loaded {ver} {
global hops_idletime hops_opmsg
if {$hops_idletime == ""} {
set hops_idletime "170"
putlog "* hops.tcl: You have not given a vaild Channel Operator idle time, defaulting to '170'"
}
if {$hops_opmsg == ""} {
set hops_opmsg "*** %nick has the channel's help channel, Please join it to help them! Thank You"
putlog "* hops.tcl You have not given any hops_opmsg will be a default msg."
}
putlog "loaded hops.tcl version $ver by TCL_no_TK"
return
}
set hops_opwait "10"
bind join -|- "* *" hops:join
hops:loaded "1.0b"
setudef flag hops-mainchan
setudef flag hops-helpchan
Code: Select all
foreach mchan [channels] {
if {[channel get $mchan hops-mainchan]} {
foreach onick [chanlist $mchan] {
if {[isop $onick $mchan]} {
if {[getchanidle "$onick" "$mchan"] < $hops_idletime} {
puthelp "NOTICE $onick :$opmsg"
}
}
}
}
}
Code: Select all
foreach mchan [channels] {
if {[channel get $mchan hops-mainchan]} {
puthelp "NOTICE @$mchan :$opmsg"
}
}
Changealso it still messages the mainchan if their is an op on the helpchan
Code: Select all
set hops_opwait "10"
Use this *version* Its still noticing the channel, but its not making it an Op notice (so normal users "can" be able to see it)how can i change it so everyone in the mainchan sees the notice not just ops
Code: Select all
#Settings
# The Maxium Idle Time for a Channel Operator before excluding them
# from the help channel notice (default is 170 about 2hrs)
set hops_idletime "170"
# %nick == The nickname of the IRC User that joined the help channel
# %chan == The name of the IRC Help channel
# %host == The IRC user@Host Address for the IRC User that joined the help channel
set hops_opmsg "*** %chan -- HelpOps(%nick): is requesting help!"
#Script
proc hops:join {nick host handle channel} {
global hops_opwait
if {(![isbotnick $nick]) && ([channel get $channel hops-helpchan])} {
utimer $hops_opwait [list _hops:join $nick $host $handle $channel]
return
}
}
proc _hops:join {nick host handle channel} {
global hops_idletime hops_opmsg
if {([onchan $nick $channel]) && (![isop $nick $channel]) && (![ishalfop $nick $channel]) && (![isvoice $nick $channel])} {
regsub -all "%nick" "$hops_opmsg" "$nick" opmsg
regsub -all "%chan" "$opmsg" "$channel" opmsg
regsub -all "%host" "$opmsg" "$host" opmsg
foreach mchan [channels] {
if {[channel get $mchan hops-mainchan]} {
puthelp "NOTICE $mchan :$opmsg"
}
}
return
}
}
proc hops:loaded {ver} {
global hops_idletime hops_opmsg
if {$hops_idletime == ""} {
set hops_idletime "170"
putlog "* hops.tcl: You have not given a vaild Channel Operator idle time, defaulting to '170'"
}
if {$hops_opmsg == ""} {
set hops_opmsg "*** %nick has the channel's help channel, Please join it to help them! Thank You"
putlog "* hops.tcl You have not given any hops_opmsg will be a default msg."
}
putlog "loaded hops.tcl version $ver by TCL_no_TK"
return
}
set hops_opwait "10"
bind join -|- "* *" hops:join
hops:loaded "1.0.1"
setudef flag hops-mainchan
setudef flag hops-helpchan