This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Notice Channel Ops

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
g
gamble27
Halfop
Posts: 71
Joined: Tue Aug 05, 2008 7:51 am

Notice Channel Ops

Post by gamble27 »

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.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Use the following in DCC/Telnet with the bot
To Set the help channel Type:
.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:
.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
It should allow for a few main channels/help channels but will not be able to tell what channel has what help channel :P
g
gamble27
Halfop
Posts: 71
Joined: Tue Aug 05, 2008 7:51 am

thanks for replyin..

Post by gamble27 »

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 :)
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

can you post the output of .set errorInfo (dcc/telnet)
g
gamble27
Halfop
Posts: 71
Joined: Tue Aug 05, 2008 7:51 am

thanks

Post by gamble27 »

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.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

without changing the hole thing, just change

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" 
         } 
        } 
       } 
      } 
     }
to

Code: Select all

     foreach mchan [channels] { 
      if {[channel get $mchan hops-mainchan]} { 
       puthelp "NOTICE @$mchan :$opmsg"
      } 
     }
g
gamble27
Halfop
Posts: 71
Joined: Tue Aug 05, 2008 7:51 am

thanks for replyin..

Post by gamble27 »

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:)
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

I cant seem to recreat or get this error, can you do the .set errorInfo from DCC/telnet?
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

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
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

also it still messages the mainchan if their is an op on the helpchan
Change

Code: Select all

 set hops_opwait "10" 
to something higher than 10, this should fix this.
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: 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
:)
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Thanks TCL_no_TK thats done all i wanted it to :D
Post Reply