This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from src.gamestate import GameState | |
from src.containers import DefaultUserDict | |
from src.users import User | |
from src.events import Event, event_listener | |
ADDON_ROLES: DefaultUserDict[User, set[str]] = DefaultUserDict(set) | |
@event_listener("start_game") | |
def on_start_game(evt, var, name, mode): | |
default_chances = mode.TOTEM_CHANCES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional | |
import argparse | |
import re | |
from xml.etree import ElementTree | |
import mwparserfromhell | |
from dataclasses import dataclass | |
@dataclass | |
class Check: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local version = "1.3.2" | |
hexchat.register("snotices", version, "Handle server notices") | |
-- Adjust to your preference. | |
-- The first column is either a tab name or a list of tabs. | |
-- "" means printing to the front tab. | |
local notice_tabs = | |
{ | |
{"(snotices-bans)", "^%*%*%* Notice %-%- .* added temporary .* min%. D%-Line for .*"}, | |
{"(snotices-conn)", "^%*%*%* Notice %-%- Client connecting: .*"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import re | |
import threading | |
from typing import Optional, Iterable | |
from src import config, status, channels, cats, locks | |
from src.dispatcher import MessageDispatcher | |
from src.events import event_listener, Event, EventListener | |
from src.functions import get_all_players, change_role, get_all_roles, get_main_role, get_players, get_target | |
from src.gamemodes import GameMode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import random | |
# percentage of time the machine runs (1 = 100%) | |
dutyCycle = 1 | |
# base amount of pollution generated per second while machine is running | |
basePollution = 102400 | |
# pollution reduction of muffler hatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ipmask.h" | |
#include "siphash.h" | |
#include <errno.h> | |
#include <string.h> | |
#include <arpa/inet.h> | |
union any_addr { | |
struct in_addr i4; | |
struct in6_addr i6; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# querynotif: Create system notifications for new query windows | |
# Requires Python 3.6+, tested on Python 3.6 | |
# Copyright (c) 2021 Ryan Schmidt <skizzerz@skizzerz.net> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"irc_log" : { | |
"description" : "Pipeline for parsing ZNC logs.", | |
"processors" : [ | |
{ | |
"grok" : { | |
"field" : "log.file.path", | |
"patterns" : [ | |
"/var/log/znc/%{DATA:host.user.name}/%{DATA:irc.server}/%{DATA:irc.channel}/%{DATEFMT:date1}.log" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# statusmsg.py: indicate messages sent via STATUSMSG | |
# Configurable via the /statusmsgctl command, run it for more info | |
# Parameters on statusmsg_param_* correlate to the parameters in the | |
# corresponding text events (Settings -> Text Events). Modifying | |
# the event definitions can provide additional configuration abilities. | |
# Requires Python 3.6+, tested on Python 3.6 | |
# Copyright (c) 2021 Ryan Schmidt <skizzerz@skizzerz.net> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser(description="Format scenario updates") | |
parser.add_argument("filename", help="File containing unformatted scenario update") | |
parser.add_argument("players", metavar="player", default=[], nargs="*", help="Players to populate turn order") | |
parser.add_argument("--turn", "-t", type=int, default=0, help="Current turn") | |
parser.add_argument("--weapon", type=int, default=5, help="Number of random weapons generated (2-5)") | |
parser.add_argument("--armor", type=int, default=5, help="Number of random armors generated (2-5)") |
NewerOlder