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.

Q Request Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
C
CoOoD3R
Voice
Posts: 1
Joined: Fri Sep 25, 2009 2:26 pm

Q Request Script

Post by CoOoD3R »

Hello,

Could someone make Q Request script?

When you write on channel eg. "-Q" bot tryes to get Q...
Bot checks is there is already Q
Bot says if he have no ops..
Requester hasto have ops on requestable channel.
If there isnt enought users, then it warns...

Script checks all reqruments and then requests Q, 30min delay.
When Q coming, Bot automatically sets +mop to requester.

I tryed to make this kind script, but it didnt work, so i deleted it, and now i loved if someone could do this kind script.
User avatar
Getodacul
Voice
Posts: 20
Joined: Thu Jun 07, 2007 2:32 pm

Post by Getodacul »

You need something like:

Code: Select all

bind pub - "request" request:q
bind pub - "!request" request:q
bind pub - "!Q" request:q

proc request:q { nick uhost hand chan text } {
global owner botnick
 if {[onchan Q $chan]} {return 0}
 if {[botisop $chan] == 0} {
 puthelp "NOTICE $nick :I dont have ops!"
 return 0
 }
 if {([matchattr $hand o|o] || [isop $nick $chan])} {
 putserv "PRIVMSG R :requestbot $chan"
 if {[onchan Q $chan]} {
 putserv "PRIVMSG Q :chanlev $chan $nick +mop"
 puthelp "NOTICE $nick :$nick, you are master on $chan now!"
 return 0
  }
 }
}
It's not tested but should work. I hope! :)
Post Reply