Quotes (Espanol/Spanish)

By __RaNdY__ on Jun 10, 2013

Es un Sistema de Quotes para un bot, con su base de datos por canal.
Comandos:
-!quote
-!quotes
-!quoteadd
-!quotedel
-!busca.quote
-!quoteinfo

Proximamente Ingles - Soon in English
RaNdY - Irc Hispano

on *:text:*:#:{ 
  tokenize 32 $strip($1-)
  ;#####################QUOTES#################################### 
  if $1 == !quoteadd  || $1 == !addquote {
    if !$2 { err Especifique la 12Quote a aÃÂñadir. } 
    var %nm $iif( $i(quotes,#,0) == $null || $i(quotes,#,0) == 0,1,$calc( $i(quotes,#,0) + 1))
    ai quotes # %nm $strip($2-)
    ai quotei # %nm $date $+ , $+ $time $+ , $+ $nick
    ms AÃÂñadida la 12Quote Numero:2 %nm $+ , Para ver !quote %nm 
  }
  if $1 == !delquote || $1 == !quotedel { 
    if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }  
    if !$2 { err Especifique la 12Quote a Borrar. } 
    if $gettok($readini(bd/quotei.ini,#,$2),3,44) != $nick { err Usted no es el Nick que aÃÂñadiÃÂó la Quote, Info !quoteinfo 12 $+ $2 }
    di quotes # $2 
    di quotei # $2 
    ms Quote  $+ $2 $+  Borrada Exitosamente...
  }
  if $1 == !quotes { 
    if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }  
    ms Total de Numero de 2Quotes1 en 12 $+ # $+ 1: $ini(bd/quotes.ini,#,$i(quotes,#,0))
  }

  if $1 == !quote { 
    if !$2 {
      if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }  
      var %al $r(1,$i(quotes,#,0)) 
      ms Quote aleatoria 2(12 $+ %al $+ / $+ $ini(bd/quotes.ini,#,$i(quotes,#,0)) $+ 2) $+ 1: $readini(bd/quotes.ini,#,%al) 
    } 
    if $2 { 
      if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }      
      if $2 !isnum || $2 < 0 { err SintÃÂáxs: 12!Quote <NÃÂúmero> } 
      ms Quote Numero 12 $+ $2 $+  1Por 14 $+ $gettok($readini(bd/quotei.ini,#,$2),3,44) $+ : $readini(bd/quotes.ini,#,$2) 
    }
  }

  if $1 == !busca.quote || $1 == !busca { 
    if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }      
    if !$2 || $2 < 0 || $2 isnum {  err SintÃÂáxis: 12!Busca <NÃÂúmero> } 
    if $i(quotes,#,0) == 1 { err Solo hay una 12Quote en el canal... }
    unset %qt 
    var %a 1 
    while %a <= $ini(bd/quotes.ini,#,0)  { 
      if $2- isin  $readini(bd/quotes.ini,#,$ini(bd/quotes.ini,#,%a))  {  %qt = %qt $iif(%a > 1 ,|) %a  } 
      inc %a 
    }
    if %qt == $null { err La(s) Palabra(s) " $+ $2- $+ "  No fueron encontradas en ninguna quote } 
    ms La(s) Palabra(s) " $+ $2- $+ " Fueron Encontradas En Las Quotes:12 %qt
  }
  if $1 == !quoteinfo || $1 == !infoquote { 
    if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err No hay 12Quotes en el Canal  $+ # $+  }      
    if $2 !isnum || $2 < 0 || !$2 { err SintÃÂáxs: 12!Quote <Palabra(s)> } 
    ms Quote NÃÂúmero 12 $+ $2 $+  1Por 14 $+ $gettok($readini(bd/quotei.ini,#,$2),3,44) 1El Dia 14 $+ $gettok($readini(bd/quotei.ini,#,$2),1,44) 1a Las 14 $+ $gettok($readini(bd/quotei.ini,#,$2),2,44) 
  }
  ;##################################FIN QUOTES##########################################3

}
alias err { ms $iif($chr(35) isin $1,$1,#) 3ÃÂá6ERROR3! 1 $+ $iif($chr(35) isin $1,$2-,$1-) | halt } 
alias ms { 
  var %a $iif($chr(35) isin $1,$2-,$1-)
  msg $iif($chr(35) isin $1,$1,#) %a
}
alias re { return $readini(BD/ $+ $1 $+ .ini,$2,$3,$4) }
alias i { return $ini(BD/ $+ $1 $+ .ini,$2,$3) }
alias ai { if !$exist($mircdirbd) { mkdir bd  } |  writeini bd/ $+ $1 $+ .ini $2- } 
alias di { remini bd/ $+ $1 $+ .ini $2- } 

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.