mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
fix signals parser
This commit is contained in:
parent
0331970d64
commit
b05b6cde4d
@ -24,46 +24,50 @@ while (<STDIN>) {
|
|||||||
s/int \*[^,]*/intptr/g;
|
s/int \*[^,]*/intptr/g;
|
||||||
s/int [^,]*/int/g;
|
s/int [^,]*/int/g;
|
||||||
|
|
||||||
# core
|
my %map = (
|
||||||
s/CHATNET_REC[^,]*/iobject/g;
|
# core
|
||||||
s/(?<!_)SERVER_REC[^,]*/iobject/g;
|
CHATNET_REC => 'iobject',
|
||||||
s/RECONNECT_REC[^,]*/iobject/g;
|
SERVER_REC => 'iobject',
|
||||||
s/CHANNEL_REC[^,]*/iobject/g;
|
RECONNECT_REC => 'iobject',
|
||||||
s/QUERY_REC[^,]*/iobject/g;
|
CHANNEL_REC => 'iobject',
|
||||||
s/COMMAND_REC[^,]*/Irssi::Command/g;
|
QUERY_REC => 'iobject',
|
||||||
s/NICK_REC[^,]*/iobject/g;
|
COMMAND_REC => 'Irssi::Command',
|
||||||
s/LOG_REC[^,]*/Irssi::Log/g;
|
NICK_REC => 'iobject',
|
||||||
s/RAWLOG_REC[^,]*/Irssi::Rawlog/g;
|
LOG_REC => 'Irssi::Log',
|
||||||
s/IGNORE_REC[^,]*/Irssi::Ignore/g;
|
RAWLOG_REC => 'Irssi::Rawlog',
|
||||||
s/MODULE_REC[^,]*/Irssi::Module/g;
|
IGNORE_REC => 'Irssi::Ignore',
|
||||||
|
MODULE_REC => 'Irssi::Module',
|
||||||
|
|
||||||
# irc
|
# irc
|
||||||
s/BAN_REC[^,]*/Irssi::Irc::Ban/g;
|
BAN_REC => 'Irssi::Irc::Ban',
|
||||||
s/NETSPLIT_REC[^,]*/Irssi::Irc::Netsplit/g;
|
NETSPLIT_REC => 'Irssi::Irc::Netsplit',
|
||||||
s/NETSPLIT_SERVER_REC[^,]*/Irssi::Irc::Netsplitserver/g;
|
NETSPLIT_SERVER_REC => 'Irssi::Irc::Netsplitserver',
|
||||||
|
|
||||||
# irc modules
|
# irc modules
|
||||||
s/DCC_REC[^,]*/siobject/g;
|
DCC_REC => 'siobject',
|
||||||
s/AUTOIGNORE_REC[^,]*/Irssi::Irc::Autoignore/g;
|
AUTOIGNORE_REC => 'Irssi::Irc::Autoignore',
|
||||||
s/NOTIFYLIST_REC[^,]*/Irssi::Irc::Notifylist/g;
|
NOTIFYLIST_REC => 'Irssi::Irc::Notifylist',
|
||||||
s/CLIENT_REC[^,]*/Irssi::Irc::Client/g;
|
CLIENT_REC => 'Irssi::Irc::Client',
|
||||||
|
|
||||||
# fe-common
|
# fe-common
|
||||||
s/THEME_REC[^,]*/Irssi::UI::Theme/g;
|
THEME_REC => 'Irssi::UI::Theme',
|
||||||
s/KEYINFO_REC[^,]*/Irssi::UI::Keyinfo/g;
|
KEYINFO_REC => 'Irssi::UI::Keyinfo',
|
||||||
s/PROCESS_REC[^,]*/Irssi::UI::Process/g;
|
PROCESS_REC => 'Irssi::UI::Process',
|
||||||
s/TEXT_DEST_REC[^,]*/Irssi::UI::TextDest/g;
|
TEXT_DEST_REC => 'Irssi::UI::TextDest',
|
||||||
s/WINDOW_REC[^,]*/Irssi::UI::Window/g;
|
WINDOW_REC => 'Irssi::UI::Window',
|
||||||
s/WI_ITEM_REC[^,]*/iobject/g;
|
WI_ITEM_REC => 'iobject',
|
||||||
|
|
||||||
# perl
|
# perl
|
||||||
s/PERL_SCRIPT_REC[^,]*/Irssi::Script/g;
|
PERL_SCRIPT_REC => 'Irssi::Script',
|
||||||
|
);
|
||||||
|
my $k = join '|', sort { length $b <=> length $a } keys %map;
|
||||||
|
s/($k)[^,]*/$map{$1}/g;
|
||||||
|
|
||||||
s/([\w\*:]+)(,|$)/"\1"\2/g;
|
s/([\w\*:]+)(,|$)/"\1"\2/g;
|
||||||
if ($_ eq "") {
|
if ($_ eq "") {
|
||||||
print " { \"$signal\", { NULL } },\n";
|
print " { \"$signal\", { NULL } },\n";
|
||||||
} else {
|
} else {
|
||||||
print " { \"$signal\", { $_, NULL } },\n";
|
print " { \"$signal\", { $_, NULL } },\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user