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 

Op/Voice

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Sun Jul 01, 2007 10:56 am    Post subject: Op/Voice Reply with quote

Code:


bind pub - !stats stats

proc stats {nick uhost hand chan arg} {


if {![isop $nick $chan]} { return }
putquick "PRIVMSG #ace :yes this line works cause ur an op"
} else {
if {![isvoice $nick $chan]} { return }
putquick "PRIVMSG #ace :yes this line works cause ur NOT an op"

}
}


any ideas why it will only work with ops ??
Back to top
View user's profile Send private message
Ace-T
Halfop


Joined: 29 Aug 2006
Posts: 82

PostPosted: Sun Jul 01, 2007 11:04 am    Post subject: Reply with quote

nm fixed it
Back to top
View user's profile Send private message
DragnLord
Owner


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

PostPosted: Sun Jul 01, 2007 11:07 am    Post subject: Reply with quote

the "return" parts stop the script
try this:
Code:

bind pub - !stats stats

proc stats {nick uhost hand chan arg} {
  if {![isop $nick $chan]} {
    putquick "PRIVMSG #ace :yes this line works cause ur an op"
  } else {
  if {![isvoice $nick $chan]} {
    putquick "PRIVMSG #ace :yes this line works cause ur NOT an op"
  }
}


Note: your code is set to test if people are NOT ops or voices, that's what the "!" does
so the first part tests like this: "$nick is NOT op in $chan"
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 -> Scripting Help 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