$filename: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Page created.
 
m Change of category.
 
Line 35: Line 35:
  }
  }


[[Category:Text_and_Number_Identifiers]]
[[Category:File and Directory Identifiers]]
[[Category:Identifiers]]

Latest revision as of 14:56, 29 January 2009

Returns the associated file name including path to the target of the event.

$filename

Below is a list of events that $filename is associated with:

Examples

on *:DCCSERVER:send: { 
  if (*.exe iswm $filename) { halt }
}
on *:PLAYEND: {
  echo -a The play command has finished playing $filename
}

Below is a work around for an old mIRC exploit that has since been fixed:

ctcp *:dcc send *:*: {
  if ($len($nopath($filename)) >= $calc(255 - $len($nick))) {
    linesep
    echo -ts $+($chr(3),$colour(info)) $nick $+($chr(3),$colour(highlight)) tried to send you an exploit file to crash your mIRC !
    echo -ts Stoping send connection!
    linesep
    halt
  }
}