Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:LOAD: { set %Quote.list }
- on *:TEXT:*:#: {
- if ($1 == !quote) {
- if ($2) {
- if ($2 isnum) {
- if ($read(Quotes.txt,$2) != $null) { msg $chan Quote $chr(35) $+ $2 $+ : $read(Quotes.txt,$2) }
- else { msg # Line doesn't exist }
- }
- else { msg # Please provide a number }
- }
- else {
- set %lines $rand(1,$lines(Quotes.txt))
- msg $chan Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines)
- }
- }
- if ($1 == !addquote) {
- if ($address($nick,1) isin %Quote.ban) { msg # You are banned from adding quotes! }
- else {
- if ($2) {
- if ($chr(36) isin $2-) { msg # Invalid Characters! }
- else {
- write Quotes.txt $2- $+ , Added by $nick
- msg # Added!
- }
- }
- }
- }
- if ($1 == !delquote) {
- if ($nick isin %Quote.list) {
- if ($2) {
- if ($read(Quotes.txt,$2) != $null) {
- write -dl $2 Quotes.txt
- msg # Line deleted
- }
- else { msg # Line doesn't exist }
- }
- }
- }
- if ($1 == !search) {
- if ($2) {
- if ($read(Quotes.txt,w,* $+ $2 $+ *) != $null) {
- msg # $read(Quotes.txt,w,* $+ $2 $+ *)
- }
- else { msg # No results found }
- }
- }
- if ($1 == !lastquote) {
- set %lines $lines(Quotes.txt)
- msg # Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines)
- }
- }
- menu nicklist {
- .Add/Del user's
- ..$iif($address($1,1) isin %Quote.ban,$style(2)) Add $+($chr(40),$1,$chr(41)): { set %Quote.ban $addtok(%Quote.list,$address($1,1),32) | echo -a User $+($chr(40),$1,$chr(41)) has been added. }
- ..$iif($address($1,1) !isin %Quote.ban,$style(2)) Del $+($chr(40),$1,$chr(41)): { set %Quote.ban $remtok(%Quote.list,$address($1,1),1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been removed. }
- ..$iif(!%Quote.ban,$style(2)) $+($chr(91),$numtok(%Quote.ban,32),$chr(93)) $+(User's,$chr(58)) List them: { echo -a $gettok(%Quote.list,1-,32) }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement