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.

timevoice changing in a regchat

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
barman
Voice
Posts: 24
Joined: Wed Sep 19, 2007 1:35 pm

timevoice changing in a regchat

Post by barman »

What do i have to change so that ppl have to demand in pm a voice, waiting at their turn and than talk a few minutes? when they leave the room they have to renew their registration.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

untested

Code: Select all

set vchannel "#channel"
bind msg - voiceme voiceme

proc voiceme {n u h t} {
   if {[onchan $n $::vchannel]} {putserv "MODE $::vchannel +v $n"}
   else {putserv "PRIVMSG $n :You are not in $::vchannel"}
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

if {[onchan $n $::vchannel]} {putserv "MODE $::vchannel +v $n"
} else {putserv "PRIVMSG $n :You are not in $::vchannel"}
Pretty sure you gotta have it like this, as else isn't really a tcl command but an uninterpreted token (in the same class as then) used to construct if/then/else evaluations. If is required, then or else are merely cosmetic (optional).

Code: Select all

if {condition} then {do this
} else {do that}

if {condition}{do this
}{do that}
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Probably, I usually just use a straight format.
That's what I get for trying to make it "easily readable". :lol:

Code: Select all

set vchannel "#channel"
bind msg - voiceme voiceme

proc voiceme {n u h t} {
   if {[onchan $n $::vchannel]} {putserv "MODE $::vchannel +v $n"} else {putserv "PRIVMSG $n :You are not in $::vchannel"}
}
[Edit: the forum splits it, so make it a single line and it's fine]
b
barman
Voice
Posts: 24
Joined: Wed Sep 19, 2007 1:35 pm

Post by barman »

DragnLord wrote:Probably, I usually just use a straight format.
That's what I get for trying to make it "easily readable". :lol:

Code: Select all

set vchannel "#channel"
bind msg - voiceme voiceme

proc voiceme {n u h t} {
   if {[onchan $n $::vchannel]} {putserv "MODE $::vchannel +v $n"} else {putserv "PRIVMSG $n :You are not in $::vchannel"}
}
[Edit: the forum splits it, so make it a single line and it's fine]
then they wait at their turn? Where do i have to put the code in the script?
Post Reply