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.

Need help with !quote script

Old posts that have not been replied to for several years.
Locked
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Need help with !quote script

Post by Alexander »

Hi !
Can someone help me so that this script only respond to
people that is voiced or oped in the channel, if it's possibel ?

##########################
# This script is based on Dubya.tcl
##########################

bind pub - !quote pub_quote

proc pub_quote {nick mask hand channel args} {
global moviequote
puthelp "PRIVMSG $channel :[lindex $moviequote [rand [llength $moviequote]]]"
}

set moviequote {

"\"You're scared of Room 237, ain't ya?. The Shining (1980)\""
"\"Some places are like people: some shine and some don't. The Shining (1980)\""

}
s
spyda
Halfop
Posts: 64
Joined: Mon Aug 12, 2002 2:22 am
Location: Australia

Hope this Helps

Post by spyda »

bind pub - !quote pub_quote

proc pub_quote {nick mask hand channel args} {
global moviequote
puthelp "PRIVMSG $channel :[lindex $moviequote [rand [llength $moviequote]]]"
}

set moviequote {

"\"You're scared of Room 237, ain't ya?. The Shining (1980)\""
"\"Some places are like people: some shine and some don't. The Shining (1980)\""

}
Just added a check:

Code: Select all

bind pub - !quote pub_quote 

proc pub_quote {nick mask hand channel args} { 
global moviequote 
if {[isop $nick $channel] || [isvoice $nick $channel]} {
  puthelp "PRIVMSG $channel :[lindex $moviequote [rand [llength $moviequote]]]"
  } else {
   return 0
  } 
} 

set moviequote { 

"\"You're scared of Room 237, ain't ya?. The Shining (1980)\"" 
"\"Some places are like people: some shine and some don't. The Shining (1980)\"" 

}
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

thx
i'm not so good at scripting
but this places shine :D
Locked