1
mirror of git://git.acid.vegas/archive.git synced 2024-11-21 15:46:39 +00:00

moved stuff around

This commit is contained in:
Dionysus 2023-09-12 15:47:16 -04:00
parent 4474730228
commit 997720c5d4
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
49 changed files with 10249 additions and 70 deletions

View File

@ -84,8 +84,9 @@ if __name__ == '__main__':
with open(path, 'rb') as art_file:
data = art_file.read()
enc = chardet.detect(data)['encoding']
for line in IRC2ANSI(data.decode(enc)).split('\n'):
print(line)
lines = IRC2ANSI(data.decode(enc)).split('\n')
for line in lines:
print(line + ' ' + str(len(line)))
time.sleep(0.05)
if os.path.isdir(option):

15
bots/blackhole/README.md Normal file
View File

@ -0,0 +1,15 @@
# blackhole
A bot mitigation system for the Internet Relay Chat (IRC) protocol.
###### Information
The entire blackhole system works on IRSSI connections across different boxes.
The honeypot connections will message the blackhole connection the nick of anyone who does a CTCP, DCC, INVITE, or Private Message.
The blackhole bot will kill anyone who triggers the honeypots, it will also kick anyone who masshilights or hilights a honeypot.
Honeypot nicks and hosts need to be added to the 'triggers' file and reloaded on the blackhole connection.
Make sure you do `chmod -w triggers` on the honypot's `triggers` file to prevent accidental removal of triggers.
You can change the `/timer add limit 300 /alimit` line in the blackhole startup file to `/timer add limit 300 /acslimit` to use ChanServs mode lock feature.

