| View previous topic :: View next topic |
| Author |
Message |
gamble27 Halfop
Joined: 05 Aug 2008 Posts: 71
|
Posted: Sat Nov 07, 2009 5:57 am Post subject: Notice Channel Ops |
|
|
These days every channel has a help channel,basically what im looking for is the channel eggdrop auto notice channel ops in main channel when someone who is not opped join in the help channel.
So basically someone join #englandhelp
the eggdrop will auto notice #england ops in op notice
Ie notice #england Active Ops Plz Assist User in #englandhelp.
that is all.basically it will notify u that some1 is at the help channel for help.thanks,Help will be much appreciated. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Nov 07, 2009 10:23 am Post subject: |
|
|
Use the following in DCC/Telnet with the bot
To Set the help channel Type: | Quote: | | .channel set <#irc-help-channel-name> +hops-helpchan |
To Set the "Main" Channel (the channel were all active ops should be noticed about users joining the help channel) Type: | Quote: | | .channel set <#irc-main-channel-name> +hops-mainchan |
| Code: | #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 | It should allow for a few main channels/help channels but will not be able to tell what channel has what help channel  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
gamble27 Halfop
Joined: 05 Aug 2008 Posts: 71
|
Posted: Sat Nov 07, 2009 1:49 pm Post subject: thanks for replyin.. |
|
|
i have tried the followin tcl tht u have pasted and there is an error. [17:46]
Tcl error in script for 'timer825':
[17:46] wrong # args: no script following "{[getchanidle "$onick" "$mchan"] < $hops_idletime}" argument
This is the error i get when a user join the help channel.it displays in the bot dcc chat. thanks  |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Nov 07, 2009 2:39 pm Post subject: |
|
|
can you post the output of .set errorInfo (dcc/telnet) _________________ TCL the misunderstood |
|
| Back to top |
|
 |
gamble27 Halfop
Joined: 05 Aug 2008 Posts: 71
|
Posted: Sun Nov 08, 2009 2:33 am Post subject: thanks |
|
|
| no prob bro its working.. and its a nice tcl but i was jus wondering how if i jus want it to notice the main channel instead of noticing every active ops it jus send 1 op notice to the main channel.thanks for assisting. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sun Nov 08, 2009 11:40 am Post subject: |
|
|
without changing the hole thing, just change | Code: | 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"
}
}
}
}
} | to | Code: | foreach mchan [channels] {
if {[channel get $mchan hops-mainchan]} {
puthelp "NOTICE @$mchan :$opmsg"
}
} |
_________________ TCL the misunderstood |
|
| Back to top |
|
 |
gamble27 Halfop
Joined: 05 Aug 2008 Posts: 71
|
Posted: Mon Nov 09, 2009 7:55 am Post subject: thanks for replyin.. |
|
|
after making those changes i got this error
[11:41] Tcl error in script for 'timer1104054':
[11:41] invalid command name " "
ill paste the whole tcl tht i changed after u told me to change the parts
#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 "HelpMsg"
#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.0b"
setudef flag hops-mainchan
setudef flag hops-helpchan
Thanks for the time:) |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Wed Nov 11, 2009 3:56 pm Post subject: |
|
|
I cant seem to recreat or get this error, can you do the .set errorInfo from DCC/telnet? _________________ TCL the misunderstood |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Fri Nov 27, 2009 9:22 am Post subject: |
|
|
Hey im also using this script works well but how can i change it so everyone in the mainchan sees the notice not just ops also it still messages the mainchan if their is an op on the helpchan _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Nov 27, 2009 6:45 pm Post subject: |
|
|
| Quote: | | also it still messages the mainchan if their is an op on the helpchan | Change | Code: | | set hops_opwait "10" | to something higher than 10, this should fix this. | Quote: | | how can i change it so everyone in the mainchan sees the notice not just ops | 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) | Code: | #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 |  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Fri Nov 27, 2009 8:12 pm Post subject: |
|
|
Thanks TCL_no_TK thats done all i wanted it to  _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|