#!/user/bin/perl -w use strict; Xchat::register("get_topic","0.1","get the topic"); Xchat::hook_command("get_topic",\&get_topic); sub get_topic { Xchat::print Xchat::get_info("topic"); return Xchat::EAT_ALL; }