not making real commit messages
This commit is contained in:
parent
66065b9cd5
commit
66b307276f
6
.gitignore
vendored
6
.gitignore
vendored
@ -482,3 +482,9 @@ $RECYCLE.BIN/
|
||||
|
||||
# Vim temporary swap files
|
||||
*.swp
|
||||
|
||||
lib64
|
||||
lib
|
||||
bin
|
||||
pyvenv.cfg
|
||||
data/UnaskedTriviaQuestions.json
|
||||
|
17
IRCBot.cs
17
IRCBot.cs
@ -66,22 +66,17 @@ public abstract class IRCBot
|
||||
SendLine($"PRIVMSG {channel} :{message}");
|
||||
}
|
||||
|
||||
public void JoinAllChannels()
|
||||
{
|
||||
if (Channels != null)
|
||||
{
|
||||
foreach (string channel in Channels)
|
||||
{
|
||||
JoinChannel(channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void JoinChannel(string channel)
|
||||
{
|
||||
SendLine($"JOIN {channel}");
|
||||
}
|
||||
|
||||
public void JoinChannels(string[] channels)
|
||||
{
|
||||
foreach (string channel in channels)
|
||||
JoinChannel(channel);
|
||||
}
|
||||
|
||||
public void PartChannel(string channel)
|
||||
{
|
||||
SendLine($"PART {channel}");
|
||||
|
@ -5,8 +5,8 @@ public class Cube : IRCBot
|
||||
public Cube(string host, int port, string nick, string realname) : base(host, port, nick, realname)
|
||||
{
|
||||
|
||||
Channels = [
|
||||
"#bots"
|
||||
string[] channels = [
|
||||
"#bots",
|
||||
];
|
||||
|
||||
(string, Action<PRIVMSG>)[] commands = [
|
||||
@ -14,13 +14,11 @@ public class Cube : IRCBot
|
||||
];
|
||||
|
||||
HookCommands(commands);
|
||||
JoinAllChannels();
|
||||
JoinChannels(channels);
|
||||
}
|
||||
|
||||
private void Echo(PRIVMSG privmsg)
|
||||
{
|
||||
SendPrivmsg(privmsg.Sender, privmsg.Body);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user