| View previous topic :: View next topic |
| Author |
Message |
maxie Voice
Joined: 25 Aug 2007 Posts: 1
|
Posted: Sat Aug 25, 2007 6:02 pm Post subject: Voice joiners to a channel |
|
|
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]. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Aug 25, 2007 7:49 pm Post subject: |
|
|
Add a user using the required nick as a host and setting the channel flags '+fg'.
| Code: | .+user [Clan]
.+host [Clan] [Clan]!*@*
.chattr [Clan] +fg #channel |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
Posted: Wed Aug 29, 2007 5:32 pm Post subject: |
|
|
this would be the same as tcl:
| Code: | #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"
} |
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Aug 29, 2007 7:51 pm Post subject: |
|
|
| -typ- wrote: | this would be the same as tcl:
| Code: | | if {![regexp -nocase -- $nick $criteria] || $channel != $voicechannel} { |
|
that isn't equivalent to $left($nick,6)... remember, he used "if $left($nick,6) == [Clan]"
| Code: | | if {![string match [join [lrange [split $nick] 0 5]] $criteria] || $channel != $voicechannel} { |
This is actually closer to $left's function in mirc/basic.
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. |
|
| Back to top |
|
 |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
Posted: Thu Aug 30, 2007 4:09 am Post subject: |
|
|
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- |
|
| Back to top |
|
 |
|