using 'filter' and msging to chan on !trigger cmd - 16/12/04 04:46 PM
small example
this code will search for string in quotes.txt for string $1- and will msg to $chan first three of them.
and now my question, !quotes f0k < when someone write this, on that channel will my script msg latest three quotes including word f0k
[code]
On 1:TEXT:*:#: {
if ( !qoutes == $1 ) {
return $findtext($2-)
}
}
[code]
----> but this not work, and i dont know how to get this working
Code:
alias findtext { %i = 1 %hledat = $1- filter -fk quotes.txt findtext2 $+(*,%hledat,*) unset %i } alias findtext2 { if ( %i > 3 ) { halt } var %line = $1- msg $chan $gettok(%line,2-3,32) inc %i :konec }
this code will search for string in quotes.txt for string $1- and will msg to $chan first three of them.
and now my question, !quotes f0k < when someone write this, on that channel will my script msg latest three quotes including word f0k
[code]
On 1:TEXT:*:#: {
if ( !qoutes == $1 ) {
return $findtext($2-)
}
}
[code]
----> but this not work, and i dont know how to get this working