Online calls a user defined stop_function, if the stop button of the toplevel widget or the scan widget is pressed. This is how the stop_function is defined:
# # the following lines are part of /online_dir/TkIrc.pl # package Spectra; $Spc::res_h{ stop_function} = \&someFuntion; sub someFunction { Util::log( "this is someFunction); }