-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGreet.cs
45 lines (38 loc) · 891 Bytes
/
Greet.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using MikuBot.Commands;
using MikuBot.Modules;
namespace MikuBot.ExtraPlugins
{
public class Greet : GenericModuleBase
{
public override string HelpText
{
get { return "Posts an automatic greeting when joining a channel."; }
}
public override InitialModuleStatus InitialStatus
{
get { return InitialModuleStatus.Disabled; }
}
public override BotUserLevel MinUserLevel
{
get { return BotUserLevel.Unidentified; }
}
public override string Name
{
get { return "Greet"; }
}
public override void HandleCommand(IrcCommand command, IBotContext bot)
{
if (!(command is JoinCommand))
return;
var cmd = (JoinCommand)command;
if (cmd.Sender.IsSelf)
{
bot.Writer.Msg(cmd.Channel, "♪ Miku Miku~ ♪");
}
else
{
//bot.Writer.Msg(cmd.Channel, "hi " + cmd.Sender.Nick + "! Welcome to " + cmd.Channel);
}
}
}
}