egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Notice Channel Ops

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
gamble27
Halfop


Joined: 05 Aug 2008
Posts: 71

PostPosted: Sat Nov 07, 2009 5:57 am    Post subject: Notice Channel Ops Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sat Nov 07, 2009 10:23 am    Post subject: Reply with quote

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 Razz
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
gamble27
Halfop


Joined: 05 Aug 2008
Posts: 71

PostPosted: Sat Nov 07, 2009 1:49 pm    Post subject: thanks for replyin.. Reply with quote

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 Smile
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sat Nov 07, 2009 2:39 pm    Post subject: Reply with quote

can you post the output of .set errorInfo (dcc/telnet)
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
gamble27
Halfop


Joined: 05 Aug 2008
Posts: 71

PostPosted: Sun Nov 08, 2009 2:33 am    Post subject: thanks Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sun Nov 08, 2009 11:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
gamble27
Halfop


Joined: 05 Aug 2008
Posts: 71

PostPosted: Mon Nov 09, 2009 7:55 am    Post subject: thanks for replyin.. Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Wed Nov 11, 2009 3:56 pm    Post subject: Reply with quote

I cant seem to recreat or get this error, can you do the .set errorInfo from DCC/telnet?
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Nov 27, 2009 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Nov 27, 2009 6:45 pm    Post subject: Reply with quote

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
Smile
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Nov 27, 2009 8:12 pm    Post subject: Reply with quote

Thanks TCL_no_TK thats done all i wanted it to Very Happy
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber