From a2e264da6f4ff910b10dfb79eebb39def0967502 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sun, 25 Oct 2020 00:11:58 -0700 Subject: ircobsbridge: extensive changes --- ircobsbridge.rb | 29 +++++++++++++++++++++++------ 1 file 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 -- cgit v1.2.3