Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:!*:#: {
- tokenize 32 $strip($1-)
- if ($1 == !quotehelp) { msg $chan ( $+ $nick $+ ): Quote Commands: !AddQuote <Text> - !DelQuote <ID> - !ClearQuotes - !Quotes - !Get [Number] }
- if ($1 == !addquote) {
- if (!$istok($quote_nicks,$nick,44)) { msg $chan ( $+ $nick $+ ): Access denied! | return }
- if (!$2) { msg $chan ( $+ $nick $+ ): Error, Not enough paramaters, Insert a text! | return }
- var %f = quotes.txt
- var %r = $read(%f,nw,$2-)
- if (%r) { msg $chan ( $+ $nick $+ ): Error, Already exists, Insert an other text! | return }
- write $qt(%f) $2-
- var %t = $lines(%f)
- msg $chan ( $+ $nick $+ ): Quote $chr(35) $+ %t has been added.
- }
- if ($1 == !delquote) {
- if (!$istok($quote_nicks,$nick,44)) { msg $chan ( $+ $nick $+ ): Access denied! | return }
- if (!$2) { msg $chan ( $+ $nick $+ ): Error, Not enough paramaters, Insert a ID number! | return }
- var %f = quotes.txt
- var %l = $lines(%f)
- if (!%l) { msg $chan ( $+ $nick $+ ): Quotes file is currently empty! | return }
- var %r = $read(%f,n,$2)
- var %rn = $readn
- if (!%r) { msg $chan ( $+ $nick $+ ): Error, Not exists, Please use an other quote ID! | return }
- write -dl $+ %rn $qt(%f)
- msg $chan ( $+ $nick $+ ): Quote $chr(35) $+ %rn has been removed.
- }
- if ($1 == !quotes) {
- var %f = quotes.txt
- var %l = $lines(%f)
- if (!%l) { msg $chan ( $+ $nick $+ ): Quotes file is currently empty! | return }
- msg $chan ( $+ $nick $+ ): There are $qt(%l) quotes in database!
- }
- if ($1 == !clearquotes) {
- if (!$istok($quote_nicks,$nick,44)) { msg $chan ( $+ $nick $+ ): Access denied! | return }
- var %f = quotes.txt
- var %l = $lines(%f)
- if (!%l) { msg $chan ( $+ $nick $+ ): Quotes file is currently empty! | return }
- write -c $qt(%f)
- msg $chan ( $+ $nick $+ ): All $qt(%l) quotes have been cleared.
- }
- if ($1 == !get) {
- var %f = quotes.txt
- var %l = $lines(%f)
- if (!%l) { msg $chan ( $+ $nick $+ ): Quotes file is currently empty! | return }
- if (!$2) {
- var %r = $read(%f,n)
- msg $chan ( $+ $nick $+ ): %r
- return
- }
- var %r = $read(%f,n,$2)
- var %rn = $readn
- if (!%r) { msg $chan ( $+ $nick $+ ): Error, Not exists, Please use an other quote ID! | return }
- msg $chan ( $+ $nick $+ ): %r
- }
- }
- alias -l quote_nicks { return westor,tester }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement