ingx24

Untitled

Feb 16th, 2012
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.09 KB | None | 0 0
  1. on *:TEXT:*:#:{    
  2.  
  3. if ($1 == .addquote) {
  4.         write quotes.txt $2-
  5.     msg $chan Quote added! }
  6.  
  7.     if ($1 == .quotenumber) {
  8.     msg $chan I currently have $lines(quotes.txt) quotes stored. }
  9.  
  10.     if ($1 == .quote) {
  11.       if ($2 == $null) {
  12.         set %quotenum $rand(1,$lines(quotes.txt))
  13.         msg $chan Quote %quotenum $+ : $read(quotes.txt, %quotenum)
  14.       unset %quotenum }
  15.       if ($2 != $null) {
  16.     msg $chan Quote $2 $+ : $read(quotes.txt, $2) } }
  17.  
  18.     if ($1 == .removequote) {
  19.         write -dl $+ $2 quotes.txt
  20.     msg $chan Quote $2 deleted. }
  21.  
  22.     if ($1 == .quotesearch) && ($2 != $null) {
  23.       msg $chan Quote results for " $+ $2- $+ ":
  24.       set %line 1
  25.       while (%line <= $lines(quotes.txt)) {
  26.         set %quoteline $read(quotes.txt, %line)
  27.         if ($2- isin %quoteline) {
  28.           msg $chan Quote %line $+ : %quoteline
  29.         set %resultsfound true }
  30.       inc %line }
  31.       if (%line > $lines(quotes.txt)) && (%resultsfound != true) {
  32.       msg $chan No results found. }
  33.       unset %resultsfound
  34.       unset %quoteline
  35.     unset %line } }
Advertisement
Add Comment
Please, Sign In to add comment