SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | on *:TEXT:!*:#: {
| |
| 3 | ;---------- quote -------------------------------------------------------------------------------- | |
| 4 | if ($right($1,-1) == quote) {
| |
| 5 | if (((%floodquote) || ($($+(%,floodquote.,$nick),2))) && ($nick)) { return }
| |
| 6 | {
| |
| 7 | set -u30 %floodquote On | |
| 8 | set -u30 %floodquote. $+ $nick On | |
| 9 | } | |
| 10 | :1 | |
| 11 | if (!$2) { msg # [Random Quote] $read(quote.ini,n) }
| |
| 12 | elseif ($2 == del) && ($3 isnum) && ($lines(quote.ini) >= $3) && ($nick isop #) { msg # [Quote Deleted] $3 $+ : $read(quote.ini, $+ $3) | .write -dl $+ $3 quote.ini }
| |
| 13 | elseif ($2 isnum) && ($lines(quote.ini) >= $2) { msg # [Quote $+($2,/,$lines(quote.ini),]) $read(quote.ini,n,$2) }
| |
| 14 | elseif ($2 == find) && ($len($3) > 2) {
| |
| 15 | var %x $lines(quote.ini) | |
| 16 | while (%x) {
| |
| 17 | if ($3- isin $read(quote.ini,%x)) {
| |
| 18 | inc %quotes.search | |
| 19 | set %quotes.return $addtok(%quotes.return,%x,32) | |
| 20 | } | |
| 21 | dec %x | |
| 22 | } | |
| 23 | if (!%quotes.search) { msg # [Quote Search] No quotes found with the string " $+ $3- $+ " | unset %quotes.* | halt }
| |
| 24 | if (%quotes.search = 1) { msg # [Quote Search] One quote found: $+([,%quotes.return,]) $read(quote.ini,n,%quotes.return) | unset %quotes.* }
| |
| 25 | else {
| |
| 26 | msg # [Quote Search] Found %quotes.search quotes that have the string $+(",$3-,") in them.
| |
| 27 | .timer 1 2 msg # [Quote $+($gettok(%quotes.return,1,32),/,$lines(quote.ini),]) $replace($read(quote.ini, n, $gettok(%quotes.return,1,32)),|,$!chr(124)) | |
| 28 | .timer 1 4 msg # [Quote Search] Other quote numbers: $right(%quotes.return,-2) | |
| 29 | unset %quotes.* | |
| 30 | } | |
| 31 | } | |
| 32 | ||
| 33 | ||
| 34 | } | |
| 35 | on *:TEXT:!*:#:{
| |
| 36 | if ($right($1,-1) == addquote) && ($nick isop #) {
| |
| 37 | - | if ($right($1,-1) == addquote) && ($nick isop#) {
|
| 37 | + | |
| 38 | .write quote.ini " $+ $replace($2-,|,$chr(124)) $+ " - Tortoisehelmet $date | |
| 39 | msg # [Quote Added] $+($lines(quote.ini),:) $2- | |
| 40 | } | |
| 41 | ||
| 42 | } |