[_, _, DestinationKey] = string:tokens(binary_to_list(RoutingKey), "."),
Destination = decode_routing_key(DestinationKey),
Content = binary_to_list(BinContent),
- Command = #irc_command{ command = "PRIVMSG",
+ Command = #irc_command{ command = "NOTICE",
middles = [ Destination ],
trailing = Content },
irc_conn:send_command(ConnectionPid, Command),
"botsnack" ->
Choices = {"*chomp*", ":P", "yay", "meh", "\\o/"},
Index = random:uniform(size(Choices)),
- NewCommand = #irc_command{command = "PRIVMSG",
+ NewCommand = #irc_command{command = "NOTICE",
middles = [From],
trailing = element(Index, Choices)},
irc_conn:send_command(self(), NewCommand);
"random" ++ Choices ->
Response = random_choice(Choices),
- NewCommand = #irc_command{command = "PRIVMSG",
+ NewCommand = #irc_command{command = "NOTICE",
middles = [From],
trailing = Response},
irc_conn:send_command(self(), NewCommand);