mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-14 03:45:11 +00:00
Suspend killers are now no more. Except the actual killers to be gone eventually. Plumbing is also very basic as of now, but it "works".
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
#include <Routes.h>
|
|
|
|
#include <Cytoplasm/Memory.h>
|
|
#include <Cytoplasm/Str.h>
|
|
|
|
#include <Matrix.h>
|
|
#include <Bot.h>
|
|
#include <AS.h>
|
|
|
|
CommandHead(CmdBanUser, cmd, argp)
|
|
{
|
|
ParseeCmdArg *args = argp;
|
|
ParseeData *data = args->data;
|
|
HashMap *event = args->event;
|
|
char *user = HashMapGet(cmd->arguments, "user");
|
|
char *room = HashMapGet(cmd->arguments, "room");
|
|
|
|
BotInitialise();
|
|
|
|
if (!user || !room)
|
|
{
|
|
BotDestroy();
|
|
return;
|
|
}
|
|
ASBan(data->config, room, user);
|
|
|
|
ReplySprintf("Banning %s from '%s'...",
|
|
user, room
|
|
);
|
|
|
|
BotDestroy();
|
|
}
|
|
CommandHead(CmdNoFlyList, cmd, argp)
|
|
{
|
|
ParseeCmdArg *args = argp;
|
|
ParseeData *data = args->data;
|
|
HashMap *event = args->event;
|
|
char *user = HashMapGet(cmd->arguments, "user");
|
|
char *reason = HashMapGet(cmd->arguments, "reason");
|
|
BotInitialise();
|
|
|
|
if (!user)
|
|
{
|
|
BotDestroy();
|
|
return;
|
|
}
|
|
|
|
ReplySprintf("Banning %s for '%s'",
|
|
user, reason ? reason : "[no reason specified]"
|
|
);
|
|
ParseeGlobalBan(data, user, reason);
|
|
|
|
BotDestroy();
|
|
}
|