% Goodies contains some pretty handy stuff. private variable goodies_version = "0.5.0 ALPHA"; % All on stack... define irc_Inff() { Sprintf(_NARGS - 1); irc_info(irc_target); } define irc_Info() { irc_info(irc_target); } define irc_Logf() { Sprintf(_NARGS - 1); irc_log(); } define irc_logf() { Sprintf(); irc_log(); } define irc_logu() { irc_log(); irc_update_display(); } define irc_logfu() { irc_logf(); irc_update_display(); } define extract_file(path) { variable i; i = rindex(path,'/'); !if (i) i = rindex(path,'\\'); if (i) return(substr(path, i + 1, -1)); return(path); } define extract_host(path) { variable host; (,host) = v_split(path,"@"); if (host[0]) return host; return("(unknown)"); } define extract_nick(user) { variable s; (s,) = v_split(user,"!"); return s; } % A utility function. Should be elsewhere? define extract_first_word(line) { variable f; (f, ) = v_split(line, " "); return f; } irc_Logf("[Goodies] Version %s loaded.", goodies_version); irc_update_display();