diff options
author | Joe Rayhawk <jrayhawk+git@omgwallhack.org> | 2020-10-25 00:11:58 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk+git@omgwallhack.org> | 2020-10-25 00:11:58 -0700 |
commit | a2e264da6f4ff910b10dfb79eebb39def0967502 (patch) | |
tree | 43c905b3673a31f4c0b23a0338a45bb26a500295 | |
parent | ad7a8b7b0520e59148c83daa46633463d8712fda (diff) | |
download | twitchtools-a2e264da6f4ff910b10dfb79eebb39def0967502.tar.gz twitchtools-a2e264da6f4ff910b10dfb79eebb39def0967502.zip |
ircobsbridge: extensive changes
-rw-r--r-- | ircobsbridge.rb | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/ircobsbridge.rb b/ircobsbridge.rb index 3b7bf74..78caf61 100644 --- a/ircobsbridge.rb +++ b/ircobsbridge.rb @@ -180,7 +180,7 @@ ircsocketwrite( sprintf( "| %s BEST: rating: %i, rank: %i, roundkills: %i, rang # highest 'Kills' 'KillDeathRatio' & percentile 'Wins'/'WinPoints'/'WinRatio'/percentile 'RoundMostKills' 'RoundsPlayed' 'BestRating' 'BestRank' 'LongestKill' # realistically: # BestRank BestRating RoundsPlayed Wins/Losses WinRatio Kills RoundMostKills LongestKill - + end def transientsource( source ) @@ -272,7 +272,10 @@ def command_dispatch( mode, user, command, arg1 ) ircsocketwrite( "| song list: http://action.omgwallhack.org/music\n" ) return elsif( ( command == 'songrequest' ) || ( command == 'sr' ) ) && arg1.size > 1 - if( system( 'sraddsong.sh', arg1 ) ) + if ( ( arg1 =~ /list=/ ) && ( arg1 !~ /v=/ ) ) + ircsocketwrite( "| Lists are not accepted.\n" ) + return + elsif( system( 'sraddsong.sh', arg1 ) ) if( $m.playlistinfo[0].file == 'http://music/music.ogg' ) $m.next end @@ -301,10 +304,24 @@ def command_dispatch( mode, user, command, arg1 ) return end end + if command =~ /^(stool|ass)$/ + if ( ! $lastused[ command ] || $lastused[ command ] <= ( Time.now.to_i - 5 ) ) # || mode == '@' + $lastused[ command ] = Time.now.to_i + ircsocketwrite( "| < yamakaiza> oh nvmm your ass looks like a small swivel stool back xD\n" ) + return + end + end if command =~ /^(design)$/ if ( ! $lastused[ command ] || $lastused[ command ] <= ( Time.now.to_i - 5 ) ) # || mode == '@' $lastused[ command ] = Time.now.to_i - ircsocketwrite( "| http://i.imgur.com/s29rvaw.jpg http://i.imgur.com/OjMkp6I.jpg\n" ) + ircsocketwrite( "| https://bungmonkey.omgwallhack.org/img/apb/customize/display.html\n" ) + return + end + end + if command =~ /^(stats|dxdiag|system)$/ + if ( ! $lastused[ command ] || $lastused[ command ] <= ( Time.now.to_i - 5 ) ) # || mode == '@' + $lastused[ command ] = Time.now.to_i + ircsocketwrite( "https://bungmonkey.omgwallhack.org/tmp/DxDiag.txt\n" ) return end end @@ -315,7 +332,7 @@ def command_dispatch( mode, user, command, arg1 ) return end end - if command =~ /^(pubg)$/ + if command =~ /^(pubg)$/ if ( ! $lastused[ command ] || $lastused[ command ] <= ( Time.now.to_i - 5 ) ) # || mode == '@' $lastused[ command ] = Time.now.to_i pubgstats( arg1 ) @@ -325,11 +342,11 @@ def command_dispatch( mode, user, command, arg1 ) if ( ! $lastused[ command ] || $lastused[ command ] <= ( Time.now.to_i - 120 ) ) && $globallastused <= ( Time.now.to_i - 60 ) # || mode == '@' $globallastused = Time.now.to_i $lastused[ command ] = Time.now.to_i - if command =~ /^(metaminute|nopgl1|nopgl2)$/ + if command =~ /^(metaminute|nopgl1|nopgl2|cow)$/ transientsource( command ) return elsif command == 'commands' - ircsocketwrite( "| !design !uptime !songrequest !currentsong !pubg !metaminute !nopgl1 !nopgl2\n" ) + ircsocketwrite( "| !design !uptime !songrequest !currentsong !pubg !cow !metaminute !nopgl1 !nopgl2\n" ) return end end |