$inputfilter - easy on INPUT

By Spoofing on Sep 19, 2010

This snippet allow very easy to control on INPUT event.
You need just edit simple txt file)..

Example, make input.txt in mIRC ($mircdir) directory and write:

Evaluting string if first word is '$'

if ($1 == $) return $($2-,2) | return $1-

Point at the end of sentence

if ($right($1-,1) isalnum) return $+($1-,.) | return $1-

Line is always with a capital letter

return $+($upper($left($1,1)),$mid($1-,2))

Nothing

return $1-

Each line is the script.

Say anything in channel...
You input: $ $time
You say: 00:00:00

Enjoy)..

alias inputfilter {
  if ($lof(input.txt) = 0) return
  var %str = $1-, %line = 0, %filter
  if ($fopen(inputfilter)) .fclose $v1
  .fopen inputfilter input.txt
  while (!$feof) {
    var %filter = $fread(inputfilter), %line = %line + 1
    if (REM * iswm %filter) || (;* iswm %filter) || (#* iswm %filter) || ($len(%filter) = 0) continue
    .alias inputfilter tokenize 32 $!1- $(|) $iif($left(%filter,1) isin $ %,return) %filter $(|) return $!result
    var %str = $inputfilter(%str)
  }
  .fclose inputfilter
  .alias inputfilter
  return %str
  :error
}
on *:INPUT:*: {
  if ($left($1,1) === $readini($mircini,text,commandchar)) && (!$ctrlenter) return
  if ($halted) return
  haltdef
  var %str = $inputfilter($1-)
  if (# ischan) var %target = $v1
  elseif ($query($active)) var %target = $v1
  elseif ($chat($mid($active,2))) var %target = $v1
  msg %target %str
}

Comments

Sign in to comment.
Sorasyn   -  Sep 20, 2010

It doesn't interfere with any scripts simply replaces the old string with the new evaluated string

 Respond  
Spoofing   -  Sep 19, 2010

not only $eval.

anything, without interfering with the scripts. only edit input.txt

 Respond  
Sorasyn   -  Sep 19, 2010
on *:INPUT:#:{ if (/* !iswm $left($1,1)) { haltdef | msg # $eval($1-,100) } }

lol

 Respond  
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.