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.

Voice joiners to a channel

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
maxie
Voice
Posts: 1
Joined: Sat Aug 25, 2007 5:58 pm

Voice joiners to a channel

Post by maxie »

Hopefully this should be fairly simple.

Hope you can provide a tcl equivalent of this mrc code :-

ON *:JOIN:#:{
if $left($nick,6) == [Clan] && $me isop # && $nick != $me { mode # +v $nick }
}


Basically channels where the bot is an op to voice users who's nick match certain criteria i.e. their names are [Clan].
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Add a user using the required nick as a host and setting the channel flags '+fg'.

Code: Select all

.+user [Clan]
.+host [Clan] [Clan]!*@*
.chattr [Clan] +fg #channel
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

this would be the same as tcl:

Code: Select all

#check on join: 
bind join - * voice_on_joined 

#procedere on join: 
proc voice_on_joined {nick host handle channel} { 

  #set the name of your chanserv. just "chanserv" won't work. 
  set chanserv "chanserv@services.gamesurge.net" 

  #set the channel in which the user will be voiced. $channel will be all 
  set voicechannel "#Quiz.de" 

  #setting criteria
  set criteria "\[Clan\]"


   if {![regexp -nocase -- $nick $criteria] || $channel != $voicechannel} {
  
    #if nick won't match the criteria or nick doesnt join the right channel  the script will halt
    return 
    } 

    #sending voice-command to chanserv 
    putquick "PRIVMSG $chanserv :$channel voice $nick" 
  
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

-typ- wrote:this would be the same as tcl:

Code: Select all

if {![regexp -nocase -- $nick $criteria] || $channel != $voicechannel} {
that isn't equivalent to $left($nick,6)... remember, he used "if $left($nick,6) == [Clan]"

Code: Select all

if {![string match [join [lrange [split $nick] 0 5]] $criteria] || $channel != $voicechannel} {
This is actually closer to $left's function in mirc/basic. :wink:
But all this is actually irrelevant, as using eggdrops "built-in" capability (aka, Alchera's suggestion) to do this supersedes in both speed and function the equivalent in a tcl script.

Alchera most likely meant to use .+host [Clan] [Clan]*!*@* as well. So any person using the [clan] prefix on their nickname would be voiced and match the entry.
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

ok, I don't know mirc ;)

and yes, alchera's way is much easier but i thought he was looking for an tcl-script. and i was bored... ;)

regards,

-typ-
Post Reply