summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk+git@omgwallhack.org>2021-08-10 11:17:34 -0700
committerJoe Rayhawk <jrayhawk+git@omgwallhack.org>2021-08-10 11:17:34 -0700
commit7f2a7acf23d909d16551c75018d32bd5ccfea50e (patch)
treee5199c47894ba36510255992c7533f6e730c3bbe
parent8f2c2ca9eb1832900bd386f5f84449a9d121ac07 (diff)
downloadtwitchtools-7f2a7acf23d909d16551c75018d32bd5ccfea50e.tar.gz
twitchtools-7f2a7acf23d909d16551c75018d32bd5ccfea50e.zip
irssi serverevent: assorted cleanups
-rw-r--r--irssi/irssi-serverevent.pl24
1 files changed, 18 insertions, 6 deletions
diff --git a/irssi/irssi-serverevent.pl b/irssi/irssi-serverevent.pl
index 7fbbbd4..7f042d6 100644
--- a/irssi/irssi-serverevent.pl
+++ b/irssi/irssi-serverevent.pl
@@ -14,10 +14,15 @@ $VERSION="0.0.1";
sub server_notification {
my ( $server, $msg, $nick, $address ) = @_;
+ return if ( $server->{real_address} ne 'tmi.twitch.tv' );
+
+ if ( $msg =~ /^WHISPER/ ) {
+ Irssi::print( "$server->{real_address} $nick $address $msg", MSGLEVEL_HILIGHT );
+ };
+
# Irssi::print( "Address: $address ServerRealAddress: " . $server->{real_address} . " Nick: $nick Msg: $msg", MSGLEVEL_CLIENTCRAP );
return if ( $nick ne 'tmi.twitch.tv' );
- return if ( $server->{real_address} ne 'tmi.twitch.tv' );
#01:21 [twitch] -!- HOSTTARGET #masterzeals :bungmonkey 0
#01:10 [twitch] -!- HOSTTARGET #videogamegeek1970 :sohoppy 36
@@ -31,7 +36,7 @@ sub server_notification {
open( HOSTLIST, '>>', "$ENV{'HOME'}/.config/twitch/hostlist" );
unless ( -s "$ENV{'HOME'}/.config/twitch/hostlist" ) {
print( HOSTLIST "$1" );
- } else {
+ } else {
print( HOSTLIST ", $1" );
};
close( HOSTLIST );
@@ -47,10 +52,15 @@ sub server_notification {
# 03:54 [twitch] -!- WHISPER bungmonkey :Hellu
- if ( $msg =~ /^WHISPER/ ) {
- Irssi::print( "whisper $address $server->{real_address} $nick $msg", MSGLEVEL_HILIGHT );
- Irssi::print( "Address: $address ServerRealAddress: $server->{real_address} Nick: $nick Msg: $msg", MSGLEVEL_CLIENTCRAP );
- };
+# if ( $msg =~ /^CLEARCHAT/ ) {
+# Irssi::print( "CLEARCHAT: $nick $msg", MSGLEVEL_HILIGHT );
+# };
+# if ( $msg =~ /^HOSTTARGET/ ) {
+# Irssi::print( "HOSTTARGET: $nick $msg", MSGLEVEL_HILIGHT );
+# };
+# if ( $msg =~ /^WHISPER/ ) {
+# Irssi::print( "TWITCH WHISPER: $nick $msg", MSGLEVEL_HILIGHT );
+# };
# IRCv3 tags:
# 01:42 [twitch] -!- @badge-info=subscriber/32;badges=broadcaster/1,subscriber/12,premium/1;color=;display-name=BungMonkey;emotes=;flags=;id=9981e2a2-acb2-4449-942e-d6f903ae98b4;mod=0;room-id=59895482;subscriber=1;tmi-sent-ts=1581154924647;turbo=0;user-id=59895482;user-type= :bungmonkey!bungmonkey@bungmonkey.tmi.twitch.tv PRIVMSG #bungmonkey :test
@@ -60,7 +70,9 @@ sub server_notification {
# 01:50 [twitch] -!- @ban-duration=1;room-id=59895482;target-user-id=466763439;tmi-sent-ts=1581155422079 :tmi.twitch.tv CLEARCHAT #bungmonkey :feet
# 01:55 [twitch] -!- @badge-info=;badges=vip/1,premium/1;color=;display-name=BungMonkey;emote-sets=0,19194,109561,128557,137403,177895,252129,252130,252131,421521,516382,578558,793579,952211,1013037,1080649,300088375,300206305,300432482,300548761,300611550,472873131,488737509;mod=0;subscriber=0;user-type= :tmi.twitch.tv USERSTATE #bbalmung
# 01:55 [twitch] -!- @badge-info=;badges=vip/1,premium/1;color=;display-name=BungMonkey;emotes=;flags=;id=07d4dfa1-a985-4225-a880-0c2bc73d54c3;mod=0;room-id=107848476;subscriber=0;tmi-sent-ts=1581155731665;turbo=0;user-id=59895482;user-type= :bungmonkey!bungmonkey@bungmonkey.tmi.twitch.tv PRIVMSG #bbalmung :test
+ # @badges=glhf-pledge/1;color=#2E8B57;display-name=Endyas;emotes=;message-id=8;thread-id=59895482_61323112;turbo=0;user-id=61323112;user-type= :endyas!endyas@endyas.tmi.twitch.tv WHISPER bungmonkey beep-boop
+ return;
};
Irssi::signal_add_last('server event', 'server_notification');