Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:*:#elunacy,#oper,#opers,#blaze.u,#molten: {
- if (!%quoteflood) {
- if ($1 == !addquote) && (!$2) {
- set -u5 %quoteflood on
- msg $chan Add a quote idiot.
- }
- if ($1 == !addquote) && ($2) {
- userip $nick
- if (%nickcheck != $readini(quoteban.ini,$chan,$nick)) {
- if ($chr(191) !isin $2-) {
- set -u5 %quoteflood on
- write quotes.txt $2- ¿ Added: $adate ¿ By: $nick
- msg $chan 11(14Quote Added: $chr(35) $+ $lines(quotes.txt) $+ 11)
- }
- elseif (%nickcheck == $readini(quoteban.ini,$chan,$nick)) {
- set -u5 %quoteflood on
- notice $nick Sorry $nick $+ , You have been banned from using this command.
- }
- else {
- set -u5 %quoteflood on
- msg $chan 04Error: Please try again without " $+ $chr(191) $+ ".
- }
- }
- }
- if ($1 == !quote) && (!$2) {
- set -u5 %quoteflood on
- set -u5 %quote $read(quotes.txt)
- %line = $readn
- msg $chan 14Quote Number:04 %line $+ $gettok(%quote,1,191) 14- $gettok(%quote,2,191) $gettok(%quote,3,191)
- unset %line
- }
- if ($1 == !quote) && ($2 isnum) {
- set -u5 %quoteflood on
- set -u5 %quote $gettok($read(quotes.txt,$2),1,191)
- if (%quote != $null) {
- msg $chan 14Quote Number:04 $2 $+ $gettok($read(quotes.txt,$2),1,191) 14- $gettok($read(quotes.txt,$2),2,191) $gettok($read(quotes.txt,$2),3,191)
- }
- else {
- set -u5 %quoteflood on
- msg $chan 04Error: The quote you specified does not exist.
- }
- }
- if ($1 == !quote) && ($2 != $null) {
- if ($2 !isnum) {
- msg $chan 04Error: 14Try !randquote $2 or !findquote intext $2 $+ . This command only accepts quote numbers.
- }
- }
- if ($1 == !quotehelp) {
- set -u5 %quoteflood on
- .notice $nick 04Remember that all commands 2nd/3rd parameter are without the < > symbols.
- .notice $nick The list of commands are as follows:
- .notice $nick 14!quote <number> <- optional number. This command will display a completely random quote. If a number is supplied it will display the corresponding quote number.
- .notice $nick 14!addquote <your quote here> This command allows you to add a quote to the database.
- .notice $nick 14!delquote <number> number = the quote number
- .notice $nick 14!findquote intext <search paramaters here> . i.e !findquote intext fuck your face
- .notice $nick 14!quoteban <name here> (bans them from adding quotes only) (( 04Channel ops only ))
- .notice $nick 14!delquoteban <name here> (removes the ban on their add quote priviledges.) (( 04Channel ops only ))
- .notice $nick 14!randquote <search params here> (more or less the same as !findquote instead of giving you a list of quote numbers this will auto choose a quote matching your search parameters and display it)
- }
- if ($1 == !quotes) {
- set -u5 %quoteflood on
- msg $chan Their are a total of $lines(quotes.txt) quotes.
- }
- if ($1 == !findquote) && ($2 == intext) && ($3) {
- set -u5 %quoteflood on
- %chan = $chan
- msg $chan Searching, please wait...
- unset %qnumber
- set -u5 %search $3-
- search
- }
- if ($1 == !randquote) {
- if ($2) {
- set -u5 %quoteflood on
- %chan = $chan
- unset %qnumber
- set -u5 %search $2-
- rsearch
- }
- else {
- set -u5 %quoteflood on
- msg $chan 04Error: Please supply a 2nd parameter.
- }
- }
- if ($1 == !findquote) && ($2 == intext) && (!$3) {
- set -u5 %quoteflood on
- msg $chan 04Error: Please supply a 3rd parameter.
- }
- if ($nick isop $chan) {
- if ($1 == !delquote) && ($2 isnum) {
- set -u5 %delquote $read(quotes.txt,$2)
- if (%delquote != $null) {
- set -u5 %quoteflood on
- write -dl $2 quotes.txt
- msg $chan 11(14Quote: $chr(35) $+ $2 Deleted.11)
- }
- else {
- set -u5 %quoteflood on
- msg $chan 04Error: The quote you specified does not exist.
- }
- }
- if ($1 == !delquote) && ($2 !isnum) {
- msg $chan 04Error: Syntax is !delquote 69 (69 = number of the quote)
- }
- if ($1 == !delquote) && (!$2) {
- set -u5 %quoteflood on
- msg $chan 04Error: Syntax is !delquote number
- }
- if ($1 == !quoteban) && (!$2) {
- set -u5 %quoteflood on
- msg $chan 04Error: Please supply a 2nd parameter.
- }
- if ($1 == !quoteban) && ($2) {
- if ($2 != $me) {
- userip $2
- if (%nickcheck != $null) {
- set -u5 %quoteflood on
- writeini quoteban.ini $chan $2 %nickcheck
- notice $nick 14" $+ $2 $+ 's" host was added to quote ban.
- }
- else {
- set -u5 %quoteflood on
- notice $nick Nick: $2 does not exist, please try again.
- }
- }
- if ($1 == !quoteban) && ($2 == $me) {
- set -u5 %quoteflood on
- msg $chan 4Error: You can not ban me from the add quote command.
- }
- }
- if ($1 == !delquoteban) && ($2) {
- userip $2
- if (%nickcheck == $readini(quoteban.ini,$chan,$2)) {
- set -u5 %quoteflood on
- remini quoteban.ini $chan $2
- notice $nick $2 was removed from the quote ban list.
- }
- else {
- set -u5 %quoteflood on
- notice $nick Nick: $2 does not exist, please try again.
- }
- }
- }
- if ($1 == !quoteban) || ($1 == !delquoteban) || ($1 == !delquote) && ($2) && ($nick !isop $chan) {
- set -u5 %quoteflood on
- notice $nick 04Error: You do not have access to this command $nick $+ .
- }
- }
- }
- alias rsearch {
- %x = 0
- while (%x <= $lines(quotes.txt)) {
- if (* $+ %search $+ * iswm $gettok($read(quotes.txt,%x),1,191)) {
- set -u5 %qnumber %qnumber $chr(35) $+ $readn
- inc %x
- }
- else {
- inc %x
- .timermsg 1 1 displayrand
- }
- }
- }
- alias displayrand {
- %rquote = $rand(1,$numtok(%qnumber,32))
- %quote = $read(quotes.txt,$remove($gettok(%qnumber,%rquote,32),$chr(35)))
- if (%quote != $null) {
- msg %chan 14Quote Number:04 $remove($gettok(%qnumber,%rquote,32),$chr(35)) $+ $replace($gettok(%quote,1,191),%search,04 $+ %search $+ ) 14- $gettok(%quote,2,191) $gettok(%quote,3,191)
- unset %quote %rquote %qnumber %search
- }
- else {
- msg %chan 04Error: Their are no quotes containing what you specified.
- }
- }
- alias search {
- %x = 0
- while (%x <= $lines(quotes.txt)) {
- if (* $+ %search $+ * iswm $gettok($read(quotes.txt,%x),1,191)) {
- set -u5 %qnumber %qnumber $chr(35) $+ $readn
- inc %x
- }
- else {
- inc %x
- .timerdisplay 1 1 displayq
- }
- }
- }
- alias displayq {
- if (%qnumber != $null) {
- msg %chan $numtok(%qnumber,32) Quotes found. Quote Numbers: %qnumber
- }
- else {
- msg %chan $numtok(%qnumber,32) Quotes found.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement