Skip to content

Commit

Permalink
ChatBot message style - | to \t
Browse files Browse the repository at this point in the history
  • Loading branch information
FlavioFS committed Feb 25, 2023
1 parent 575e25e commit 8d21cde
Show file tree
Hide file tree
Showing 27 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandAFK.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CommandAFK : public ACommand
int clearCount = _padClient.clearAFK(_guests);

std::ostringstream reply;
reply << "[ChatBot] | Retrieving AFK gamepads... Gamepads cleared: " << clearCount << "\0";
reply << "[ChatBot]\tRetrieving AFK gamepads... Gamepads cleared: " << clearCount << "\0";

_replyMessage = reply.str();

Expand Down
16 changes: 8 additions & 8 deletions ParsecSoda/Commands/CommandBonk.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class CommandBonk : public ACommandSearchUser
{
if (!MetadataCache::preferences.enableSfx)
{
_replyMessage = "[ChatBot] | Sound effects are disabled.\0";
_replyMessage = "[ChatBot]\tSound effects are disabled.\0";
return false;
}

if (!_stopwatch.isRunComplete())
{
_replyMessage = std::string() +
"[ChatBot] | Bonk command is on cooldown: " +
"[ChatBot]\tBonk command is on cooldown: " +
to_string(_stopwatch.getRemainingTime()/1000) + " seconds left.\0";
return false;
}
Expand Down Expand Up @@ -64,17 +64,17 @@ class CommandBonk : public ACommandSearchUser
{
case SEARCH_USER_RESULT::NOT_FOUND:
if (Dice::roll(BONK_CHANCE))
_replyMessage = std::string() + "[ChatBot] | " + _sender.name + " dreams of bonking but the target out of reach.\0";
_replyMessage = std::string() + "[ChatBot]\t" + _sender.name + " dreams of bonking but the target out of reach.\0";
else
_replyMessage = std::string() + "[ChatBot] | " + _sender.name + " yearns for bonking but the victim is not here.\0";
_replyMessage = std::string() + "[ChatBot]\t" + _sender.name + " yearns for bonking but the victim is not here.\0";
break;

case SEARCH_USER_RESULT::FOUND:
_stopwatch.reset();
rv = true;
if (_sender.userID == _targetGuest.userID)
{
_replyMessage = std::string() + "[ChatBot] | " + _sender.name + " self-bonked. *Bonk!*\0";
_replyMessage = std::string() + "[ChatBot]\t" + _sender.name + " self-bonked. *Bonk!*\0";
try
{
PlaySound(TEXT("./sfx/bonk-hit.wav"), NULL, SND_FILENAME | SND_NODEFAULT | SND_ASYNC);
Expand All @@ -83,7 +83,7 @@ class CommandBonk : public ACommandSearchUser
}
else if (Dice::roll(BONK_CHANCE))
{
_replyMessage = std::string() + "[ChatBot] | " + _sender.name + " bonked " + _targetGuest.name + ". *Bonk!*\0";
_replyMessage = std::string() + "[ChatBot]\t" + _sender.name + " bonked " + _targetGuest.name + ". *Bonk!*\0";
try
{
PlaySound(TEXT("./sfx/bonk-hit.wav"), NULL, SND_FILENAME | SND_NODEFAULT | SND_ASYNC);
Expand All @@ -92,7 +92,7 @@ class CommandBonk : public ACommandSearchUser
}
else
{
_replyMessage = std::string() + "[ChatBot] | " + _targetGuest.name + " dodged " + _sender.name + "'s bonk. *Swoosh!*\0";
_replyMessage = std::string() + "[ChatBot]\t" + _targetGuest.name + " dodged " + _sender.name + "'s bonk. *Swoosh!*\0";
try
{
PlaySound(TEXT("./sfx/bonk-dodge.wav"), NULL, SND_FILENAME | SND_NODEFAULT | SND_ASYNC);
Expand All @@ -103,7 +103,7 @@ class CommandBonk : public ACommandSearchUser

case SEARCH_USER_RESULT::FAILED:
default:
_replyMessage = "[ChatBot] | Usage: !bonk <username>\nExample: !bonk melon\0";
_replyMessage = "[ChatBot]\tUsage: !bonk <username>\nExample: !bonk melon\0";
break;
}

Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandBotMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CommandBotMessage : public ACommand

bool run() override
{
_replyMessage = std::string() + "[ChatBot] | " + _msg + "\0";
_replyMessage = std::string() + "[ChatBot]\t" + _msg + "\0";
return true;
}

Expand Down
8 changes: 4 additions & 4 deletions ParsecSoda/Commands/CommandDC.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CommandDC : public ACommandIntegerArg
{
_replyMessage =
std::string() +
"[ChatBot] | Usage: !dc <integer in range [1, " +
"[ChatBot]\tUsage: !dc <integer in range [1, " +
to_string(maxIndex) +
"]>\nExample: !dc 1\0"
;
Expand All @@ -32,16 +32,16 @@ class CommandDC : public ACommandIntegerArg
std::ostringstream reply;
if (_intArg < 1 || _intArg > maxIndex)
{
reply << "[ChatBot] | Wrong index: " << _intArg << " is not in range [1, " << maxIndex << "].\0";
reply << "[ChatBot]\tWrong index: " << _intArg << " is not in range [1, " << maxIndex << "].\0";
}

if (_gamepadClient.disconnect(_intArg - 1))
{
reply << "[ChatBot] | Gamepad " << _intArg << " disconnected.\0";
reply << "[ChatBot]\tGamepad " << _intArg << " disconnected.\0";
}
else
{
reply << "[ChatBot] | Gamepad " << _intArg << " fail to disconnect.\0";
reply << "[ChatBot]\tGamepad " << _intArg << " fail to disconnect.\0";
}

_replyMessage = reply.str();
Expand Down
8 changes: 4 additions & 4 deletions ParsecSoda/Commands/CommandFF.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class CommandFF : public ACommand
std::ostringstream reply;
if (_droppedPadCount > 1)
{
reply << "[ChatBot] | " << _sender.name << " has dropped " << _droppedPadCount << " gamepads!\0";
reply << "[ChatBot]\t" << _sender.name << " has dropped " << _droppedPadCount << " gamepads!\0";
}
else if (_droppedPadCount > 0)
{
reply << "[ChatBot] | " << _sender.name << " has dropped " << _droppedPadCount << " gamepad!\0";
reply << "[ChatBot]\t" << _sender.name << " has dropped " << _droppedPadCount << " gamepad!\0";
}
else
{
reply << "[ChatBot] | " << _sender.name << " has no gamepads to drop.\0";
reply << "[ChatBot]\t" << _sender.name << " has no gamepads to drop.\0";
}

_replyMessage = reply.str();
Expand All @@ -58,7 +58,7 @@ class CommandFF : public ACommand

if (_hotseatManager.spectateGuestID(_sender.userID))
{
_replyMessage = "[ChatBot] | " + _sender.name + " is now only watching.\0";
_replyMessage = "[ChatBot]\t" + _sender.name + " is now only watching.\0";
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions ParsecSoda/Commands/CommandGameId.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CommandGameId : public ACommandStringArg
{
if ( !ACommandStringArg::run() )
{
_replyMessage = "[ChatBot] | Usage: !gameid <id>\nExample: !gameid 1RR6JAsP4sdrjUOMEV4i7lVwMht\0";
_replyMessage = "[ChatBot]\tUsage: !gameid <id>\nExample: !gameid 1RR6JAsP4sdrjUOMEV4i7lVwMht\0";
return false;
}

Expand All @@ -26,11 +26,11 @@ class CommandGameId : public ACommandStringArg
}
catch (const std::exception&)
{
_replyMessage = "[ChatBot] | Failed to write game ID.\0";
_replyMessage = "[ChatBot]\tFailed to write game ID.\0";
return false;
}

_replyMessage = std::string() + "[ChatBot] | Game ID changed:\n" + _stringArg + "\0";
_replyMessage = std::string() + "[ChatBot]\tGame ID changed:\n" + _stringArg + "\0";
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions ParsecSoda/Commands/CommandGuests.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class CommandGuests : public ACommandIntegerArg
{
if ( !ACommandIntegerArg::run() )
{
_replyMessage = "[ChatBot] | Usage: !guests <number>\nExample: !guests 7\0";
_replyMessage = "[ChatBot]\tUsage: !guests <number>\nExample: !guests 7\0";
return false;
}

_config.maxGuests = _intArg;
std::ostringstream reply;
reply << "[ChatBot] | Max guests set to " << _intArg << "\0";
reply << "[ChatBot]\tMax guests set to " << _intArg << "\0";
_replyMessage = reply.str();

return true;
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandHelp.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CommandHelp : public ACommand
else commandList = pleb_commands;

_replyMessage =
string("[ChatBot] | Command list: ")
string("[ChatBot]\tCommand list: ")
+ commandList
+ "\n\0";

Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandJoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CommandJoin : public ACommand
bool run() override
{
_replyMessage = std::string()
+ "[ChatBot] | You don't need a command to get a gamepad.\n"
+ "[ChatBot]\tYou don't need a command to get a gamepad.\n"
+ "\tJust press (A, B, X or Y) to pick a random controller,\n"
+ "\tif there are any free controllers available.\0";

Expand Down
4 changes: 2 additions & 2 deletions ParsecSoda/Commands/CommandLimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class CommandLimit : public ACommandSearchUserIntArg
{
if ( !ACommandSearchUserIntArg::run() )
{
_replyMessage = "[ChatBot] | Usage: !limit <username> <number>\nExample: !limit melon 2\0";
_replyMessage = "[ChatBot]\tUsage: !limit <username> <number>\nExample: !limit melon 2\0";
return false;
}

_gamepadClient.setLimit(_targetGuest.userID, _intArg);

std::ostringstream reply;
reply << "[ChatBot] | " << _targetGuest.name << " gamepad limit set to " << _intArg << "\0";
reply << "[ChatBot]\t" << _targetGuest.name << " gamepad limit set to " << _intArg << "\0";
_replyMessage = reply.str();
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions ParsecSoda/Commands/CommandMic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class CommandMic : public ACommandIntegerArg
{
if ( !ACommandIntegerArg::run() )
{
_replyMessage = std::string() + "[ChatBot] | Usage: !mic <integer in range [0, 100]>\nExample: !mic 42\0";
_replyMessage = std::string() + "[ChatBot]\tUsage: !mic <integer in range [0, 100]>\nExample: !mic 42\0";
return false;
}

_audionIn.volume = (float)_intArg / 100.0f;

std::ostringstream reply;
reply << "[ChatBot] | Microphone volume set to " << _intArg << "%\0";
reply << "[ChatBot]\tMicrophone volume set to " << _intArg << "%\0";
_replyMessage = reply.str();
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandMirror.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommandMirror : public ACommand
{
bool isMirrored = _gamepadClient.toggleMirror(_sender.userID);
_replyMessage = std::string()
+ "[ChatBot] | " + _sender.name
+ "[ChatBot]\t" + _sender.name
+ " toggled mirror mode:\t" + (isMirrored ? "ON" : "OFF")
+ "\0";
return true;
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandMultitap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommandMultitap : public ACommand
{
bool isMultitap = _gamepadClient.toggleMultitap(_sender.userID);
_replyMessage = std::string()
+ "[ChatBot] | " + _sender.name
+ "[ChatBot]\t" + _sender.name
+ " toggled multitap:\t" + (isMultitap ? "ON" : "OFF")
+ "\0";
return true;
Expand Down
4 changes: 2 additions & 2 deletions ParsecSoda/Commands/CommandName.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CommandName : public ACommandStringArg
{
if ( !ACommandStringArg::run() )
{
_replyMessage = "[ChatBot] | Usage: !name <roomname>\nExample: !name Let's Play Gauntlet!\0";
_replyMessage = "[ChatBot]\tUsage: !name <roomname>\nExample: !name Let's Play Gauntlet!\0";
return false;
}

Expand All @@ -33,7 +33,7 @@ class CommandName : public ACommandStringArg

strcpy_s(_config.name, _stringArg.c_str());

_replyMessage = std::string() + "[ChatBot] | Room name changed:\n" + _stringArg + "\0";
_replyMessage = std::string() + "[ChatBot]\tRoom name changed:\n" + _stringArg + "\0";
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandPads.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommandPads : public ACommand
bool run() override
{
std::ostringstream reply;
reply << "[ChatBot] | Gamepad Holders:\n";
reply << "[ChatBot]\tGamepad Holders:\n";

std::vector<AGamepad*>::iterator gi = _gamepadClient.gamepads.begin();
uint16_t i = 1;
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CommandPrivate : public ACommand

bool run() override
{
_replyMessage = "[ChatBot] | Room set to private.\0";
_replyMessage = "[ChatBot]\tRoom set to private.\0";
_config.publicGame = false;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandPublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CommandPublic : public ACommand

bool run() override
{
_replyMessage = "[ChatBot] | Room set to public.\0";
_replyMessage = "[ChatBot]\tRoom set to public.\0";
_config.publicGame = true;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandQuit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CommandQuit : public ACommand

bool run() override
{
_replyMessage = "[ChatBot] | Closing stream...\0";
_replyMessage = "[ChatBot]\tClosing stream...\0";
_hostingLoopController = false;
return true;
}
Expand Down
10 changes: 5 additions & 5 deletions ParsecSoda/Commands/CommandSFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ class CommandSFX : public ACommandStringArg
{
if (!MetadataCache::preferences.enableSfx)
{
_replyMessage = "[ChatBot] | Sound effects are disabled.\0";
_replyMessage = "[ChatBot]\tSound effects are disabled.\0";
return false;
}

if (_sfxList.size() <= 0)
{
_replyMessage = "[ChatBot] | No sound effects available.\0";
_replyMessage = "[ChatBot]\tNo sound effects available.\0";
return false;
}

if ( !ACommandStringArg::run() )
{
_replyMessage =
string("[ChatBot] | Usage: !sfx <sound name> | Example: !sfx bruh\n") +
string("[ChatBot]\tUsage: !sfx <sound name> | Example: !sfx bruh\n") +
string("List of available sound names:\n") +
_sfxList.loadedTags() +
string("\0");
Expand All @@ -43,13 +43,13 @@ class CommandSFX : public ACommandStringArg
{
case SFXList::SFXPlayResult::COOLDOWN:
_replyMessage =
string("[ChatBot] | Command !sfx is on cooldown: ") +
string("[ChatBot]\tCommand !sfx is on cooldown: ") +
to_string(_sfxList.getRemainingCooldown()) +
string(" seconds left.");
break;
case SFXList::SFXPlayResult::NOT_FOUND:
_replyMessage =
string("[ChatBot] | This sound does not exist.\n") +
string("[ChatBot]\tThis sound does not exist.\n") +
string("List of available sound effects:\n") +
_sfxList.loadedTags() +
string("\0");
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Commands/CommandSetConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CommandSetConfig : public ACommand

bool run() override
{
_replyMessage = "[ChatBot] | Room settings applied.\0";
_replyMessage = "[ChatBot]\tRoom settings applied.\0";
ParsecHostSetConfig(_parsec, _config, _sessionId);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions ParsecSoda/Commands/CommandSpeakers.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class CommandSpeakers : public ACommandIntegerArg
{
if (!ACommandIntegerArg::run())
{
_replyMessage = std::string() + "[ChatBot] | Usage: !speakers <integer in range [0, 100]>\nExample: !speakers 42\0";
_replyMessage = std::string() + "[ChatBot]\tUsage: !speakers <integer in range [0, 100]>\nExample: !speakers 42\0";
return false;
}

_audioOut.volume = (float)_intArg / 100.0f;

std::ostringstream reply;
reply << "[ChatBot] | Speakers volume set to " << _intArg << "%\0";
reply << "[ChatBot]\tSpeakers volume set to " << _intArg << "%\0";
_replyMessage = reply.str();
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions ParsecSoda/Commands/CommandStrip.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ class CommandStrip : public ACommandIntegerArg
{
if (!ACommandIntegerArg::run())
{
_replyMessage = "[ChatBot] | Usage: !strip <integer in range [1, 4]>\nExample: !strip 4\0";
_replyMessage = "[ChatBot]\tUsage: !strip <integer in range [1, 4]>\nExample: !strip 4\0";
return false;
}

bool success = _gamepadClient.clearOwner(_intArg-1);
if (!success)
{
_replyMessage = "[ChatBot] | Usage: !strip <integer in range [1, 4]>\nExample: !strip 4\0";
_replyMessage = "[ChatBot]\tUsage: !strip <integer in range [1, 4]>\nExample: !strip 4\0";
return false;
}

std::ostringstream reply;
reply
<< "[ChatBot] | Gamepad " << _intArg << " was forcefully dropped by " << _sender.name << "\n"
<< "[ChatBot]\tGamepad " << _intArg << " was forcefully dropped by " << _sender.name << "\n"
<< "\t\tType !pads to see the gamepad list.\0";

_replyMessage = reply.str();
Expand Down
Loading

0 comments on commit 8d21cde

Please sign in to comment.