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 

timevoice changing in a regchat

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


Joined: 19 Sep 2007
Posts: 24

PostPosted: Mon Mar 31, 2008 5:40 pm    Post subject: timevoice changing in a regchat Reply with quote

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


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Mon Mar 31, 2008 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Apr 01, 2008 12:37 am    Post subject: Reply with quote

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


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Tue Apr 01, 2008 5:08 pm    Post subject: Reply with quote

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

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


Joined: 19 Sep 2007
Posts: 24

PostPosted: Thu Apr 03, 2008 9:56 am    Post subject: Reply with quote

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

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