-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBotCommands.bas
More file actions
122 lines (100 loc) · 5.87 KB
/
BotCommands.bas
File metadata and controls
122 lines (100 loc) · 5.87 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#include once "BotCommands.bi"
#include once "StringFunctions.bi"
#ifndef unicode
#define unicode
#endif
#include once "windows.bi"
Const HelpCommand1 = "!help"
Const HelpCommand2 = "!справка"
Const HelpCommand3 = "!помощь"
Const ASCIICommand = "!покажи"
Const ChatSayTextCommand1 = "чат, скажи: "
Const ChatSayTextCommand2 = "чат, "
Const StatsCommand = "!статистика"
Const PingCommand = "."
Const UserWhoIsCommand = "!кто"
Const FenceCommand = "!з"
Const PenisCommand = "!пенис"
Const GuidCommand = "!guid"
Const TimerCommand = "!таймер"
Const JuickCommand = "!жуйк"
Const GetLogsCommand = "!история"
Const QuitCommand = "!сгинь"
Const NickCommand = "!ник"
Const JoinCommand = "!зайди"
Const PartCommand = "!выйди"
Const TopicCommand = "!тема"
Const SayCommand = "!скажи"
Const RawCommand = "!ну"
Const ExecuteCommand = "!делай"
Const PasswordCommand = "!пароль"
Const AddQuestionCommand = "!вопрос"
Const AddAnswerCommand = "!ответ"
Const QuestionListCommand = "!вопросы"
Const AnswerListCommand = "!ответы"
' Enum BotCommands
' Quit
' Nick
' Join
' Part
' Topic
' Say
' Raw
' NickservPassword
' AddQuestion
' AddAnswer
' QuestionList
' AnswerList
Function GetBotCommands( _
ByVal MessageText As WString Ptr _
)As BotCommands
If lstrcmp(MessageText, @PingCommand) = 0 Then
Return BotCommands.Ping
End If
If lstrcmp(MessageText, @HelpCommand1) = 0 Then
Return BotCommands.Help
End If
If lstrcmp(MessageText, @HelpCommand2) = 0 Then
Return BotCommands.Help
End If
If lstrcmp(MessageText, @HelpCommand3) = 0 Then
Return BotCommands.Help
End If
If StartsWith(MessageText, @AsciiCommand) Then
Return BotCommands.AsciiGraphics
End If
If StartsWith(MessageText, ChatSayTextCommand1) Then
Return BotCommands.ChooseFromTwoOptions
End If
If StartsWith(MessageText, ChatSayTextCommand2) Then
Return BotCommands.ChooseFromTwoOptions
End If
If lstrcmp(MessageText, @StatsCommand) = 0 Then
Return BotCommands.Stats
End If
If lstrcmp(MessageText, @UserWhoIsCommand) = 0 Then
Return BotCommands.UserWhoIs
End If
If StartsWith(MessageText, @TimerCommand) Then
Return BotCommands.Timer
End If
If StartsWith(MessageText, @PenisCommand) Then
Return BotCommands.Penis
End If
If StartsWith(MessageText, @ExecuteCommand) Then
Return BotCommands.Execute
End If
If lstrcmp(MessageText, @GuidCommand) = 0 Then
Return BotCommands.CreateGuid
End If
If lstrcmp(MessageText, @GetLogsCommand) = 0 Then
Return BotCommands.GetLogs
End If
If StartsWith(MessageText, @JuickCommand) Then
Return BotCommands.Execute
End If
If StartsWith(MessageText, @FenceCommand) Then
Return BotCommands.Fence
End If
Return BotCommands.None
End Function