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.

Op/Voice

Help for those learning Tcl or writing their own scripts.
Post Reply
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Op/Voice

Post by Ace-T »

Code: Select all


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 ??
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

nm fixed it
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

the "return" parts stop the script
try this:

Code: Select all

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"
Post Reply