not making real commit messages

Этот коммит содержится в:
nebula 2025-07-01 23:02:21 +00:00
родитель 66065b9cd5
Коммит 66b307276f
3 изменённых файлов: 15 добавлений и 16 удалений

6
.gitignore поставляемый
Просмотреть файл

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

Просмотреть файл

@ -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);
}
}