RaNdY - Irc Hispano
(If there is any mistake, let me know)
on *:text:*:#:{
tokenize 32 $strip($1-)
;#####################QUOTES####################################
if $1 == !quoteadd || $1 == !addquote {
if !$2 { err Syntax: !addquote <Quote> }
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 12Quote Number:2 %nm $+ by $+ $nick $+ $+ , Syntax: !quote %nm
}
if $1 == !delquote || $1 == !quotedel {
if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err The quote list of 12 $+ # $+ is empty. }
if !$2 { err Especifique la 12Quote a Borrar. }
if $gettok($readini(bd/quotei.ini,#,$2),3,44) != $nick { err You dont are the Nick that added the 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 The quote list of 12 $+ # $+ is empty. }
ms Total de Número 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 The quote list of 12 $+ # $+ is empty. }
var %al $r(1,$i(quotes,#,0))
ms Aleatory Quote 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 The quote list of 12 $+ # $+ is empty. }
if $2 !isnum || $2 < 0 { err Syntax: 12!Quote <Number> }
ms 14( $+ $gettok($readini(bd/quotei.ini,#,$2),1,44) $+ ) Quote Number 12 $+ $2 $+ 1By 14 $+ $gettok($readini(bd/quotei.ini,#,$2),3,44) $+ : $readini(bd/quotes.ini,#,$2)
}
}
if $1 == !search.quote || $1 == !search {
if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err The quote list of 12 $+ # $+ is empty. }
if !$2 || $2 < 0 || $2 isnum { err Syntax: 12!search <word(s)> }
if $i(quotes,#,0) == 1 { err is only one 12Quote in the channel... }
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 The Word(s) " $+ $2- $+ " were not found in any quote }
ms The(s) Word(s) " $+ $2- $+ " Were founds in the Quotes:12 %qt
}
if $1 == !quoteinfo || $1 == !infoquote {
if $i(quotes,#,0) == $null || $i(quotes,#,0) == 0) { err The quote list of 12 $+ # $+ is empty. }
if $2 !isnum || $2 < 0 || !$2 { err Syntax: 12!quoteinfo <Número> }
ms Quote Number 12 $+ $2 $+ 1by 14 $+ $gettok($readini(bd/quotei.ini,#,$2),3,44) 1Day 14 $+ $gettok($readini(bd/quotei.ini,#,$2),1,44) Time 14 $+ $gettok($readini(bd/quotei.ini,#,$2),2,44)
}
;##################################END 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- }