diff options
| author | 2022-01-30 23:16:23 +0000 | |
|---|---|---|
| committer | 2022-01-30 23:16:23 +0000 | |
| commit | 0f3f8285fe3dea1ce77340d1dce12ee73337338c (patch) | |
| tree | 556b0fd3bbe29a8b67d187eaecb5596fe0b7edce /src/modules | |
| parent | Merge branch 'insp3' into master. (diff) | |
Fix a bunch of weird uses of .c_str().
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_ojoin.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_sasl.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_websocket.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 780f41360..caac9d0ed 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -116,7 +116,7 @@ public: ModuleOjoin() : Module(VF_VENDOR, "Adds the /OJOIN command which allows server operators to join a channel and receive the server operator-only Y (official-join) channel prefix mode.") - , np(this, ServerInstance->Config->ConfValue("ojoin")->getString("prefix").c_str()[0]) + , np(this, ServerInstance->Config->ConfValue("ojoin")->getString("prefix", "\0", 1, 1)[0]) , mycommand(this, np) { } diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 273a290bb..3fed75af7 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -280,7 +280,7 @@ public: SendSASL(this->user, this->agent, 'C', parameters); - if (parameters[0].c_str()[0] == '*') + if (parameters.empty() || parameters[0] == "*") { this->Abort(); return false; diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 3e3794e82..4d70ca549 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -286,7 +286,7 @@ class WebSocketHook final if (GetRecvQ().empty()) return 0; - unsigned char opcode = (unsigned char)GetRecvQ().c_str()[0]; + unsigned char opcode = (unsigned char)GetRecvQ()[0]; switch (opcode & ~WS_FINBIT) { case OP_CONTINUATION: |
