| View previous topic :: View next topic |
| Author |
Message |
barman Voice
Joined: 19 Sep 2007 Posts: 24
|
Posted: Mon Mar 31, 2008 5:40 pm Post subject: timevoice changing in a regchat |
|
|
| 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. |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon Mar 31, 2008 10:58 pm Post subject: |
|
|
untested
| Code: | 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"}
} |
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Apr 01, 2008 12:37 am Post subject: |
|
|
| Code: | 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: | if {condition} then {do this
} else {do that}
if {condition}{do this
}{do that} |
|
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Tue Apr 01, 2008 5:08 pm Post subject: |
|
|
Probably, I usually just use a straight format.
That's what I get for trying to make it "easily readable".
| Code: | 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] |
|
| Back to top |
|
 |
barman Voice
Joined: 19 Sep 2007 Posts: 24
|
Posted: Thu Apr 03, 2008 9:56 am Post subject: |
|
|
| DragnLord wrote: | Probably, I usually just use a straight format.
That's what I get for trying to make it "easily readable".
| Code: | 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? |
|
| Back to top |
|
 |
|