not making real commit messages

This commit is contained in:
nebula 2025-07-01 23:02:21 +00:00
parent 66065b9cd5
commit 66b307276f
3 changed files with 15 additions and 16 deletions

6
.gitignore vendored
View File

@ -482,3 +482,9 @@ $RECYCLE.BIN/
# Vim temporary swap files # Vim temporary swap files
*.swp *.swp
lib64
lib
bin
pyvenv.cfg
data/UnaskedTriviaQuestions.json

View File

@ -66,22 +66,17 @@ public abstract class IRCBot
SendLine($"PRIVMSG {channel} :{message}"); SendLine($"PRIVMSG {channel} :{message}");
} }
public void JoinAllChannels()
{
if (Channels != null)
{
foreach (string channel in Channels)
{
JoinChannel(channel);
}
}
}
public void JoinChannel(string channel) public void JoinChannel(string channel)
{ {
SendLine($"JOIN {channel}"); SendLine($"JOIN {channel}");
} }
public void JoinChannels(string[] channels)
{
foreach (string channel in channels)
JoinChannel(channel);
}
public void PartChannel(string channel) public void PartChannel(string channel)
{ {
SendLine($"PART {channel}"); SendLine($"PART {channel}");

View File

@ -5,8 +5,8 @@ public class Cube : IRCBot
public Cube(string host, int port, string nick, string realname) : base(host, port, nick, realname) public Cube(string host, int port, string nick, string realname) : base(host, port, nick, realname)
{ {
Channels = [ string[] channels = [
"#bots" "#bots",
]; ];
(string, Action<PRIVMSG>)[] commands = [ (string, Action<PRIVMSG>)[] commands = [
@ -14,13 +14,11 @@ public class Cube : IRCBot
]; ];
HookCommands(commands); HookCommands(commands);
JoinAllChannels(); JoinChannels(channels);
} }
private void Echo(PRIVMSG privmsg) private void Echo(PRIVMSG privmsg)
{ {
SendPrivmsg(privmsg.Sender, privmsg.Body); SendPrivmsg(privmsg.Sender, privmsg.Body);
} }
} }