View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -0,0 +1,181 @@
servers = (
{ address = "localhost"; chatnet = "supernets"; port = "6697"; autoconnect = "no"; use_ssl = "yes"; ssl_cert = "~/.irssi/certs/blackhole.pem"; }
);
chatnets = {
supernets = { type = "IRC"; autosendcmd = "/^msg nickserv identify CHANGEME; wait 2000; /^oper blackhole *"; };
};
channels = (
{ name = "#christ"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#dev"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#help"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#pumpcoin"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#scroll"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#superbowl"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#tor"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#tunes"; chatnet = "supernets"; autojoin = "yes"; }
);
aliases = {
alimit = "foreach channel /limit";
acslimit = "foreach channel /cslimit";
blackhole_kick = "eval KICK $0 $1 \00308,04 E N T E R T H E V O I D \017";
blackhole_kill = "eval KILL $0 \00308,04 E N T E R T H E V O I D \017";
wc = "window close";
};
statusbar = {
items = {
barstart = "{sbstart}";
barend = "{sbend}";
topicbarstart = "{topicsbstart}";
topicbarend = "{topicsbend}";
time = "";
user = "";
window = "";
window_empty = "";
prompt = "{prompt $[.15]itemname@$tag}";
prompt_empty = "{prompt $winname}";
topic = " $topic";
topic_empty = "";
act = "";
lag = "";
more = "-- more --";
};
default = {
window = {
disabled = "yes";
type = "window";
placement = "bottom";
position = "1";
visible = "active";
items = {
barstart = { priority = "100"; };
time = { };
user = { };
window = { };
window_empty = { };
lag = { priority = "-1"; };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
};
window_inact = {
type = "window";
placement = "bottom";
position = "1";
visible = "inactive";
items = {
barstart = { priority = "100"; };
window = { };
window_empty = { };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
disabled = "yes";
};
prompt = {
type = "root";
placement = "bottom";
position = "100";
visible = "always";
items = {
prompt = { priority = "-1"; };
prompt_empty = { priority = "-1"; };
colours = { alignment = "right"; };
input = { priority = "10"; };
};
};
topic = {
type = "root";
placement = "top";
position = "1";
visible = "always";
items = {
topicbarstart = { priority = "100"; };
topic = { };
topic_empty = { };
topicbarend = { priority = "100"; alignment = "right"; };
};
};
inact = { items = { }; disabled = "yes"; };
awl_0 = {
items = {
barstart = { priority = "100"; };
awl_0 = { };
barend = { priority = "100"; alignment = "right"; };
};
};
};
};
settings = {
core = {
nick = "blackhole";
quit_message = "G-line: User has been permanently banned from this network.";
real_name = "ENTER THE VOID";
settings_autosave = "yes";
timestamp_format = "%I:%M";
user_name = "BL";
server_reconnect_time = "5min";
recode_fallback = "UTF-8";
recode_out_default_charset = "UTF-8";
recode_transliterate = "yes";
recode = "yes";
recode_autodetect_utf8 = "yes";
awaylog_level = "hilight";
awaylog_file = "~/.irssi/logs/away.log";
};
"fe-text" = { actlist_sort = "refnum"; };
"irc/core" = {
alternate_nick = "blackhole_";
channel_sync = "yes";
cmds_max_at_once = "0";
cmd_queue_speed = "0";
ctcp_version_reply = "?";
ctcp_userinfo_reply = "?";
max_ctcp_queue = "0";
part_message = "G-line: User has been permanently banned from this network.";
usermode = "+ix";
skip_motd = "yes";
ban_type = "host";
kick_first_on_kickban = "yes";
};
"irc/flood" = { flood_timecheck = "0"; flood_max_msgs = "0"; };
"fe-common/core" = {
show_names_on_join = "no";
beep_msg_level = "MSGS HILIGHT";
term_charset = "UTF-8";
max_command_history = "25";
autolog_path = "~/.irssi/logs/$tag/$0.log";
autocreate_query_level = "MSGS";
activity_hilight_level = "MSGS";
beep_when_away = "no";
beep_when_window_active = "no";
hilight_level = "PUBLIC";
};
"perl/core/scripts" = {
nickcolor_colors = "3 5 6 7 10 11 12 13 14";
awl_shared_sbar = "OFF";
awl_block = "-14";
awl_viewer = "no";
awl_prefer_name = "yes";
awl_sbar_maxlength = "yes";
chansort_autosort = "yes";
awl_mouse = "yes";
};
};
windows = { 1 = { immortal = "yes"; name = "status"; level = "ALL"; }; };
mainwindows = { 1 = { first_line = "7"; lines = "13"; }; };
logs = { };
keyboard = (
{ key = "meta-[M"; id = "command"; data = "mouse_xterm"; }
);
ignores = (
{ mask = "*!*@services.supernets.org"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets.bot"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets.link"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; }
);

View File

@ -0,0 +1,533 @@
default_color = "-1";
info_eol = "false";
replaces = { "[]=" = "%K$*%n"; "<>=" = "%K$*%n"; };
abstracts = {
line_start = "";
timestamp = "[$*]";
hilight = "%_$*%_";
error = "%R$*%n";
channel = "%_%b$*%_%w";
nick = "%_$*%_";
nickhost = "[$*]";
server = "%_$*%_";
comment = "[$*]";
reason = "{comment $*}";
mode = "{comment $*}";
channick_hilight = "%b$*%n";
chanhost_hilight = "{nickhost %b$*%n}";
channick = "%_$*%_";
chanhost = "{nickhost $*}";
channelhilight = "%b$*%n";
ban = "%c$*%n";
msgnick = "%K<%n$0$1-%K>%n %|";
ownmsgnick = "{msgnick $0 $1-}";
ownnick = "%_$*%n";
pubmsgnick = "{msgnick $0 $1-}";
pubnick = "%N$*%n";
pubmsgmenick = "{msgnick $0 $1-}";
menick = "%Y$*%n";
pubmsghinick = "{msgnick $0$1$2-%n}";
msgchannel = "%K:%c$*%n";
privmsg = "[%R$0%K(%r$1-%K)%n] ";
ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
ownprivmsgnick = "{msgnick $*}";
ownprivnick = "%_$*%n";
privmsgnick = "{msgnick %R$*%n}";
action_core = "%_ * $*%n";
action = "{action_core $*} ";
ownaction = "{action $*}";
ownaction_target = "{action_core $0}%K:%c$1%n ";
pvtaction = "%_ (*) $*%n ";
pvtaction_query = "{action $*}";
pubaction = "{action $*}";
whois = "%# $[8]0 : $1-";
ownnotice = "[%m$0%K]%n ";
notice = "[%m$*%K]%n ";
pubnotice_channel = "%K:%m$*";
pvtnotice_host = "%K(%m$*%K)";
servernotice = "%g!$*%n ";
ownctcp = "[%r$0%K(%R$1-%K)] ";
ctcp = "%g$*%n";
wallop = "%_$*%n: ";
wallop_nick = "%n$*";
wallop_action = "%_ * $*%n ";
netsplit = "%b$*%n";
netjoin = "%g$*%n";
names_prefix = "";
names_nick = "[%_$0%_$1-] ";
names_nick_op = "{names_nick $*}";
names_nick_halfop = "{names_nick $*}";
names_nick_voice = "{names_nick $*}";
names_users = "[%g$*%n]";
names_channel = "%G$*%n";
dcc = "%g$*%n";
dccfile = "%_$*%_";
dccownmsg = "[%r$0%K($1-%K)%n] ";
dccownnick = "%R$*%n";
dccownquerynick = "%_$*%n";
dccownaction = "{action $*}";
dccownaction_target = "{action_core $0}%K:%c$1%n ";
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
dccquerynick = "%G$*%n";
dccaction = "%_ (*dcc*) $*%n %|";
sb_background = "%n%w";
sb_default_bg = "%n";
sb_prompt_bg = "%n";
sb_info_bg = "%n";
sb_topic_bg = "%n";
sbstart = "";
sbend = " ";
topicsbstart = "%_[IRSSI]%_{sbstart $*}";
topicsbend = "{sbend $*}";
prompt = "[%b$*%w] ";
sb = "%K[%n$*%K]%n";
sbmode = " %c+%n$*";
sbaway = " %GzZzZ%n";
sbservertag = ":$0";
sbnickmode = "$0";
sb_act_sep = "%c$*";
sb_act_text = "%W$*";
sb_act_msg = "%c$*";
sb_act_hilight = "%Y$*";
sb_act_hilight_color = "$0$1-%n";
};
formats = {
"fe-common/irc/dcc" = {
own_dcc = "{dccownmsg dcc {dccownnick $1}}$2";
own_dcc_action = "{dccownaction_target $0 $1}$2";
own_dcc_action_query = "{dccownaction $0}$2";
own_dcc_ctcp = "{ownctcp ctcp $0}$1 $2";
dcc_msg = "{dccmsg dcc $0}$1";
action_dcc = "{dccaction $0}$1";
action_dcc_query = "{dccaction $0}$1";
own_dcc_query = "{ownmsgnick {dccownquerynick $0}}$2";
dcc_msg_query = "{privmsgnick $0}$1";
dcc_ctcp = "{dcc >>> DCC CTCP {hilight $1} received from {hilight $0}: $2}";
dcc_chat = "{dcc DCC CHAT from {nick $0} [$1 port $2]}";
dcc_chat_channel = "{dcc DCC CHAT from {nick $0} [$1 port $2] requested in channel {channel $3}}";
dcc_chat_not_found = "{dcc No DCC CHAT connection open to {nick $0}}";
dcc_chat_connected = "{dcc DCC CHAT connection with {nick $0} [$1 port $2] established}";
dcc_chat_disconnected = "{dcc DCC lost chat to {nick $0}}";
dcc_send = "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4]}";
dcc_send_channel = "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4 bytes] requested in channel {channel $5}}";
dcc_send_exists = "{dcc DCC already sending file {dccfile $0} for {nick $1}}";
dcc_send_no_route = "{dcc DCC route lost to nick {nick $0} when trying to send file {dccfile $1}}";
dcc_send_not_found = "{dcc DCC not sending file {dccfile $1} to {nick $0}}";
dcc_send_file_open_error = "{dcc DCC can't open file {dccfile $0}: $1}";
dcc_send_connected = "{dcc DCC sending file {dccfile $0} for {nick $1} [$2 port $3]}";
dcc_send_complete = "{dcc DCC sent file {dccfile $0} [{hilight $1}] for {nick $2} in {hilight $3} [{hilight $4kB/s}]}";
dcc_send_aborted = "{dcc DCC aborted sending file {dccfile $0} for {nick $1}}";
dcc_get_not_found = "{dcc DCC no file offered by {nick $0}}";
dcc_get_connected = "{dcc DCC receiving file {dccfile $0} from {nick $1} [$2 port $3]}";
dcc_get_complete = "{dcc DCC received file {dccfile $0} [$1] from {nick $2} in {hilight $3} [$4kB/s]}";
dcc_get_aborted = "{dcc DCC aborted receiving file {dccfile $0} from {nick $1}}";
dcc_get_write_error = "{dcc DCC error writing to file {dccfile $0}: {comment $1}";
dcc_unknown_ctcp = "{dcc DCC unknown ctcp {hilight $0} from {nick $1} [$2]}";
dcc_unknown_reply = "{dcc DCC unknown reply {hilight $0} from {nick $1} [$2]}";
dcc_unknown_type = "{dcc DCC unknown type {hilight $0}}";
dcc_invalid_ctcp = "{dcc DCC received CTCP {hilight $0} with invalid parameters from {nick $1}}";
dcc_connect_error = "{dcc DCC can't connect to {hilight $0} port {hilight $1}}";
dcc_cant_create = "{dcc DCC can't create file {dccfile $0}: $1}";
dcc_rejected = "{dcc DCC $0 was rejected by {nick $1} [{hilight $2}]}";
dcc_request_send = "{dcc DCC $0 request sent to {nick $1}: $2";
dcc_close = "{dcc DCC $0 close for {nick $1} [{hilight $2}]}";
dcc_lowport = "{dcc Warning: Port sent with DCC request is a lowport ({hilight $0, $1}) - this isn't normal. It is possible the address/port is faked (or maybe someone is just trying to bypass firewall)}";
dcc_list_header = "{dcc DCC connections}";
dcc_list_line_chat = "{dcc $0 $1}";
dcc_list_line_file = "{dcc $0 $1: %|$2 of $3 ($4%%) - $5kB/s - ETA $7 - $6}";
dcc_list_line_queued_send = "{dcc - $0 $2 (queued)}";
dcc_list_footer = "";
dcc_list_line_server = "{dcc $0: Port($1) - Send($2) - Chat($3) - Fserve($4)}";
dcc_server_started = "{dcc DCC SERVER started on port {hilight $0}}";
dcc_server_closed = "{dcc DCC SERVER on port {hilight $0} closed}";
};
"fe-common/irc/notifylist" = {
notify_join = "{nick $0} [$1@$2] [{hilight $3}] has joined to $4";
notify_part = "{nick $0} has left $4";
notify_away = "{nick $0} [$5] [$1@$2] [{hilight $3}] is now away: $4";
notify_unaway = "{nick $0} [$4] [$1@$2] [{hilight $3}] is now unaway";
notify_online = "On $0: {hilight $1}";
notify_offline = "Offline: $0";
notify_list = "$0: $1 $2";
notify_list_empty = "The notify list is empty";
};
"fe-common/core" = {
line_start = "{line_start}";
#line_start_irssi = "{line_start}{hilight Irssi:} ";
line_start_irssi = "";
timestamp = "{timestamp $Z} ";
servertag = "[$0] ";
daychange = "Day changed to %%d %%b %%Y";
talking_with = "You are now talking with {nick $0}";
refnum_too_low = "Window number must be greater than 1";
error_server_sticky = "Window's server is sticky and it cannot be changed without -unsticky option";
set_server_sticky = "Window's server set sticky";
unset_server_sticky = "Window's server isn't sticky anymore";
window_name_not_unique = "Window names must be unique";
window_level = "Window level is now $0";
window_set_immortal = "Window is now immortal";
window_unset_immortal = "Window isn't immortal anymore";
window_immortal_error = "Window is immortal, if you really want to close it, say /WINDOW IMMORTAL OFF";
windowlist_header = "%#Ref Name Active item Server Level";
windowlist_line = "%#$[3]0 %|$[20]1 $[15]2 $[15]3 $4";
windowlist_footer = "";
windows_layout_saved = "Layout of windows is now remembered";
windows_layout_reset = "Layout of windows reset to defaults";
window_info_header = "";
window_info_footer = "";
window_info_refnum = "%#Window : {hilight #$0}";
window_info_refnum_sticky = "%#Window : {hilight #$0 (sticky)}";
window_info_name = "%#Name : $0";
window_info_history = "%#History : $0";
window_info_immortal = "%#Immortal: yes";
window_info_size = "%#Size : $0x$1";
window_info_level = "%#Level : $0";
window_info_server = "%#Server : $0";
window_info_server_sticky = "%#Server : $0 (sticky)";
window_info_theme = "%#Theme : $0$1";
window_info_bound_items_header = "%#Bounds : {hilight Name Server tag}";
window_info_bound_item = "%# : $[!30]0 $[!15]1 $2";
window_info_bound_items_footer = "";
window_info_items_header = "%#Items : {hilight Name Server tag}";
window_info_item = "%# $[7]0: $[!30]1 $2";
window_info_items_footer = "";
looking_up = "Looking up {server $0}";
connecting = "Connecting to {server $0} [$1] port {hilight $2}";
reconnecting = "Reconnecting to {server $0} [$1] port {hilight $2} - use /RMRECONNS to abort";
connection_established = "Connection to {server $0} established";
cant_connect = "Unable to connect server {server $0} port {hilight $1} {reason $2}";
connection_lost = "Connection lost to {server $0}";
lag_disconnected = "No PONG reply from server {server $0} in $1 seconds, disconnecting";
disconnected = "Disconnected from {server $0} {reason $1}";
server_quit = "Disconnecting from server {server $0}: {reason $1}";
server_changed = "Changed to {hilight $2} server {server $1}";
unknown_server_tag = "Unknown server tag {server $0}";
no_connected_servers = "Not connected to any servers";
server_list = "{server $0}: $1:$2 ($3)";
server_lookup_list = "{server $0}: $1:$2 ($3) (connecting...)";
server_reconnect_list = "{server $0}: $1:$2 ($3) ($5 left before reconnecting)";
server_reconnect_removed = "Removed reconnection to server {server $0} port {hilight $1}";
server_reconnect_not_found = "Reconnection tag {server $0} not found";
setupserver_added = "Server {server $0} saved";
setupserver_removed = "Server {server $0} removed";
setupserver_not_found = "Server {server $0} not found";
your_nick = "Your nickname is {nick $0}";
join = "<%gJoin> {channick $0} {chanhost $1}";
part = "<%rPart> {channick $0} {chanhost $1} {reason $3}";
kick = "<%rKick> {channick $0} was kicked by {nick $2} {reason $3}";
quit = "<%rQuit> {channick $0} {chanhost $1} {reason $2}";
quit_once = "<%rQuit> {channel $3} {channick $0} {chanhost $1} {reason $2}";
invite = "{nick $0} invites you to {channel $1}";
not_invited = "You have not been invited to a channel!";
new_topic = "<%btopic> %b\"$2\"%w set by {nick $0}";
topic_unset = "Topic unset by {nick $0} on {channel $1}";
your_nick_changed = "<%bNick> You are now {nick $1}";
nick_changed = "<%bNick> {channick $0} is now {channick $1}";
talking_in = "You are now talking in {channel $0}";
not_in_channels = "You are not on any channels";
current_channel = "Current channel {channel $0}";
#names = "{names_users Users {names_channel $0}}";
names = "";
names_prefix = "%#{names_prefix $0}";
names_nick_op = "{names_nick_op $0 $1}";
names_nick_halfop = "{names_nick_halfop $0 $1}";
names_nick_voice = "{names_nick_voice $0 $1}";
names_nick = "{names_nick $0 $1}";
endofnames = "{channel $0} - Total of {hilight $1} nicks {comment {hilight $2} ops, {hilight $3} halfops, {hilight $4} voices, {hilight $5} normal}";
chanlist_header = "%#You are on the following channels:";
chanlist_line = "%#{channel $[-10]0} %|+$1 ($2): $3";
chansetup_not_found = "Channel {channel $0} not found";
chansetup_added = "Channel {channel $0} saved";
chansetup_removed = "Channel {channel $0} removed";
chansetup_header = "%#Channel Network Password Settings";
chansetup_line = "%#{channel $[15]0} %|$[10]1 $[10]2 $3";
chansetup_footer = "";
own_msg = "{ownmsgnick $2 {ownnick $0}}$1";
own_msg_channel = "{ownmsgnick $3 {ownnick $0}{msgchannel $1}}$2";
own_msg_private = "{ownprivmsg msg $0}$1";
own_msg_private_query = "{ownprivmsgnick {ownprivnick $2}}$1";
pubmsg_me = "{pubmsgmenick $2 {menick $0}}$1";
pubmsg_me_channel = "{pubmsgmenick $3 {menick $0}{msgchannel $1}}$2";
pubmsg_hilight = "{pubmsghinick $0 $3 $1}$2";
pubmsg_hilight_channel = "{pubmsghinick $0 $4 $1{msgchannel $2}}$3";
pubmsg = "{pubmsgnick $2 {pubnick \00306$0}}$1";
pubmsg_channel = "{pubmsgnick $3 {pubnick $0}{msgchannel $1}}$2";
msg_private = "{privmsg $0 $1}$2";
msg_private_query = "{privmsgnick $0}$2";
no_msgs_got = "You have not received a message from anyone yet";
no_msgs_sent = "You have not sent a message to anyone yet";
query_start = "Starting query in {server $1} with {nick $0}";
query_stop = "Closing query with {nick $0}";
no_query = "No query with {nick $0}";
query_server_changed = "Query with {nick $0} changed to server {server $1}";
hilight_header = "%#Highlights:";
hilight_line = "%#$[-4]0 $1 $2 $3$4";
hilight_footer = "";
hilight_not_found = "Highlight not found: $0";
hilight_removed = "Highlight removed: $0";
alias_added = "Alias $0 added";
alias_removed = "Alias $0 removed";
alias_not_found = "No such alias: $0";
aliaslist_header = "%#Aliases:";
aliaslist_line = "%#$[10]0 $1";
aliaslist_footer = "";
log_opened = "Log file {hilight $0} opened";
log_closed = "Log file {hilight $0} closed";
log_create_failed = "Couldn't create log file {hilight $0}: $1";
log_locked = "Log file {hilight $0} is locked, probably by another running Irssi";
log_not_open = "Log file {hilight $0} not open";
log_started = "Started logging to file {hilight $0}";
log_stopped = "Stopped logging to file {hilight $0}";
log_list_header = "%#Logs:";
log_list = "%#$0 $1: $2 $3$4$5";
log_list_footer = "";
windowlog_file = "Window LOGFILE set to $0";
windowlog_file_logging = "Can't change window's logfile while log is on";
no_away_msgs = "No new messages in awaylog";
away_msgs = "{hilight $1} new messages in awaylog:";
module_header = "%#Module Type Submodules";
module_line = "%#$[!20]0 $[7]1 $2";
module_footer = "";
module_already_loaded = "Module {hilight $0/$1} already loaded";
module_not_loaded = "Module {hilight $0/$1} is not loaded";
module_load_error = "Error loading module {hilight $0/$1}: $2";
module_invalid = "{hilight $0/$1} isn't Irssi module";
module_loaded = "Loaded module {hilight $0/$1}";
module_unloaded = "Unloaded module {hilight $0/$1}";
command_unknown = "Unknown command: $0";
command_ambiguous = "Ambiguous command: $0";
option_unknown = "Unknown option: $0";
option_ambiguous = "Ambiguous option: $0";
option_missing_arg = "Missing required argument for: $0";
not_enough_params = "Not enough parameters given";
not_connected = "Not connected to server";
not_joined = "Not joined to any channel";
chan_not_found = "Not joined to such channel";
chan_not_synced = "Channel not fully synchronized yet, try again after a while";
illegal_proto = "Command isn't designed for the chat protocol of the active server";
not_good_idea = "Doing this is not a good idea. Add -YES option to command if you really mean it";
invalid_number = "Invalid number";
invalid_time = "Invalid timestamp";
invalid_level = "Invalid message level";
invalid_size = "Invalid size";
invalid_charset = "Invalid charset: $0";
eval_max_recurse = "/eval hit maximum recursion limit";
program_not_found = "Could not find file or file is not executable";
theme_saved = "Theme saved to $0";
theme_save_failed = "Error saving theme to $0: $1";
theme_not_found = "Theme {hilight $0} not found";
theme_changed = "Now using theme {hilight $0} ($1)";
window_theme = "Using theme {hilight $0} in this window";
window_theme_default = "No theme is set for this window";
window_theme_changed = "Now using theme {hilight $0} ($1) in this window";
window_theme_removed = "Removed theme from this window";
format_title = "%:[{hilight $0}] - [{hilight $1}]%:";
format_subtitle = "[{hilight $0}]";
format_item = "$0 = $1";
ignored = "Ignoring {hilight $1} from {nick $0}";
ignored_options = "Ignoring {hilight $1} from {nick $0} {comment $2}";
unignored = "Unignored {nick $0}";
ignore_not_found = "{nick $0} is not being ignored";
ignore_no_ignores = "There are no ignores";
ignore_header = "%#Ignore List:";
ignore_line = "%#$[-4]0 $1: $2 $3 $4";
ignore_footer = "";
not_channel_or_query = "The current window is not a channel or query window";
conversion_added = "Added {hilight $0}/{hilight $1} to conversion database";
conversion_removed = "Removed {hilight $0} from conversion database";
conversion_not_found = "{hilight $0} not found in conversion database";
conversion_no_translits = "Transliterations not supported in this system";
recode_header = "%#Target Character set";
recode_line = "%#%|$[!30]0 $1";
unknown_chat_protocol = "Unknown chat protocol: $0";
unknown_chatnet = "Unknown chat network: $0 (create it with /NETWORK ADD)";
not_toggle = "Value must be either ON, OFF or TOGGLE";
perl_error = "Perl error: $0";
bind_header = "%#Key Action";
bind_list = "%#$[!20]0 $1 $2";
bind_command_list = "$[!30]0 $1";
bind_footer = "";
bind_unknown_id = "Unknown bind action: $0";
config_saved = "Saved configuration to file $0";
config_reloaded = "Reloaded configuration";
config_modified = "Configuration file was modified since irssi was last started - do you want to overwrite the possible changes?";
glib_error = "{error $0} $1";
overwrite_config = "Overwrite config (y/N)?";
set_title = "[{hilight $0}]";
set_item = "$0 = $1";
set_unknown = "Unknown setting $0";
set_not_boolean = "Setting {hilight $0} isn't boolean, use /SET";
no_completions = "There's no completions";
completion_removed = "Removed completion $0";
completion_header = "%#Key Value Auto";
completion_line = "%#$[10]0 $[!40]1 $2";
completion_footer = "";
};
"fe-text" = {
lastlog_too_long = "/LASTLOG would print $0 lines. If you really want to print all these lines use -force option.";
lastlog_count = "{hilight Lastlog}: $0 lines";
lastlog_start = "{hilight Lastlog}:";
lastlog_end = "{hilight End of Lastlog}";
lastlog_separator = "--";
refnum_not_found = "Window number $0 not found";
window_too_small = "Not enough room to resize this window";
cant_hide_last = "You can't hide the last window";
cant_hide_sticky_windows = "You can't hide sticky windows (use /WINDOW STICK OFF)";
cant_show_sticky_windows = "You can't show sticky windows (use /WINDOW STICK OFF)";
window_not_sticky = "Window is not sticky";
window_set_sticky = "Window set sticky";
window_unset_sticky = "Window is not sticky anymore";
window_info_sticky = "%#Sticky : $0";
window_info_scroll = "%#Scroll : $0";
window_scroll = "Window scroll mode is now $0";
window_scroll_unknown = "Unknown scroll mode $0, must be ON, OFF or DEFAULT";
statusbar_list_header = "%#Name Type Placement Position Visible";
statusbar_list_footer = "";
statusbar_list = "%#$[30]0 $[6]1 $[9]2 $[8]3 $4";
statusbar_info_name = "%#Statusbar: {hilight $0}";
statusbar_info_type = "%#Type : $0";
statusbar_info_placement = "%#Placement: $0";
statusbar_info_position = "%#Position : $0";
statusbar_info_visible = "%#Visible : $0";
statusbar_info_item_header = "%#Items : Name Priority Alignment";
statusbar_info_item_footer = "";
statusbar_info_item_name = "%# : $[35]0 $[9]1 $2";
statusbar_not_found = "Statusbar doesn't exist: $0";
statusbar_item_not_found = "Statusbar item doesn't exist: $0";
statusbar_unknown_command = "Unknown statusbar command: $0";
statusbar_unknown_type = "Statusbar type must be 'window' or 'root'";
statusbar_unknown_placement = "Statusbar placement must be 'top' or 'bottom'";
statusbar_unknown_visibility = "Statusbar visibility must be 'always', 'active' or 'inactive'";
paste_warning = "Pasting $0 lines to $1. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.";
paste_prompt = "Hit Ctrl-K to paste, Ctrl-C to abort?";
};
"fe-common/perl" = {
script_not_found = "Script {hilight $0} not found";
script_not_loaded = "Script {hilight $0} is not loaded";
script_loaded = "Loaded script {hilight $0}";
script_unloaded = "Unloaded script {hilight $0}";
no_scripts_loaded = "No scripts are loaded";
script_list_header = "%#Loaded scripts:";
script_list_line = "%#$[!15]0 $1";
script_list_footer = "";
script_error = "{error Error in script {hilight $0}:}";
};
"fe-common/irc" = {
netsplit = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2";
netsplit_more = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2 (+$3 more, use /NETSPLIT to show all of them)";
netsplit_join = "{netjoin Netsplit} over, joins: $0";
netsplit_join_more = "{netjoin Netsplit} over, joins: $0 (+$1 more)";
no_netsplits = "There are no net splits";
netsplits_header = "%#Nick Channel Server Split server";
netsplits_line = "%#$[9]0 $[10]1 $[20]2 $3";
netsplits_footer = "";
network_added = "Network $0 saved";
network_removed = "Network $0 removed";
network_not_found = "Network $0 not found";
network_header = "%#Networks:";
network_line = "%#$0: $1";
network_footer = "";
setupserver_header = "%#Server Port Network Settings";
setupserver_line = "%#%|$[!20]0 $[5]1 $[10]2 $3";
setupserver_footer = "";
joinerror_toomany = "Cannot join to channel {channel $0} (You have joined to too many channels)";
joinerror_full = "Cannot join to channel {channel $0} (Channel is full)";
joinerror_invite = "Cannot join to channel {channel $0} (You must be invited)";
joinerror_banned = "Cannot join to channel {channel $0} (You are banned)";
joinerror_bad_key = "Cannot join to channel {channel $0} (Bad channel key)";
joinerror_bad_mask = "Cannot join to channel {channel $0} (Bad channel mask)";
joinerror_unavail = "Cannot join to channel {channel $0} (Channel is temporarily unavailable)";
joinerror_duplicate = "Channel {channel $0} already exists - cannot create it";
channel_rejoin = "Channel {channel $0} is temporarily unavailable, this is normally because of netsplits. Irssi will now automatically try to rejoin back to this channel until the join is successful. Use /RMREJOINS command if you wish to abort this.";
inviting = "Inviting {nick $0} to {channel $1}";
channel_created = "Channel {channelhilight $0} created $1";
url = "Home page for {channelhilight $0}: $1";
topic = "";
no_topic = "";
topic_info = "";
chanmode_change = "<%bMode> {mode $1} by {nick $2}";
server_chanmode_change = "<{netsplit Mode}> {mode $1} by {nick $2}";
channel_mode = "mode/{channelhilight $0} {mode $1}";
bantype = "Ban type changed to {channel $0}";
no_bans = "No bans in channel {channel $0}";
banlist = "$0 - {channel $1}: ban {ban $2}";
banlist_long = "$0 - {channel $1}: ban {ban $2} {comment by {nick $3}, $4 secs ago}";
ebanlist = "{channel $0}: ban exception {ban $1}";
ebanlist_long = "{channel $0}: ban exception {ban $1} {comment by {nick $2}, $3 secs ago}";
no_invitelist = "Invite list is empty in channel {channel $0}";
invitelist = "{channel $0}: invite {ban $1}";
invitelist_long = "{channel $0}: invite {ban $1} {comment by {nick $2}, $3 secs ago}";
no_such_channel = "{channel $0}: No such channel";
channel_synced = "Join to {channel $0} was synced in {hilight $1} secs";
usermode_change = "Mode change {mode $0} for user {nick $1}";
user_mode = "Your user mode is {mode $0}";
away = "You have been marked as being away";
unaway = "You are no longer marked as being away";
nick_away = "{nick $0} is away: $1";
no_such_nick = "{nick $0}: No such nick/channel";
nick_in_use = "Nick {nick $0} is already in use";
nick_unavailable = "Nick {nick $0} is temporarily unavailable";
your_nick_owned = "Your nick is owned by {nick $3} {comment $1@$2}";
whois = "{nick $0} {nickhost $1@$2}%:{whois ircname $3}";
whowas = "{nick $0} {nickhost $1@$2}%:{whois was $3}";
whois_idle = "{whois idle %|$1 days $2 hours $3 mins $4 secs}";
whois_idle_signon = "{whois idle %|$1 days $2 hours $3 mins $4 secs {comment signon: $5}}";
whois_server = "{whois server %|$1 {comment $2}}";
whois_oper = "{whois {hilight $1}}";
whois_modes = "{whois modes $1}";
whois_realhost = "{whois hostname $1-}";
whois_usermode = "{whois usermode $1}";
whois_channels = "{whois channels %|$1}";
whois_away = "{whois away %|$1}";
whois_special = "{whois %|$1}";
whois_extra = "{whois account %|$1}";
end_of_whois = "End of WHOIS";
end_of_whowas = "End of WHOWAS";
whois_not_found = "There is no such nick $0";
who = "%#{channelhilight $[-10]0} %|{nick $[!9]1} $[!3]2 $[!2]3 $4@$5 {comment {hilight $6}}";
end_of_who = "End of /WHO list";
own_notice = "{ownnotice notice $0}$1";
own_action = "{ownaction $0}$1";
own_action_target = "{ownaction_target $0 $2}$1";
own_ctcp = "{ownctcp ctcp $0}$1 $2";
notice_server = "{servernotice $0}$1";
notice_public = "{notice $0{pubnotice_channel $1}}$2";
notice_private = "{notice $0{pvtnotice_host $1}}$2";
action_private = "{pvtaction $0}$2";
action_private_query = "{pvtaction_query $0}$2";
action_public = "{pubaction $0}$1";
action_public_channel = "{pubaction $0{msgchannel $1}}$2";
ctcp_reply = "CTCP {hilight $0} reply from {nick $1}: $2";
ctcp_reply_channel = "CTCP {hilight $0} reply from {nick $1} in channel {channel $3}: $2";
ctcp_ping_reply = "CTCP {hilight PING} reply from {nick $0}: $1.$[-3.0]2 seconds";
ctcp_requested = "{ctcp {hilight $0} {comment $1} requested CTCP {hilight $2} from {nick $4}}: $3";
ctcp_requested_unknown = "{ctcp {hilight $0} {comment $1} requested unknown CTCP {hilight $2} from {nick $4}}: $3";
online = "Users online: {hilight $0}";
pong = "PONG received from $0: $1";
wallops = "{wallop WALLOP {wallop_nick $0}} $1";
action_wallops = "{wallop WALLOP {wallop_action $0}} $1";
kill = "You were {error killed} by {nick $0} {nickhost $1} {reason $2} {comment Path: $3}";
kill_server = "You were {error killed} by {server $0} {reason $1} {comment Path: $2}";
error = "{error ERROR} $0";
unknown_mode = "Unknown mode character $0";
default_event = "$1";
default_event_server = "[$0] $1";
silenced = "Silenced {nick $0}";
unsilenced = "Unsilenced {nick $0}";
silence_line = "{nick $0}: silence {ban $1}";
ask_oper_pass = "Operator password:";
accept_list = "Accepted users: {hilight $0}";
};
"Irssi::Script::awl" = {
awl_display_nokey = "$N $H$C$S";
awl_display_key = "$Q $H$C$S";
awl_display_nokey_visible = "%2$N $H$C$";
awl_display_key_visible = "%2$Q $H$C$S";
awl_display_nokey_active = "%1$N $H$C$S";
awl_display_key_active = "%1$Q $H$C$S";
awl_display_header = "%8$C";
awl_separator = "|";
awl_separator2 = "|";
awl_viewer_item_bg = "%0%w";
};
};

View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
use strict;
use Irssi;
use Irssi::Irc;
sub sig_sort_trigger {
return unless Irssi::settings_get_bool('chansort_autosort');
cmd_chansort();
}
sub cmd_chansort {
my(@windows);
my($minwin);
for my $win (Irssi::windows()) {
my $act = $win->{active};
my $key;
if ($act->{type} eq 'CHANNEL') {
$key = "C".$act->{server}{tag}.' '.substr($act->{visible_name}, 1);
}
elsif ($act->{type} eq 'QUERY') {
$key = "Q".$act->{server}{tag}.' '.$act->{visible_name};
}
else {
next;
}
if (!defined($minwin) || $minwin > $win->{refnum}) {
$minwin = $win->{refnum};
}
push @windows, [ lc $key, $win ];
}
for (sort {$a->[0] cmp $b->[0]} @windows) {
my($key,$win) = @$_;
my($act) = $win->{active};
$win->command("window move $minwin");
$minwin++;
}
}
Irssi::command_bind('chansort', 'cmd_chansort');
Irssi::settings_add_bool('chansort', 'chansort_autosort', 0);
Irssi::signal_add_last('window item name changed', 'sig_sort_trigger');
Irssi::signal_add_last('channel created', 'sig_sort_trigger');
Irssi::signal_add_last('query created', 'sig_sort_trigger');

View File

@ -0,0 +1,14 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
sub event_default_command {
my ($command, $server) = @_;
return if (Irssi::settings_get_bool("dispatch_unknown_commands") == 0 || !$server);
$server->send_raw($command);
Irssi::signal_stop();
}
Irssi::settings_add_bool("misc", "dispatch_unknown_commands", 1);
Irssi::signal_add_first("default command", "event_default_command");

View File

@ -0,0 +1,32 @@
use strict;
use Irssi;
use Irssi::Irc;
our $VERSION = '1.0';
our %IRSSI = (
authors => 'acidvegas',
contact => 'acidvegas@supernets.org',
name => 'Limit',
description => 'A script to limit channel users in a timed interval with timer.pl usage.',
license => 'ISC',
url => 'https://github.com/acidvegas/irssi',
);
sub limit {
my ($data, $server, $channel) = @_;
my @nicklist = $channel->nicks();
my $totalnicks = scalar @nicklist;
my $limit_num = $totalnicks + 10;
$channel->command("mode +l $limit_num");
}
sub cslimit {
my ($data, $server, $channel) = @_;
my @nicklist = $channel->nicks();
my $totalnicks = scalar @nicklist;
my $limit_num = $totalnicks + 10;
$channel->command("msg chanserv mode $channel->{name} lock add +l $limit_num");
}
Irssi::command_bind('limit', 'limit');
Irssi::command_bind('cslimit', 'cslimit');

View File

@ -0,0 +1,31 @@
use strict;
use Irssi;
use Irssi::Irc;
our $VERSION = '1.0';
our %IRSSI = (
authors => 'acidvegas',
contact => 'acidvegas@supernets.org',
name => 'MassHLKick',
description => 'A script to kick people who mass hilight on a channel.',
license => 'ISC',
url => 'http://github.com/acidvegas/irssi',
);
sub sig_public {
my ($server, $msg, $nick, $address, $target) = @_;
my $count;
my $channel = $server->channel_find($target);
my $max_num_nicks=Irssi::settings_get_int('mass_hilight_threshold');
while ($msg =~ /([\]\[\\`_{|}\w^-][\]\[\\`_{|}\w\d^-]*)/g) {
if ($channel->nick_find($1)) {
$count++;
}
}
if ($count > $max_num_nicks) {
$channel->command("kick $target $nick ENTER THE VOID");
}
}
Irssi::signal_add_first('message public', 'sig_public');
Irssi::settings_add_int('misc','mass_hilight_threshold', 5);

View File

@ -0,0 +1,145 @@
use strict;
use Irssi 20020101.0250 ();
use vars qw($VERSION %IRSSI);
$VERSION = "2";
%IRSSI = (
authors => "Timo Sirainen, Ian Peters, David Leadbeater",
contact => "tss\@iki.fi",
name => "Nick Color",
description => "assign a different color for each nick",
license => "Public Domain",
url => "http://irssi.org/",
changed => "Sun 15 Jun 19:10:44 BST 2014",
);
# Settings:
# nickcolor_colors: List of color codes to use.
# e.g. /set nickcolor_colors 2 3 4 5 6 7 9 10 11 12 13
# (avoid 8, as used for hilights in the default theme).
my %saved_colors;
my %session_colors = {};
sub load_colors {
open my $color_fh, "<", "$ENV{HOME}/.irssi/saved_colors";
while (<$color_fh>) {
chomp;
my($nick, $color) = split ":";
$saved_colors{$nick} = $color;
}
}
sub save_colors {
open COLORS, ">", "$ENV{HOME}/.irssi/saved_colors";
foreach my $nick (keys %saved_colors) {
print COLORS "$nick:$saved_colors{$nick}\n";
}
close COLORS;
}
# If someone we've colored (either through the saved colors, or the hash
# function) changes their nick, we'd like to keep the same color associated
# with them (but only in the session_colors, ie a temporary mapping).
sub sig_nick {
my ($server, $newnick, $nick, $address) = @_;
my $color;
$newnick = substr ($newnick, 1) if ($newnick =~ /^:/);
if ($color = $saved_colors{$nick}) {
$session_colors{$newnick} = $color;
} elsif ($color = $session_colors{$nick}) {
$session_colors{$newnick} = $color;
}
}
# This gave reasonable distribution values when run across
# /usr/share/dict/words
sub simple_hash {
my ($string) = @_;
chomp $string;
my @chars = split //, $string;
my $counter;
foreach my $char (@chars) {
$counter += ord $char;
}
my @colors = split / /, Irssi::settings_get_str('nickcolor_colors');
$counter = $colors[$counter % @colors];
return $counter;
}
sub sig_public {
my ($server, $msg, $nick, $address, $target) = @_;
# Has the user assigned this nick a color?
my $color = $saved_colors{$nick};
# Have -we- already assigned this nick a color?
if (!$color) {
$color = $session_colors{$nick};
}
# Let's assign this nick a color
if (!$color) {
$color = simple_hash $nick;
$session_colors{$nick} = $color;
}
$color = sprintf "\003%02d", $color;
$server->command('/^format pubmsg {pubmsgnick $2 {pubnick ' . $color . '$0}}$1');
}
sub cmd_color {
my ($data, $server, $witem) = @_;
my ($op, $nick, $color) = split " ", $data;
$op = lc $op;
if (!$op) {
Irssi::print ("No operation given (save/set/clear/list/preview)");
} elsif ($op eq "save") {
save_colors;
} elsif ($op eq "set") {
if (!$nick) {
Irssi::print ("Nick not given");
} elsif (!$color) {
Irssi::print ("Color not given");
} elsif ($color < 2 || $color > 14) {
Irssi::print ("Color must be between 2 and 14 inclusive");
} else {
$saved_colors{$nick} = $color;
}
} elsif ($op eq "clear") {
if (!$nick) {
Irssi::print ("Nick not given");
} else {
delete ($saved_colors{$nick});
}
} elsif ($op eq "list") {
Irssi::print ("\nSaved Colors:");
foreach my $nick (keys %saved_colors) {
Irssi::print (chr (3) . "$saved_colors{$nick}$nick" .
chr (3) . "1 ($saved_colors{$nick})");
}
} elsif ($op eq "preview") {
Irssi::print ("\nAvailable colors:");
foreach my $i (2..14) {
Irssi::print (chr (3) . "$i" . "Color #$i");
}
}
}
load_colors;
Irssi::settings_add_str('misc', 'nickcolor_colors', '2 3 4 5 6 7 9 10 11 12 13');
Irssi::command_bind('color', 'cmd_color');
Irssi::signal_add('message public', 'sig_public');
Irssi::signal_add('event nick', 'sig_nick');

View File

@ -0,0 +1,31 @@
use Irssi;
use Irssi::Irc;
use strict;
my $delay = 1;
my $acttag = 0;
my @tags;
sub rejoin {
my ( $data ) = @_;
my ( $tag, $servtag, $channel, $pass ) = split( / +/, $data );
my $server = Irssi::server_find_tag( $servtag );
$server->send_raw( "JOIN $channel $pass" ) if ( $server );
Irssi::timeout_remove( $tags[$tag] );
}
sub event_rejoin_kick {
my ( $server, $data ) = @_;
my ( $channel, $nick ) = split( / +/, $data );
return if ( $server->{ nick } ne $nick );
my $chanrec = $server->channel_find( $channel );
my $password = $chanrec->{ key } if ( $chanrec );
my $rejoinchan = $chanrec->{ name } if ( $chanrec );
my $servtag = $server->{ tag };
Irssi::print "Rejoining $rejoinchan in $delay seconds.";
$tags[$acttag] = Irssi::timeout_add( $delay * 1000, "rejoin", "$acttag $servtag $rejoinchan $password" );
$acttag++;
$acttag = 0 if ( $acttag > 60 );
}
Irssi::signal_add('event kick', 'event_rejoin_kick');

View File

@ -0,0 +1,175 @@
# Fixes for multiple servers and window items by dg
#
# 2003-08-27 coekie:
# - use item names and server tags, fixes irssi crash if window item or server is destroyed
#
# 2003-08-19
# - changed timer stop code a bit.
# should fix the random timer o.O never happened to me before.
#
# 2002-12-21 darix:
# - nearly complete rewrite ;) the old version wasnt "use strict;" capable =)
# - still some warnings with "use warnings;"
# - use of command_runsub now :)
#
use strict;
use Data::Dumper;
use warnings;
use vars qw ($VERSION %IRSSI);
use Irssi 20020325 qw (command_bind command_runsub command timeout_add timeout_remove signal_add_first);
$VERSION = '0.6';
%IRSSI = (
authors => 'Kimmo Lehto, Marcus Rueckert',
contact => 'kimmo@a-men.org, darix@irssi.org' ,
name => 'Timer',
description => 'Provides /timer command for mIRC/BitchX type timer functionality.',
license => 'Public Domain',
changed => '2015-02-07'
);
our %timers;
# my %timer = { repeat => \d+, command => '' , windowitem => NULL , server=> NULL, timer = NULL};
sub timer_command {
my ( $name ) = @_;
if ( exists ( $timers{$name} ) ) {
if ( $timers{$name}->{'repeat'} != -1 ) {
if ( $timers{$name}->{'repeat'}-- == 0) {
cmd_timerstop( $name );
return;
}
}
my ($server, $item);
if ($timers{$name}->{'server'}) {
$server = Irssi::server_find_tag( $timers{$name}->{'server'} );
}
if ( $server ) {
if ( $timers{$name}->{'windowitem'}) {
$item = $server->window_find_item( $timers{$name}->{'windowitem'} );
}
($item ? $item : $server)->command( $timers{$name}->{'command'} );
} else {
command( $timers{$name}->{'command'} );
}
}
}
sub cmd_timerstop {
my ( $name ) = @_;
if ( exists ( $timers{$name} ) ) {
timeout_remove($timers{$name}->{'timer'});
$timers{$name} = ();
delete ( $timers{$name} );
print( CRAP "Timer \"$name\" stopped." );
}
else {
print( CRAP "\cBTimer:\cB No such timer \"$name\"." );
}
}
sub cmd_timer_help {
print ( <<EOF
TIMER LIST
TIMER ADD <name> <interval in seconds> [<repeat>] <command>
TIMER STOP <name>
repeat value of 0 means unlimited too
EOF
);
}
command_bind 'timer add' => sub {
my ( $data, $server, $item ) = @_;
my ( $name, $interval, $times, $command );
if ( $data =~ /^\s*(\w+)\s+(\d+(?:\.\d+)?)\s+(-?\d+)\s+(.*)$/ ) {
( $name, $interval, $times, $command ) = ( $1, $2, $3, $4 );
$times = -1 if ( $times == 0 );
}
elsif ( $data =~ /^\s*(\w+)\s+(\d+(?:\.\d+)?)\s+(.*)$/ )
{
( $name, $interval, $times, $command ) = ( $1, $2, -1, $3 );
}
else {
print( CRAP "\cBTimer:\cB parameters not understood. commandline was: timer add $data");
return;
};
if ( $times < -1 ) {
print( CRAP "\cBTimer:\cB repeat should be greater or equal to -1" );
return;
};
if ( $command eq "" ) {
print( CRAP "\cBTimer:\cB command is empty commandline was: timer add $data" );
return;
};
if ( exists ( $timers{$name} ) ) {
print( CRAP "\cBTimer:\cB Timer \"$name\" already active." );
}
else {
#$timers{$name} = {};
$timers{$name}->{'repeat'} = $times;
$timers{$name}->{'interval'} = $interval;
$timers{$name}->{'command'} = $command;
if ($item) {
$timers{$name}->{'windowitem'} = $item->{'name'};
}
if ($server) {
$timers{$name}->{'server'} = $server->{'tag'};
}
if ( $times == -1 ) {
$times = 'until stopped.';
}
else {
$times .= " times.";
}
print( CRAP "Starting timer \"$name\" repeating \"$command\" every $interval seconds $times" );
$timers{$name}->{'timer'} = timeout_add( $interval * 1000, \&timer_command, $name );
}
};
command_bind 'timer list' => sub {
print( CRAP "Active timers:" );
foreach my $name ( keys %timers ) {
if ( $timers{$name}->{repeat} == -1 ) {
print( CRAP "$name = $timers{$name}->{'command'} (until stopped)");
}
else {
print( CRAP "$name = $timers{$name}->{'command'} ($timers{$name}->{'repeat'} repeats left)" );
}
}
print( CRAP "End of /timer list" );
};
command_bind 'timer stop' => sub {
my ( $data, $server, $item ) = @_;
cmd_timerstop ($data);
};
command_bind 'timer help' => sub { cmd_timer_help() };
command_bind 'timer' => sub {
my ( $data, $server, $item ) = @_;
$data =~ s/\s+$//g;
command_runsub ( 'timer', $data, $server, $item ) ;
};
signal_add_first 'default command timer' => sub {
#
# gets triggered if called with unknown subcommand
#
cmd_timer_help()
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
sub cmd_unfuck {
my @windows = Irssi::windows();
foreach my $window (@windows) {
next if $window->{immortal};
$window->{active}->{topic_by} ? next : $window->destroy;
}
}
Irssi::command_bind('unfuck', 'cmd_unfuck');

View File

@ -0,0 +1,28 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
our $VERSION = '1.0';
our %IRSSI = (
authors => 'acidvegas (help from www)',
contact => 'acidvegas@supernets.org',
name => 'Voicer',
description => 'A script to auto voice anyone who joins the channel after voicer_delay seconds..',
license => 'ISC',
url => 'http://github.coM/acidvegas/irssi',
);
sub send_voice {
my ($server, $channel, $nick) = @{$_[0]};
$server->command("/mode $channel +v $nick");
}
sub event_join {
my ($server, $channel, $nick) = @_;
my $delay = Irssi::settings_get_int('voicer_delay');
Irssi::timeout_add_once( $delay * 1000, \&send_voice, [$server, $channel, $nick]);
}
Irssi::settings_add_int('misc', 'voicer_delay', 10);
Irssi::signal_add_last('message join', 'event_join');

View File

@ -0,0 +1 @@
/timer add limit 300 /alimit

View File

@ -0,0 +1,8 @@
#Triggers file version 1.0+
-privmsgs -masks 'CHANGEME1!CHAGEME1@CHANGEME1' -tags 'supernets' -command 'blackhole_kill $M'
-privmsgs -masks 'CHANGEME2!CHAGEME2@CHANGEME2' -tags 'supernets' -command 'blackhole_kill $M'
-privmsgs -masks 'CHANGEME3!CHAGEME3@CHANGEME3' -tags 'supernets' -command 'blackhole_kill $M'
-kicks -tags 'supernets' -other_masks 'CHANGEME1!CHAGEME1@CHANGEME1' -command 'blackhole_kick $C $N'
-kicks -tags 'supernets' -other_masks 'CHANGEME2!CHAGEME2@CHANGEME2' -command 'blackhole_kick $C $N'
-kicks -tags 'supernets' -other_masks 'CHANGEME3!CHAGEME3@CHANGEME3' -command 'blackhole_kick $C $N'
-publics -pubactions -pubnotices -pubctcps -nocase -tags 'supernets' -regexp '^.*(nick1|nick2|nick3).*$' -command 'blackhole_kick $C $N'

View File

@ -0,0 +1,177 @@
servers = (
{ address = "irc.supernets.org"; chatnet = "supernets"; port = "6697"; autoconnect = "no"; use_ssl = "yes"; }
);
chatnets = {
supernets = { type = "IRC"; };
};
channels = (
{ name = "#christ"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#dev"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#help"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#pumpcoin"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#scroll"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#superbowl"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#tor"; chatnet = "supernets"; autojoin = "yes"; },
{ name = "#tunes"; chatnet = "supernets"; autojoin = "yes"; }
);
aliases = {
wc = "window close";
};
statusbar = {
items = {
barstart = "{sbstart}";
barend = "{sbend}";
topicbarstart = "{topicsbstart}";
topicbarend = "{topicsbend}";
time = "";
user = "";
window = "";
window_empty = "";
prompt = "{prompt $[.15]itemname@$tag}";
prompt_empty = "{prompt $winname}";
topic = " $topic";
topic_empty = "";
act = "";
lag = "";
more = "-- more --";
};
default = {
window = {
disabled = "yes";
type = "window";
placement = "bottom";
position = "1";
visible = "active";
items = {
barstart = { priority = "100"; };
time = { };
user = { };
window = { };
window_empty = { };
lag = { priority = "-1"; };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
};
window_inact = {
type = "window";
placement = "bottom";
position = "1";
visible = "inactive";
items = {
barstart = { priority = "100"; };
window = { };
window_empty = { };
more = { priority = "-1"; alignment = "right"; };
barend = { priority = "100"; alignment = "right"; };
};
disabled = "yes";
};
prompt = {
type = "root";
placement = "bottom";
position = "100";
visible = "always";
items = {
prompt = { priority = "-1"; };
prompt_empty = { priority = "-1"; };
colours = { alignment = "right"; };
input = { priority = "10"; };
};
};
topic = {
type = "root";
placement = "top";
position = "1";
visible = "always";
items = {
topicbarstart = { priority = "100"; };
topic = { };
topic_empty = { };
topicbarend = { priority = "100"; alignment = "right"; };
};
};
inact = { items = { }; disabled = "yes"; };
awl_0 = {
items = {
barstart = { priority = "100"; };
awl_0 = { };
barend = { priority = "100"; alignment = "right"; };
};
};
};
};
settings = {
core = {
nick = "CHANGEME";
quit_message = "G-line: User has been permanently banned from this network.";
real_name = "CHANGEME";
settings_autosave = "yes";
timestamp_format = "%I:%M";
user_name = "CHANGEME";
server_reconnect_time = "5min";
recode_fallback = "UTF-8";
recode_out_default_charset = "UTF-8";
recode_transliterate = "yes";
recode = "yes";
recode_autodetect_utf8 = "yes";
awaylog_level = "hilight";
awaylog_file = "~/.irssi/logs/away.log";
};
"fe-text" = { actlist_sort = "refnum"; };
"irc/core" = {
alternate_nick = "CHANGEME";
channel_sync = "yes";
cmds_max_at_once = "0";
cmd_queue_speed = "0";
ctcp_version_reply = "?";
ctcp_userinfo_reply = "?";
max_ctcp_queue = "0";
part_message = "G-line: User has been permanently banned from this network.";
usermode = "+ix";
skip_motd = "yes";
ban_type = "host";
kick_first_on_kickban = "yes";
};
"irc/flood" = { flood_timecheck = "0"; flood_max_msgs = "0"; };
"fe-common/core" = {
show_names_on_join = "no";
beep_msg_level = "MSGS HILIGHT";
term_charset = "UTF-8";
max_command_history = "25";
autolog_path = "~/.irssi/logs/$tag/$0.log";
autocreate_query_level = "MSGS";
activity_hilight_level = "MSGS";
beep_when_away = "no";
beep_when_window_active = "no";
hilight_level = "PUBLIC";
};
"perl/core/scripts" = {
nickcolor_colors = "3 5 6 7 10 11 12 13 14";
awl_shared_sbar = "OFF";
awl_block = "-14";
awl_viewer = "no";
awl_prefer_name = "yes";
awl_sbar_maxlength = "yes";
chansort_autosort = "yes";
awl_mouse = "yes";
};
};
windows = { 1 = { immortal = "yes"; name = "status"; level = "ALL"; }; };
mainwindows = { 1 = { first_line = "7"; lines = "13"; }; };
logs = { };
keyboard = (
{ key = "meta-[M"; id = "command"; data = "mouse_xterm"; }
);
ignores = (
{ mask = "*!*@services.supernets.org"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets.bot"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; },
{ mask = "*!*@super.nets.link"; level = "CRAP MSGS PUBLICS NOTICES SNOTES CTCPS ACTIONS MODES TOPICS WALLOPS INVITES NICKS DCC DCCMSGS CLIENTNOTICES CLIENTCRAP CLIENTERRORS HILIGHTS"; servertag = "supernets"; }
);

View File

@ -0,0 +1,533 @@
default_color = "-1";
info_eol = "false";
replaces = { "[]=" = "%K$*%n"; "<>=" = "%K$*%n"; };
abstracts = {
line_start = "";
timestamp = "[$*]";
hilight = "%_$*%_";
error = "%R$*%n";
channel = "%_%b$*%_%w";
nick = "%_$*%_";
nickhost = "[$*]";
server = "%_$*%_";
comment = "[$*]";
reason = "{comment $*}";
mode = "{comment $*}";
channick_hilight = "%b$*%n";
chanhost_hilight = "{nickhost %b$*%n}";
channick = "%_$*%_";
chanhost = "{nickhost $*}";
channelhilight = "%b$*%n";
ban = "%c$*%n";
msgnick = "%K<%n$0$1-%K>%n %|";
ownmsgnick = "{msgnick $0 $1-}";
ownnick = "%_$*%n";
pubmsgnick = "{msgnick $0 $1-}";
pubnick = "%N$*%n";
pubmsgmenick = "{msgnick $0 $1-}";
menick = "%Y$*%n";
pubmsghinick = "{msgnick $0$1$2-%n}";
msgchannel = "%K:%c$*%n";
privmsg = "[%R$0%K(%r$1-%K)%n] ";
ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
ownprivmsgnick = "{msgnick $*}";
ownprivnick = "%_$*%n";
privmsgnick = "{msgnick %R$*%n}";
action_core = "%_ * $*%n";
action = "{action_core $*} ";
ownaction = "{action $*}";
ownaction_target = "{action_core $0}%K:%c$1%n ";
pvtaction = "%_ (*) $*%n ";
pvtaction_query = "{action $*}";
pubaction = "{action $*}";
whois = "%# $[8]0 : $1-";
ownnotice = "[%m$0%K]%n ";
notice = "[%m$*%K]%n ";
pubnotice_channel = "%K:%m$*";
pvtnotice_host = "%K(%m$*%K)";
servernotice = "%g!$*%n ";
ownctcp = "[%r$0%K(%R$1-%K)] ";
ctcp = "%g$*%n";
wallop = "%_$*%n: ";
wallop_nick = "%n$*";
wallop_action = "%_ * $*%n ";
netsplit = "%b$*%n";
netjoin = "%g$*%n";
names_prefix = "";
names_nick = "[%_$0%_$1-] ";
names_nick_op = "{names_nick $*}";
names_nick_halfop = "{names_nick $*}";
names_nick_voice = "{names_nick $*}";
names_users = "[%g$*%n]";
names_channel = "%G$*%n";
dcc = "%g$*%n";
dccfile = "%_$*%_";
dccownmsg = "[%r$0%K($1-%K)%n] ";
dccownnick = "%R$*%n";
dccownquerynick = "%_$*%n";
dccownaction = "{action $*}";
dccownaction_target = "{action_core $0}%K:%c$1%n ";
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
dccquerynick = "%G$*%n";
dccaction = "%_ (*dcc*) $*%n %|";
sb_background = "%n%w";
sb_default_bg = "%n";
sb_prompt_bg = "%n";
sb_info_bg = "%n";
sb_topic_bg = "%n";
sbstart = "";
sbend = " ";
topicsbstart = "%_[IRSSI]%_{sbstart $*}";
topicsbend = "{sbend $*}";
prompt = "[%b$*%w] ";
sb = "%K[%n$*%K]%n";
sbmode = " %c+%n$*";
sbaway = " %GzZzZ%n";
sbservertag = ":$0";
sbnickmode = "$0";
sb_act_sep = "%c$*";
sb_act_text = "%W$*";
sb_act_msg = "%c$*";
sb_act_hilight = "%Y$*";
sb_act_hilight_color = "$0$1-%n";
};
formats = {
"fe-common/irc/dcc" = {
own_dcc = "{dccownmsg dcc {dccownnick $1}}$2";
own_dcc_action = "{dccownaction_target $0 $1}$2";
own_dcc_action_query = "{dccownaction $0}$2";
own_dcc_ctcp = "{ownctcp ctcp $0}$1 $2";
dcc_msg = "{dccmsg dcc $0}$1";
action_dcc = "{dccaction $0}$1";
action_dcc_query = "{dccaction $0}$1";
own_dcc_query = "{ownmsgnick {dccownquerynick $0}}$2";
dcc_msg_query = "{privmsgnick $0}$1";
dcc_ctcp = "{dcc >>> DCC CTCP {hilight $1} received from {hilight $0}: $2}";
dcc_chat = "{dcc DCC CHAT from {nick $0} [$1 port $2]}";
dcc_chat_channel = "{dcc DCC CHAT from {nick $0} [$1 port $2] requested in channel {channel $3}}";
dcc_chat_not_found = "{dcc No DCC CHAT connection open to {nick $0}}";
dcc_chat_connected = "{dcc DCC CHAT connection with {nick $0} [$1 port $2] established}";
dcc_chat_disconnected = "{dcc DCC lost chat to {nick $0}}";
dcc_send = "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4]}";
dcc_send_channel = "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4 bytes] requested in channel {channel $5}}";
dcc_send_exists = "{dcc DCC already sending file {dccfile $0} for {nick $1}}";
dcc_send_no_route = "{dcc DCC route lost to nick {nick $0} when trying to send file {dccfile $1}}";
dcc_send_not_found = "{dcc DCC not sending file {dccfile $1} to {nick $0}}";
dcc_send_file_open_error = "{dcc DCC can't open file {dccfile $0}: $1}";
dcc_send_connected = "{dcc DCC sending file {dccfile $0} for {nick $1} [$2 port $3]}";
dcc_send_complete = "{dcc DCC sent file {dccfile $0} [{hilight $1}] for {nick $2} in {hilight $3} [{hilight $4kB/s}]}";
dcc_send_aborted = "{dcc DCC aborted sending file {dccfile $0} for {nick $1}}";
dcc_get_not_found = "{dcc DCC no file offered by {nick $0}}";
dcc_get_connected = "{dcc DCC receiving file {dccfile $0} from {nick $1} [$2 port $3]}";
dcc_get_complete = "{dcc DCC received file {dccfile $0} [$1] from {nick $2} in {hilight $3} [$4kB/s]}";
dcc_get_aborted = "{dcc DCC aborted receiving file {dccfile $0} from {nick $1}}";
dcc_get_write_error = "{dcc DCC error writing to file {dccfile $0}: {comment $1}";
dcc_unknown_ctcp = "{dcc DCC unknown ctcp {hilight $0} from {nick $1} [$2]}";
dcc_unknown_reply = "{dcc DCC unknown reply {hilight $0} from {nick $1} [$2]}";
dcc_unknown_type = "{dcc DCC unknown type {hilight $0}}";
dcc_invalid_ctcp = "{dcc DCC received CTCP {hilight $0} with invalid parameters from {nick $1}}";
dcc_connect_error = "{dcc DCC can't connect to {hilight $0} port {hilight $1}}";
dcc_cant_create = "{dcc DCC can't create file {dccfile $0}: $1}";
dcc_rejected = "{dcc DCC $0 was rejected by {nick $1} [{hilight $2}]}";
dcc_request_send = "{dcc DCC $0 request sent to {nick $1}: $2";
dcc_close = "{dcc DCC $0 close for {nick $1} [{hilight $2}]}";
dcc_lowport = "{dcc Warning: Port sent with DCC request is a lowport ({hilight $0, $1}) - this isn't normal. It is possible the address/port is faked (or maybe someone is just trying to bypass firewall)}";
dcc_list_header = "{dcc DCC connections}";
dcc_list_line_chat = "{dcc $0 $1}";
dcc_list_line_file = "{dcc $0 $1: %|$2 of $3 ($4%%) - $5kB/s - ETA $7 - $6}";
dcc_list_line_queued_send = "{dcc - $0 $2 (queued)}";
dcc_list_footer = "";
dcc_list_line_server = "{dcc $0: Port($1) - Send($2) - Chat($3) - Fserve($4)}";
dcc_server_started = "{dcc DCC SERVER started on port {hilight $0}}";
dcc_server_closed = "{dcc DCC SERVER on port {hilight $0} closed}";
};
"fe-common/irc/notifylist" = {
notify_join = "{nick $0} [$1@$2] [{hilight $3}] has joined to $4";
notify_part = "{nick $0} has left $4";
notify_away = "{nick $0} [$5] [$1@$2] [{hilight $3}] is now away: $4";
notify_unaway = "{nick $0} [$4] [$1@$2] [{hilight $3}] is now unaway";
notify_online = "On $0: {hilight $1}";
notify_offline = "Offline: $0";
notify_list = "$0: $1 $2";
notify_list_empty = "The notify list is empty";
};
"fe-common/core" = {
line_start = "{line_start}";
#line_start_irssi = "{line_start}{hilight Irssi:} ";
line_start_irssi = "";
timestamp = "{timestamp $Z} ";
servertag = "[$0] ";
daychange = "Day changed to %%d %%b %%Y";
talking_with = "You are now talking with {nick $0}";
refnum_too_low = "Window number must be greater than 1";
error_server_sticky = "Window's server is sticky and it cannot be changed without -unsticky option";
set_server_sticky = "Window's server set sticky";
unset_server_sticky = "Window's server isn't sticky anymore";
window_name_not_unique = "Window names must be unique";
window_level = "Window level is now $0";
window_set_immortal = "Window is now immortal";
window_unset_immortal = "Window isn't immortal anymore";
window_immortal_error = "Window is immortal, if you really want to close it, say /WINDOW IMMORTAL OFF";
windowlist_header = "%#Ref Name Active item Server Level";
windowlist_line = "%#$[3]0 %|$[20]1 $[15]2 $[15]3 $4";
windowlist_footer = "";
windows_layout_saved = "Layout of windows is now remembered";
windows_layout_reset = "Layout of windows reset to defaults";
window_info_header = "";
window_info_footer = "";
window_info_refnum = "%#Window : {hilight #$0}";
window_info_refnum_sticky = "%#Window : {hilight #$0 (sticky)}";
window_info_name = "%#Name : $0";
window_info_history = "%#History : $0";
window_info_immortal = "%#Immortal: yes";
window_info_size = "%#Size : $0x$1";
window_info_level = "%#Level : $0";
window_info_server = "%#Server : $0";
window_info_server_sticky = "%#Server : $0 (sticky)";
window_info_theme = "%#Theme : $0$1";
window_info_bound_items_header = "%#Bounds : {hilight Name Server tag}";
window_info_bound_item = "%# : $[!30]0 $[!15]1 $2";
window_info_bound_items_footer = "";
window_info_items_header = "%#Items : {hilight Name Server tag}";
window_info_item = "%# $[7]0: $[!30]1 $2";
window_info_items_footer = "";
looking_up = "Looking up {server $0}";
connecting = "Connecting to {server $0} [$1] port {hilight $2}";
reconnecting = "Reconnecting to {server $0} [$1] port {hilight $2} - use /RMRECONNS to abort";
connection_established = "Connection to {server $0} established";
cant_connect = "Unable to connect server {server $0} port {hilight $1} {reason $2}";
connection_lost = "Connection lost to {server $0}";
lag_disconnected = "No PONG reply from server {server $0} in $1 seconds, disconnecting";
disconnected = "Disconnected from {server $0} {reason $1}";
server_quit = "Disconnecting from server {server $0}: {reason $1}";
server_changed = "Changed to {hilight $2} server {server $1}";
unknown_server_tag = "Unknown server tag {server $0}";
no_connected_servers = "Not connected to any servers";
server_list = "{server $0}: $1:$2 ($3)";
server_lookup_list = "{server $0}: $1:$2 ($3) (connecting...)";
server_reconnect_list = "{server $0}: $1:$2 ($3) ($5 left before reconnecting)";
server_reconnect_removed = "Removed reconnection to server {server $0} port {hilight $1}";
server_reconnect_not_found = "Reconnection tag {server $0} not found";
setupserver_added = "Server {server $0} saved";
setupserver_removed = "Server {server $0} removed";
setupserver_not_found = "Server {server $0} not found";
your_nick = "Your nickname is {nick $0}";
join = "<%gJoin> {channick $0} {chanhost $1}";
part = "<%rPart> {channick $0} {chanhost $1} {reason $3}";
kick = "<%rKick> {channick $0} was kicked by {nick $2} {reason $3}";
quit = "<%rQuit> {channick $0} {chanhost $1} {reason $2}";
quit_once = "<%rQuit> {channel $3} {channick $0} {chanhost $1} {reason $2}";
invite = "{nick $0} invites you to {channel $1}";
not_invited = "You have not been invited to a channel!";
new_topic = "<%btopic> %b\"$2\"%w set by {nick $0}";
topic_unset = "Topic unset by {nick $0} on {channel $1}";
your_nick_changed = "<%bNick> You are now {nick $1}";
nick_changed = "<%bNick> {channick $0} is now {channick $1}";
talking_in = "You are now talking in {channel $0}";
not_in_channels = "You are not on any channels";
current_channel = "Current channel {channel $0}";
#names = "{names_users Users {names_channel $0}}";
names = "";
names_prefix = "%#{names_prefix $0}";
names_nick_op = "{names_nick_op $0 $1}";
names_nick_halfop = "{names_nick_halfop $0 $1}";
names_nick_voice = "{names_nick_voice $0 $1}";
names_nick = "{names_nick $0 $1}";
endofnames = "{channel $0} - Total of {hilight $1} nicks {comment {hilight $2} ops, {hilight $3} halfops, {hilight $4} voices, {hilight $5} normal}";
chanlist_header = "%#You are on the following channels:";
chanlist_line = "%#{channel $[-10]0} %|+$1 ($2): $3";
chansetup_not_found = "Channel {channel $0} not found";
chansetup_added = "Channel {channel $0} saved";
chansetup_removed = "Channel {channel $0} removed";
chansetup_header = "%#Channel Network Password Settings";
chansetup_line = "%#{channel $[15]0} %|$[10]1 $[10]2 $3";
chansetup_footer = "";
own_msg = "{ownmsgnick $2 {ownnick $0}}$1";
own_msg_channel = "{ownmsgnick $3 {ownnick $0}{msgchannel $1}}$2";
own_msg_private = "{ownprivmsg msg $0}$1";
own_msg_private_query = "{ownprivmsgnick {ownprivnick $2}}$1";
pubmsg_me = "{pubmsgmenick $2 {menick $0}}$1";
pubmsg_me_channel = "{pubmsgmenick $3 {menick $0}{msgchannel $1}}$2";
pubmsg_hilight = "{pubmsghinick $0 $3 $1}$2";
pubmsg_hilight_channel = "{pubmsghinick $0 $4 $1{msgchannel $2}}$3";
pubmsg = "{pubmsgnick $2 {pubnick \00306$0}}$1";
pubmsg_channel = "{pubmsgnick $3 {pubnick $0}{msgchannel $1}}$2";
msg_private = "{privmsg $0 $1}$2";
msg_private_query = "{privmsgnick $0}$2";
no_msgs_got = "You have not received a message from anyone yet";
no_msgs_sent = "You have not sent a message to anyone yet";
query_start = "Starting query in {server $1} with {nick $0}";
query_stop = "Closing query with {nick $0}";
no_query = "No query with {nick $0}";
query_server_changed = "Query with {nick $0} changed to server {server $1}";
hilight_header = "%#Highlights:";
hilight_line = "%#$[-4]0 $1 $2 $3$4";
hilight_footer = "";
hilight_not_found = "Highlight not found: $0";
hilight_removed = "Highlight removed: $0";
alias_added = "Alias $0 added";
alias_removed = "Alias $0 removed";
alias_not_found = "No such alias: $0";
aliaslist_header = "%#Aliases:";
aliaslist_line = "%#$[10]0 $1";
aliaslist_footer = "";
log_opened = "Log file {hilight $0} opened";
log_closed = "Log file {hilight $0} closed";
log_create_failed = "Couldn't create log file {hilight $0}: $1";
log_locked = "Log file {hilight $0} is locked, probably by another running Irssi";
log_not_open = "Log file {hilight $0} not open";
log_started = "Started logging to file {hilight $0}";
log_stopped = "Stopped logging to file {hilight $0}";
log_list_header = "%#Logs:";
log_list = "%#$0 $1: $2 $3$4$5";
log_list_footer = "";
windowlog_file = "Window LOGFILE set to $0";
windowlog_file_logging = "Can't change window's logfile while log is on";
no_away_msgs = "No new messages in awaylog";
away_msgs = "{hilight $1} new messages in awaylog:";
module_header = "%#Module Type Submodules";
module_line = "%#$[!20]0 $[7]1 $2";
module_footer = "";
module_already_loaded = "Module {hilight $0/$1} already loaded";
module_not_loaded = "Module {hilight $0/$1} is not loaded";
module_load_error = "Error loading module {hilight $0/$1}: $2";
module_invalid = "{hilight $0/$1} isn't Irssi module";
module_loaded = "Loaded module {hilight $0/$1}";
module_unloaded = "Unloaded module {hilight $0/$1}";
command_unknown = "Unknown command: $0";
command_ambiguous = "Ambiguous command: $0";
option_unknown = "Unknown option: $0";
option_ambiguous = "Ambiguous option: $0";
option_missing_arg = "Missing required argument for: $0";
not_enough_params = "Not enough parameters given";
not_connected = "Not connected to server";
not_joined = "Not joined to any channel";
chan_not_found = "Not joined to such channel";
chan_not_synced = "Channel not fully synchronized yet, try again after a while";
illegal_proto = "Command isn't designed for the chat protocol of the active server";
not_good_idea = "Doing this is not a good idea. Add -YES option to command if you really mean it";
invalid_number = "Invalid number";
invalid_time = "Invalid timestamp";
invalid_level = "Invalid message level";
invalid_size = "Invalid size";
invalid_charset = "Invalid charset: $0";
eval_max_recurse = "/eval hit maximum recursion limit";
program_not_found = "Could not find file or file is not executable";
theme_saved = "Theme saved to $0";
theme_save_failed = "Error saving theme to $0: $1";
theme_not_found = "Theme {hilight $0} not found";
theme_changed = "Now using theme {hilight $0} ($1)";
window_theme = "Using theme {hilight $0} in this window";
window_theme_default = "No theme is set for this window";
window_theme_changed = "Now using theme {hilight $0} ($1) in this window";
window_theme_removed = "Removed theme from this window";
format_title = "%:[{hilight $0}] - [{hilight $1}]%:";
format_subtitle = "[{hilight $0}]";
format_item = "$0 = $1";
ignored = "Ignoring {hilight $1} from {nick $0}";
ignored_options = "Ignoring {hilight $1} from {nick $0} {comment $2}";
unignored = "Unignored {nick $0}";
ignore_not_found = "{nick $0} is not being ignored";
ignore_no_ignores = "There are no ignores";
ignore_header = "%#Ignore List:";
ignore_line = "%#$[-4]0 $1: $2 $3 $4";
ignore_footer = "";
not_channel_or_query = "The current window is not a channel or query window";
conversion_added = "Added {hilight $0}/{hilight $1} to conversion database";
conversion_removed = "Removed {hilight $0} from conversion database";
conversion_not_found = "{hilight $0} not found in conversion database";
conversion_no_translits = "Transliterations not supported in this system";
recode_header = "%#Target Character set";
recode_line = "%#%|$[!30]0 $1";
unknown_chat_protocol = "Unknown chat protocol: $0";
unknown_chatnet = "Unknown chat network: $0 (create it with /NETWORK ADD)";
not_toggle = "Value must be either ON, OFF or TOGGLE";
perl_error = "Perl error: $0";
bind_header = "%#Key Action";
bind_list = "%#$[!20]0 $1 $2";
bind_command_list = "$[!30]0 $1";
bind_footer = "";
bind_unknown_id = "Unknown bind action: $0";
config_saved = "Saved configuration to file $0";
config_reloaded = "Reloaded configuration";
config_modified = "Configuration file was modified since irssi was last started - do you want to overwrite the possible changes?";
glib_error = "{error $0} $1";
overwrite_config = "Overwrite config (y/N)?";
set_title = "[{hilight $0}]";
set_item = "$0 = $1";
set_unknown = "Unknown setting $0";
set_not_boolean = "Setting {hilight $0} isn't boolean, use /SET";
no_completions = "There's no completions";
completion_removed = "Removed completion $0";
completion_header = "%#Key Value Auto";
completion_line = "%#$[10]0 $[!40]1 $2";
completion_footer = "";
};
"fe-text" = {
lastlog_too_long = "/LASTLOG would print $0 lines. If you really want to print all these lines use -force option.";
lastlog_count = "{hilight Lastlog}: $0 lines";
lastlog_start = "{hilight Lastlog}:";
lastlog_end = "{hilight End of Lastlog}";
lastlog_separator = "--";
refnum_not_found = "Window number $0 not found";
window_too_small = "Not enough room to resize this window";
cant_hide_last = "You can't hide the last window";
cant_hide_sticky_windows = "You can't hide sticky windows (use /WINDOW STICK OFF)";
cant_show_sticky_windows = "You can't show sticky windows (use /WINDOW STICK OFF)";
window_not_sticky = "Window is not sticky";
window_set_sticky = "Window set sticky";
window_unset_sticky = "Window is not sticky anymore";
window_info_sticky = "%#Sticky : $0";
window_info_scroll = "%#Scroll : $0";
window_scroll = "Window scroll mode is now $0";
window_scroll_unknown = "Unknown scroll mode $0, must be ON, OFF or DEFAULT";
statusbar_list_header = "%#Name Type Placement Position Visible";
statusbar_list_footer = "";
statusbar_list = "%#$[30]0 $[6]1 $[9]2 $[8]3 $4";
statusbar_info_name = "%#Statusbar: {hilight $0}";
statusbar_info_type = "%#Type : $0";
statusbar_info_placement = "%#Placement: $0";
statusbar_info_position = "%#Position : $0";
statusbar_info_visible = "%#Visible : $0";
statusbar_info_item_header = "%#Items : Name Priority Alignment";
statusbar_info_item_footer = "";
statusbar_info_item_name = "%# : $[35]0 $[9]1 $2";
statusbar_not_found = "Statusbar doesn't exist: $0";
statusbar_item_not_found = "Statusbar item doesn't exist: $0";
statusbar_unknown_command = "Unknown statusbar command: $0";
statusbar_unknown_type = "Statusbar type must be 'window' or 'root'";
statusbar_unknown_placement = "Statusbar placement must be 'top' or 'bottom'";
statusbar_unknown_visibility = "Statusbar visibility must be 'always', 'active' or 'inactive'";
paste_warning = "Pasting $0 lines to $1. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.";
paste_prompt = "Hit Ctrl-K to paste, Ctrl-C to abort?";
};
"fe-common/perl" = {
script_not_found = "Script {hilight $0} not found";
script_not_loaded = "Script {hilight $0} is not loaded";
script_loaded = "Loaded script {hilight $0}";
script_unloaded = "Unloaded script {hilight $0}";
no_scripts_loaded = "No scripts are loaded";
script_list_header = "%#Loaded scripts:";
script_list_line = "%#$[!15]0 $1";
script_list_footer = "";
script_error = "{error Error in script {hilight $0}:}";
};
"fe-common/irc" = {
netsplit = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2";
netsplit_more = "{netsplit Netsplit} {server $0} <-> {server $1} quits: $2 (+$3 more, use /NETSPLIT to show all of them)";
netsplit_join = "{netjoin Netsplit} over, joins: $0";
netsplit_join_more = "{netjoin Netsplit} over, joins: $0 (+$1 more)";
no_netsplits = "There are no net splits";
netsplits_header = "%#Nick Channel Server Split server";
netsplits_line = "%#$[9]0 $[10]1 $[20]2 $3";
netsplits_footer = "";
network_added = "Network $0 saved";
network_removed = "Network $0 removed";
network_not_found = "Network $0 not found";
network_header = "%#Networks:";
network_line = "%#$0: $1";
network_footer = "";
setupserver_header = "%#Server Port Network Settings";
setupserver_line = "%#%|$[!20]0 $[5]1 $[10]2 $3";
setupserver_footer = "";
joinerror_toomany = "Cannot join to channel {channel $0} (You have joined to too many channels)";
joinerror_full = "Cannot join to channel {channel $0} (Channel is full)";
joinerror_invite = "Cannot join to channel {channel $0} (You must be invited)";
joinerror_banned = "Cannot join to channel {channel $0} (You are banned)";
joinerror_bad_key = "Cannot join to channel {channel $0} (Bad channel key)";
joinerror_bad_mask = "Cannot join to channel {channel $0} (Bad channel mask)";
joinerror_unavail = "Cannot join to channel {channel $0} (Channel is temporarily unavailable)";
joinerror_duplicate = "Channel {channel $0} already exists - cannot create it";
channel_rejoin = "Channel {channel $0} is temporarily unavailable, this is normally because of netsplits. Irssi will now automatically try to rejoin back to this channel until the join is successful. Use /RMREJOINS command if you wish to abort this.";
inviting = "Inviting {nick $0} to {channel $1}";
channel_created = "Channel {channelhilight $0} created $1";
url = "Home page for {channelhilight $0}: $1";
topic = "";
no_topic = "";
topic_info = "";
chanmode_change = "<%bMode> {mode $1} by {nick $2}";
server_chanmode_change = "<{netsplit Mode}> {mode $1} by {nick $2}";
channel_mode = "mode/{channelhilight $0} {mode $1}";
bantype = "Ban type changed to {channel $0}";
no_bans = "No bans in channel {channel $0}";
banlist = "$0 - {channel $1}: ban {ban $2}";
banlist_long = "$0 - {channel $1}: ban {ban $2} {comment by {nick $3}, $4 secs ago}";
ebanlist = "{channel $0}: ban exception {ban $1}";
ebanlist_long = "{channel $0}: ban exception {ban $1} {comment by {nick $2}, $3 secs ago}";
no_invitelist = "Invite list is empty in channel {channel $0}";
invitelist = "{channel $0}: invite {ban $1}";
invitelist_long = "{channel $0}: invite {ban $1} {comment by {nick $2}, $3 secs ago}";
no_such_channel = "{channel $0}: No such channel";
channel_synced = "Join to {channel $0} was synced in {hilight $1} secs";
usermode_change = "Mode change {mode $0} for user {nick $1}";
user_mode = "Your user mode is {mode $0}";
away = "You have been marked as being away";
unaway = "You are no longer marked as being away";
nick_away = "{nick $0} is away: $1";
no_such_nick = "{nick $0}: No such nick/channel";
nick_in_use = "Nick {nick $0} is already in use";
nick_unavailable = "Nick {nick $0} is temporarily unavailable";
your_nick_owned = "Your nick is owned by {nick $3} {comment $1@$2}";
whois = "{nick $0} {nickhost $1@$2}%:{whois ircname $3}";
whowas = "{nick $0} {nickhost $1@$2}%:{whois was $3}";
whois_idle = "{whois idle %|$1 days $2 hours $3 mins $4 secs}";
whois_idle_signon = "{whois idle %|$1 days $2 hours $3 mins $4 secs {comment signon: $5}}";
whois_server = "{whois server %|$1 {comment $2}}";
whois_oper = "{whois {hilight $1}}";
whois_modes = "{whois modes $1}";
whois_realhost = "{whois hostname $1-}";
whois_usermode = "{whois usermode $1}";
whois_channels = "{whois channels %|$1}";
whois_away = "{whois away %|$1}";
whois_special = "{whois %|$1}";
whois_extra = "{whois account %|$1}";
end_of_whois = "End of WHOIS";
end_of_whowas = "End of WHOWAS";
whois_not_found = "There is no such nick $0";
who = "%#{channelhilight $[-10]0} %|{nick $[!9]1} $[!3]2 $[!2]3 $4@$5 {comment {hilight $6}}";
end_of_who = "End of /WHO list";
own_notice = "{ownnotice notice $0}$1";
own_action = "{ownaction $0}$1";
own_action_target = "{ownaction_target $0 $2}$1";
own_ctcp = "{ownctcp ctcp $0}$1 $2";
notice_server = "{servernotice $0}$1";
notice_public = "{notice $0{pubnotice_channel $1}}$2";
notice_private = "{notice $0{pvtnotice_host $1}}$2";
action_private = "{pvtaction $0}$2";
action_private_query = "{pvtaction_query $0}$2";
action_public = "{pubaction $0}$1";
action_public_channel = "{pubaction $0{msgchannel $1}}$2";
ctcp_reply = "CTCP {hilight $0} reply from {nick $1}: $2";
ctcp_reply_channel = "CTCP {hilight $0} reply from {nick $1} in channel {channel $3}: $2";
ctcp_ping_reply = "CTCP {hilight PING} reply from {nick $0}: $1.$[-3.0]2 seconds";
ctcp_requested = "{ctcp {hilight $0} {comment $1} requested CTCP {hilight $2} from {nick $4}}: $3";
ctcp_requested_unknown = "{ctcp {hilight $0} {comment $1} requested unknown CTCP {hilight $2} from {nick $4}}: $3";
online = "Users online: {hilight $0}";
pong = "PONG received from $0: $1";
wallops = "{wallop WALLOP {wallop_nick $0}} $1";
action_wallops = "{wallop WALLOP {wallop_action $0}} $1";
kill = "You were {error killed} by {nick $0} {nickhost $1} {reason $2} {comment Path: $3}";
kill_server = "You were {error killed} by {server $0} {reason $1} {comment Path: $2}";
error = "{error ERROR} $0";
unknown_mode = "Unknown mode character $0";
default_event = "$1";
default_event_server = "[$0] $1";
silenced = "Silenced {nick $0}";
unsilenced = "Unsilenced {nick $0}";
silence_line = "{nick $0}: silence {ban $1}";
ask_oper_pass = "Operator password:";
accept_list = "Accepted users: {hilight $0}";
};
"Irssi::Script::awl" = {
awl_display_nokey = "$N $H$C$S";
awl_display_key = "$Q $H$C$S";
awl_display_nokey_visible = "%2$N $H$C$";
awl_display_key_visible = "%2$Q $H$C$S";
awl_display_nokey_active = "%1$N $H$C$S";
awl_display_key_active = "%1$Q $H$C$S";
awl_display_header = "%8$C";
awl_separator = "|";
awl_separator2 = "|";
awl_viewer_item_bg = "%0%w";
};
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
use strict;
use Irssi;
use Irssi::Irc;
sub sig_sort_trigger {
return unless Irssi::settings_get_bool('chansort_autosort');
cmd_chansort();
}
sub cmd_chansort {
my(@windows);
my($minwin);
for my $win (Irssi::windows()) {
my $act = $win->{active};
my $key;
if ($act->{type} eq 'CHANNEL') {
$key = "C".$act->{server}{tag}.' '.substr($act->{visible_name}, 1);
}
elsif ($act->{type} eq 'QUERY') {
$key = "Q".$act->{server}{tag}.' '.$act->{visible_name};
}
else {
next;
}
if (!defined($minwin) || $minwin > $win->{refnum}) {
$minwin = $win->{refnum};
}
push @windows, [ lc $key, $win ];
}
for (sort {$a->[0] cmp $b->[0]} @windows) {
my($key,$win) = @$_;
my($act) = $win->{active};
$win->command("window move $minwin");
$minwin++;
}
}
Irssi::command_bind('chansort', 'cmd_chansort');
Irssi::settings_add_bool('chansort', 'chansort_autosort', 0);
Irssi::signal_add_last('window item name changed', 'sig_sort_trigger');
Irssi::signal_add_last('channel created', 'sig_sort_trigger');
Irssi::signal_add_last('query created', 'sig_sort_trigger');

View File

@ -0,0 +1,14 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
sub event_default_command {
my ($command, $server) = @_;
return if (Irssi::settings_get_bool("dispatch_unknown_commands") == 0 || !$server);
$server->send_raw($command);
Irssi::signal_stop();
}
Irssi::settings_add_bool("misc", "dispatch_unknown_commands", 1);
Irssi::signal_add_first("default command", "event_default_command");

View File

@ -0,0 +1,12 @@
use strict;
use Irssi;
Irssi::signal_add('event error', sub { Irssi::signal_stop(); });
Irssi::signal_add('event kill', sub {
my ($server, $args, $nick, $address) = @_;
my $reason = $args;
$reason =~ s/^.*://g;
Irssi::print("You were killed by $nick ($reason).");
Irssi::signal_stop();
});

View File

@ -0,0 +1,145 @@
use strict;
use Irssi 20020101.0250 ();
use vars qw($VERSION %IRSSI);
$VERSION = "2";
%IRSSI = (
authors => "Timo Sirainen, Ian Peters, David Leadbeater",
contact => "tss\@iki.fi",
name => "Nick Color",
description => "assign a different color for each nick",
license => "Public Domain",
url => "http://irssi.org/",
changed => "Sun 15 Jun 19:10:44 BST 2014",
);
# Settings:
# nickcolor_colors: List of color codes to use.
# e.g. /set nickcolor_colors 2 3 4 5 6 7 9 10 11 12 13
# (avoid 8, as used for hilights in the default theme).
my %saved_colors;
my %session_colors = {};
sub load_colors {
open my $color_fh, "<", "$ENV{HOME}/.irssi/saved_colors";
while (<$color_fh>) {
chomp;
my($nick, $color) = split ":";
$saved_colors{$nick} = $color;
}
}
sub save_colors {
open COLORS, ">", "$ENV{HOME}/.irssi/saved_colors";
foreach my $nick (keys %saved_colors) {
print COLORS "$nick:$saved_colors{$nick}\n";
}
close COLORS;
}
# If someone we've colored (either through the saved colors, or the hash
# function) changes their nick, we'd like to keep the same color associated
# with them (but only in the session_colors, ie a temporary mapping).
sub sig_nick {
my ($server, $newnick, $nick, $address) = @_;
my $color;
$newnick = substr ($newnick, 1) if ($newnick =~ /^:/);
if ($color = $saved_colors{$nick}) {
$session_colors{$newnick} = $color;
} elsif ($color = $session_colors{$nick}) {
$session_colors{$newnick} = $color;
}
}
# This gave reasonable distribution values when run across
# /usr/share/dict/words
sub simple_hash {
my ($string) = @_;
chomp $string;
my @chars = split //, $string;
my $counter;
foreach my $char (@chars) {
$counter += ord $char;
}
my @colors = split / /, Irssi::settings_get_str('nickcolor_colors');
$counter = $colors[$counter % @colors];
return $counter;
}
sub sig_public {
my ($server, $msg, $nick, $address, $target) = @_;
# Has the user assigned this nick a color?
my $color = $saved_colors{$nick};
# Have -we- already assigned this nick a color?
if (!$color) {
$color = $session_colors{$nick};
}
# Let's assign this nick a color
if (!$color) {
$color = simple_hash $nick;
$session_colors{$nick} = $color;
}
$color = sprintf "\003%02d", $color;
$server->command('/^format pubmsg {pubmsgnick $2 {pubnick ' . $color . '$0}}$1');
}
sub cmd_color {
my ($data, $server, $witem) = @_;
my ($op, $nick, $color) = split " ", $data;
$op = lc $op;
if (!$op) {
Irssi::print ("No operation given (save/set/clear/list/preview)");
} elsif ($op eq "save") {
save_colors;
} elsif ($op eq "set") {
if (!$nick) {
Irssi::print ("Nick not given");
} elsif (!$color) {
Irssi::print ("Color not given");
} elsif ($color < 2 || $color > 14) {
Irssi::print ("Color must be between 2 and 14 inclusive");
} else {
$saved_colors{$nick} = $color;
}
} elsif ($op eq "clear") {
if (!$nick) {
Irssi::print ("Nick not given");
} else {
delete ($saved_colors{$nick});
}
} elsif ($op eq "list") {
Irssi::print ("\nSaved Colors:");
foreach my $nick (keys %saved_colors) {
Irssi::print (chr (3) . "$saved_colors{$nick}$nick" .
chr (3) . "1 ($saved_colors{$nick})");
}
} elsif ($op eq "preview") {
Irssi::print ("\nAvailable colors:");
foreach my $i (2..14) {
Irssi::print (chr (3) . "$i" . "Color #$i");
}
}
}
load_colors;
Irssi::settings_add_str('misc', 'nickcolor_colors', '2 3 4 5 6 7 9 10 11 12 13');
Irssi::command_bind('color', 'cmd_color');
Irssi::signal_add('message public', 'sig_public');
Irssi::signal_add('event nick', 'sig_nick');

View File

@ -0,0 +1,31 @@
use Irssi;
use Irssi::Irc;
use strict;
my $delay = 1;
my $acttag = 0;
my @tags;
sub rejoin {
my ( $data ) = @_;
my ( $tag, $servtag, $channel, $pass ) = split( / +/, $data );
my $server = Irssi::server_find_tag( $servtag );
$server->send_raw( "JOIN $channel $pass" ) if ( $server );
Irssi::timeout_remove( $tags[$tag] );
}
sub event_rejoin_kick {
my ( $server, $data ) = @_;
my ( $channel, $nick ) = split( / +/, $data );
return if ( $server->{ nick } ne $nick );
my $chanrec = $server->channel_find( $channel );
my $password = $chanrec->{ key } if ( $chanrec );
my $rejoinchan = $chanrec->{ name } if ( $chanrec );
my $servtag = $server->{ tag };
Irssi::print "Rejoining $rejoinchan in $delay seconds.";
$tags[$acttag] = Irssi::timeout_add( $delay * 1000, "rejoin", "$acttag $servtag $rejoinchan $password" );
$acttag++;
$acttag = 0 if ( $acttag > 60 );
}
Irssi::signal_add('event kick', 'event_rejoin_kick');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
sub cmd_unfuck {
my @windows = Irssi::windows();
foreach my $window (@windows) {
next if $window->{immortal};
$window->{active}->{topic_by} ? next : $window->destroy;
}
}
Irssi::command_bind('unfuck', 'cmd_unfuck');

View File

@ -0,0 +1,2 @@
#Triggers file version 1.0+
-privmsgs -privactions -privnotices -privctcps -dcc_msgs -dcc_actions -dcc_ctcps -invites -tags 'supernets' -command 'MSG blackhole $N'

277
bots/hugecock.py Normal file
View File

@ -0,0 +1,277 @@
#!/usr/bin/env python
# HUGECOCK (as seen in #efnetnews)
# Developed by acidvegas/vap0r in Python 3
# https://github.com/acidvegas/random
# hugecock.py
'''
Patreon : https://www.patreon.com/efnetnews
Twitter : https://twitter.com/pp4l
YouTube : https://www.youtube.com/channel/UCrB3e00DBKTyVhGLrrGuhOw
'''
import os
import random
import socket
import ssl
import time
import threading
# Connection
server = 'irc.efnet.org'
port = 6667
use_ipv6 = False
use_ssl = False
vhost = None
password = None
channel = '#efnetnews'
key = None
# Identity
nickname = 'HUGECOCK'
username = 'HUGECOCK'
realname = 'HUGECOCK'
# Globals (DO NOT EDIT)
random_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'random.txt')
# Formatting Control Characters / Color Codes
bold = '\x02'
italic = '\x1D'
underline = '\x1F'
reverse = '\x16'
reset = '\x0f'
white = '00'
black = '01'
blue = '02'
green = '03'
red = '04'
brown = '05'
purple = '06'
orange = '07'
yellow = '08'
light_green = '09'
cyan = '10'
light_cyan = '11'
light_blue = '12'
pink = '13'
grey = '14'
light_grey = '15'
def debug(msg):
print(f'{get_time()} | [~] - {msg}')
def error(msg, reason=None):
if reason:
print(f'{get_time()} | [!] - {msg} ({reason})')
else:
print(f'{get_time()} | [!] - {msg}')
def get_time():
return time.strftime('%I:%M:%S')
class IRC(object):
server = server
port = port
use_ipv6 = use_ipv6
use_ssl = use_ssl
vhost = vhost
password = password
channel = channel
key = key
username = username
realname = realname
def __init__(self):
self.nickname = nickname
self.connected = False
self.last_time = 0
self.sock = None
def action(self, chan, msg):
self.sendmsg(chan, f'\x01ACTION {msg}\x01')
def color(self, msg, foreground, background=None):
if background:
return f'\x03{foreground},{background}{msg}{reset}'
else:
return f'\x03{foreground}{msg}{reset}'
def connect(self):
try:
self.create_socket()
self.sock.connect((self.server, self.port))
if self.password:
self.raw('PASS ' + self.password)
self.raw(f'USER {self.username} 0 * :{self.realname}')
self.nick(self.nickname)
except socket.error as ex:
error('Failed to connect to IRC server.', ex)
self.event_disconnect()
else:
self.listen()
def create_socket(self):
if self.use_ipv6:
self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
else:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self.vhost:
self.sock.bind((self.vhost, 0))
if self.use_ssl:
self.sock = ssl.wrap_socket(self.sock)
def event_connect(self):
self.connected = True
self.join(self.channel, self.key)
threading.Thread(target=self.loop).start()
def event_disconnect(self):
self.connected = False
self.sock.close()
time.sleep(10)
self.connect()
def event_join(self, nick, chan):
if nick.lower() == 'zardoz':
self.sendmsg(chan, nick)
self.notice(nick, f'Thank you for joining #EFNetNews, you have {0} memos waiting. Please type /server MemoServ read to check your messages.'.format(color('3', red)))
def event_kick(self, nick, chan, kicked):
if kicked == self.nickname and chan == self.channel:
time.sleep(3)
self.join(self.channel, self.key)
def event_message(self, nick, chan, msg):
if random.choice((True,False,False,False)):
if 'http://' in msg or 'https://' in msg or 'www.' in msg:
self.sendmsg(chan, underline + 'not clicking')
elif msg == 'h':
self.sendmsg(chan, 'h')
elif msg == 'pump':
self.sendmsg(chan, 'penis')
elif msg == 'penis':
self.sendmsg(chan, 'pump')
elif 'ddos' in msg:
self.sendmsg(chan, 'Dudes Drink Owl Sperm')
elif 'fag' in msg:
self.sendmsg(chan, 'i hate faggots more than i hate war in this world')
elif self.nickname in msg:
self.action(chan, '8=================================================================D')
elif msg.lower() == 'lol':
self.sendmsg(chan, 'lol')
elif msg == '%%':
self.sendmsg(chan, '%%')
elif 'supernets' in msg.lower():
self.sendmsg(chan, self.color('HAVE YOU HEARD ABOUT IRC.SUPERNETS.ORG ???', light_blue))
elif 'readerr' in msg.lower():
if random.choice((True,False)):
self.sendmsg(chan, 'can we kill ReadErr')
else:
self.sendmsg(chan, 'can we ban ReadErr')
def event_nick_in_use(self):
self.nickname = self.nickname + '_'
self.nick(self.nickname)
def event_part(self, nick, chan):
self.sendmsg(nick, 'bet u wont come back pussy')
self.sendmsg(chan, self.color('EMOPART DETECTED', red, yellow))
def event_quit(self, nick):
if time.time() - self.last_time > 15:
self.nick(nick)
self.nickname = nick
self.sendmsg(self.channel, 'GOT EEEEEm')
self.last_time = time.time()
def handle_events(self, data):
args = data.split()
if args[0] == 'PING':
self.raw('PONG ' + args[1][1:])
elif args[1] == '001':
self.event_connect()
elif args[1] == '433':
self.event_nick_in_use()
elif args[1] in ('JOIN','KICK','PART','PRIVMSG','QUIT'):
nick = args[0].split('!')[0][1:]
if nick != self.nickname:
if args[1] == 'JOIN':
chan = args[2][1:]
self.event_join(nick, chan)
elif args[1] == 'KICK':
chan = args[2]
kicked = args[3]
self.event_kick(nick, chan, kicked)
elif args[1] == 'PART':
chan = args[2]
self.event_part(nick, chan)
elif args[1] == 'PRIVMSG':
chan = args[2]
msg = data.split(f'{args[0]} PRIVMSG {chan} :')[1]
if chan != self.nickname:
self.event_message(nick, chan, msg)
elif args[1] == 'QUIT':
self.event_quit(nick)
def join(self, chan, key=None):
if key:
self.raw(f'JOIN {chan} {key}')
else:
self.raw('JOIN ' + chan)
def listen(self):
while True:
try:
data = self.sock.recv(1024).decode('utf-8')
if data:
for line in (line for line in data.split('\r\n') if line):
debug(line)
if len(line.split()) >= 2:
if line.startswith('ERROR :Closing Link:'):
raise Exception('Connection has closed.')
else:
self.handle_events(line)
else:
error('No data recieved from server.')
break
except (UnicodeDecodeError,UnicodeEncodeError):
pass
except Exception as ex:
error('Unexpected error occured.', ex)
break
self.event_disconnect()
def loop(self):
while self.connected:
try:
time.sleep(60 * random_int(20,60))
self.sendmsg(self.channel, random.choice(random_lines))
except Exception as ex:
error('Error occured in the loop!', ex)
break
def nick(self, nick):
self.raw('NICK ' + nick)
def notice(self, target, msg):
self.raw(f'NOTICE {target} :{msg}')
def part(self, chan, msg=None):
if msg:
self.raw(f'PART {chan} {msg}')
else:
self.raw('PART ' + chan)
def raw(self, msg):
self.sock.send(bytes(msg + '\r\n', 'utf-8'))
def sendmsg(self, target, msg):
self.raw(f'PRIVMSG {target} :{msg}')
# Main
if os.path.isfile(random_file):
random_lines = [line.rstrip() for line in open(random_file, mode='r', encoding='utf8', errors='replace').readlines() if line]
else:
error_exit('Missing random file!')
IRC().connect()

68
efkh.py
View File

@ -1,68 +0,0 @@
#!/usr/bin/env python
# EFKnockr Helper - Developed by acidvegas in Python (https://acid.vegas/random)
import json
_bnc = list()
_irc = list()
_unknown = list()
def _parse_data():
with open('netking.json','r') as _data_file:
for _line in _data_file:
_data = json.loads(_line)
if 'product' in _data:
if _data['product'] in ('BitlBee IRCd','psyBNC','Minbif','ShroudBNC irc-proxy'):
_bnc.append(_line)
else:
_irc.append(_line)
else:
if 'data' in _data:
if 'bitlbee' in _data['data'].lower() or 'psybnc' in _data['data'].lower() or 'shroudbnc' in _data['data'].lower():
_bnc.append(_line)
else:
if ':***' in _data['data'] or 'Looking up your hostname' in _data['data']:
_irc.append(_line)
else:
if 'PHP Notice' not in _data['data']:
if 'NOTICE' in _data['data']:
_irc.append(_line)
else:
_unknown.append(_line)
else:
_unknown.append(_line)
def _write_data():
with open('bnc.json','w') as _bnc_file:
for _line in _bnc:
_bnc_file.write(_line)
with open('irc.json','w') as _irc_file:
for _line in _irc:
_irc_file.write(_line)
with open('unknown.json','w') as _unknown_file:
for _line in _unknown:
_unknown_file.write(_line)
_parse_data()
_write_data()
print('BNC: ' + str(len(_bnc )))
print('IRC: ' + str(len(_irc )))
print('???: ' + str(len(_unknown)))
_ips = list()
def _parse_ips():
with open('irc.json','r') as _data_file:
for _line in _data_file:
_data = json.loads(_line)
_ips.append(_data['ip_str'])
def _write_ips():
with open('clean.txt','w') as _clean_file:
for _line in _ips:
_clean_file.write(_line + '\n')
_parse_ips()
_ips = sorted(set(_ips))
_write_ips()

View File

@ -0,0 +1,21 @@
# AntiFuckYou (SAJOIN Auto-Part Script)
# Developed by acidvegas in Perl
# http://github.com/acidvegas/irssi
# antifuckyou.pl
use strict;
use Irssi;
sub anti_fuckyou {
my ($server, $msg, $nick, $address, $target) = @_;
if ($msg =~ /You were forced to join.*/) {
my $rand = &getRandom();
my $server_addr = $server->{real_address};
if ($nick eq $server_addr) {
$msg =~ s/.*\W(\w)/$1/;
$server->command("PART #$msg");
}
}
}
Irssi::signal_add('message irc notice', 'anti_fuckyou');

38
scripts/irssi/fuckyou.pl Normal file
View File

@ -0,0 +1,38 @@
use strict;
use warnings;
use Irssi;
use Irssi::Irc;
sub getRandom {
my $length=5 + int(rand(21 - 5));
my @chars=('a'..'z','A'..'Z','0'..'9');
my $random_string;
foreach (1..$length) {
$random_string.=$chars[rand @chars];
}
return $random_string;
}
sub cmd_fuckyou {
my ($data, $server, $dest) = @_;
my ($nick, $amount) = split(/ +/, $data);
unless($nick && $amount) {
Irssi::print("/fuckyou <nick> <number>");
return;
}
for(1 .. $amount) {
my $rand = &getRandom();
$server->command("sajoin $nick #$rand");
}
}
sub cmd_unfuck {
my @windows = Irssi::windows();
foreach my $window (@windows) {
next if $window->{immortal};
$window->{active}->{topic_by} ? next : $window->destroy;
}
}
Irssi::command_bind('fuckyou', 'cmd_fuckyou');
Irssi::command_bind('unfuck', 'cmd_unfuck');

63
scripts/irssi/takeover.pl Normal file
View File

@ -0,0 +1,63 @@
# Takeover (IRSSI Channel Takeover Script)
# Developed by acidvegas in Perl
# http://github.com/acidvegas/irssi
# takeover.pl
# Todo:
# Detect max network modes.
# Kickban comma separated nicks.
use strict;
use Irssi;
use Irssi::Irc;
sub takeover {
my ($data, $server, $channel) = @_;
Irssi::printformat(MSGLEVEL_CLIENTCRAP, "takeover_crap", "Not connected to server."), return if (!$server or !$server->{connected});
Irssi::printformat(MSGLEVEL_CLIENTCRAP, "takeover_crap", "No active channel in window."), return if (!$channel or ($channel->{type} ne "CHANNEL"));
my $own_prefixes = $channel->{ownnick}{prefixes};
Irssi::printformat(MSGLEVEL_CLIENTCRAP, "takeover_crap", "You are not a channel operator."), return if ($own_prefixes =~ /~|&|@|%/);
my ($qops, $aops, $hops, $qcount, $acount, $hcount, $modes);
my $hostname = $channel->{ownnick}{host};
my $nicklist = $channel->nicks();
foreach my $nick ($channel->nicks()) {
next if ($nick eq $server->{nick});
if ($nick->{prefixes} =~ /~/) {
$qops .= "$nick->{nick} ";
$qcount++;
}
if ($nick->{prefixes} =~ /&/) {
$aops .= "$nick->{nick} ";
$acount++;
}
if ($nick->{halfop}) {
$hops .= "$nick->{nick} ";
$hcount++;
}
}
if ($qops) {
$modes = "q" x $qcount;
$channel->command("mode -$modes $qops");
}
if ($aops) {
$modes = "a" x $qcount;
$channel->command("mode -$modes $aops");
}
if ($hops) {
$modes = "h" x $qcount;
$channel->command("mode -$modes $hops");
}
$channel->command("deop -YES *");
$channel->command("devoice -YES *");
foreach ($channel->nicks()) {
next if ($_->{'nick'} eq $server->{nick});
$channel->command("kickban $_->{'nick'}");
}
$channel->command("ban *!*@*");
$channel->command("mode +im");
$channel->command("mode +e *!$hostname");
$channel->command("mode +I *!$hostname");
}
Irssi::theme_register(['takeover_crap', '{line_start}{hilight takeover:} $0',]);
Irssi::command_bind('takeover', 'takeover');

17
scripts/irssi/v.pl Normal file
View File

@ -0,0 +1,17 @@
use strict;
use Irssi;
# The /v command will voice everyone in the channel that doesnt have voice or higher (halfop, op, etc).
sub cmd_massvoice {
my ($data, $server, $channel) = @_;
Irssi::printformat(MSGLEVEL_CRAP, "v: Not connected to server."), return if (!$server or !$server->{connected});
Irssi::printformat(MSGLEVEL_CRAP, "v: No active channel in window."), return if (!$channel or ($channel->{type} ne "CHANNEL"));
my @nicks = $channel->nicks();
my @normal_nicks = grep { $_->{prefixes} !~ /[\~\&\@\%\+]/ } @nicks;
my @normal_nick_names = map { $_->{nick} } @normal_nicks;
my $spaced_nicks = join(" ", @normal_nick_names);
$channel->command("VOICE $spaced_nicks");
}
Irssi::command_bind('v', 'cmd_massvoice');