--------------------------------------------------------------------- (a) --------------------------------------------------------------------- signature wizard-1 { ip-proto == tcp dst-port == 6667 # That's as close as we get to saying "IRC please" payload /.*wizard.*/ event "Found a Wizard 1!" } signature wizard-2 { ip-proto == tcp src-port == 6667 # That's as close as we get to saying "IRC please" payload /.*wizard.*/ event "Found a Wizard 2!" } # Also "redef dpd_match_only_beginning=F" for this exercise. --------------------------------------------------------------------- (b) --------------------------------------------------------------------- @load irc redef IRC::hot_words += /.*wizard.*/; @load tcp @load irc --------------------------------------------------------------------- (c) --------------------------------------------------------------------- module Wizard; export { # Define a NOTICE type for our alert. redef enum Notice += { WizardFound }; # The nick name we are looking for. const wizards_nick = "wizard" &redef; } function check_for_wizard( # your args here ) { # write this function } event irc_names_info(c: connection, c_type: string, channel: string, users: string_set) { # add code here } event irc_join_message(c: connection, info_list: irc_join_list) { # add code here