Skip to content

Commit

Permalink
Put the hack for sending msgs to NickServ back
Browse files Browse the repository at this point in the history
It turns out some servers don't allow identification with `PASS` so we
have to send `PRIVMSG` to `NickServ` in `auto_cmds`, but we don't want
new tabs for that. So, this hack needs to stay until we implement named
command arguments and add a argument to `/cmd` for not creating tabs
(#66).
  • Loading branch information
osa1 committed Jan 14, 2018
1 parent c2f5392 commit 93fe557
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,21 @@ impl<'poll> Tiny<'poll> {
MsgSource::User {
ref serv_name,
ref nick,
} =>
(MsgTarget::User { serv_name, nick }, nick, serv_name),
} => {
let msg_target = if nick.eq_ignore_ascii_case("nickserv")
|| nick.eq_ignore_ascii_case("chanserv")
{
MsgTarget::Server {
serv_name: serv_name,
}
} else {
MsgTarget::User {
serv_name: serv_name,
nick: nick,
}
};
(msg_target, nick, serv_name)
}
}
};

Expand Down

0 comments on commit 93fe557

Please sign in to comment.