forked from keinBot/cuffeo
typescript schmypescript
This commit is contained in:
12
src/clients/irc/nick.ts
Normal file
12
src/clients/irc/nick.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Bot, Message, User } from "../../types";
|
||||
|
||||
export default (bot: Bot) => {
|
||||
bot._cmd.set("NICK", (msg: Message) => { // Handle nick change
|
||||
const prefix: User = bot.parsePrefix(msg.prefix);
|
||||
|
||||
if(bot.server.user.has(prefix.nick))
|
||||
bot.server.user.delete(prefix.nick);
|
||||
|
||||
bot.whois(msg.params[0], true); // Force whois
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user