summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lingo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lingo.cpp b/lingo.cpp index 3dc8b8f..1cb13ce 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -367,10 +367,11 @@ public:
367 std::string avatar_url = event.msg.author.get_avatar_url(); 367 std::string avatar_url = event.msg.author.get_avatar_url();
368 easy.escape(avatar_url); 368 easy.escape(avatar_url);
369 std::string user_id_str = std::to_string(static_cast<uint64_t>(event.msg.author.id)); 369 std::string user_id_str = std::to_string(static_cast<uint64_t>(event.msg.author.id));
370 std::string username = event.msg.member.nickname.empty() ? event.msg.author.username : event.msg.member.nickname;
370 371
371 // Forms creation 372 // Forms creation
372 curl::curl_pair<CURLformoption,std::string> username_form(CURLFORM_COPYNAME,"username"); 373 curl::curl_pair<CURLformoption,std::string> username_form(CURLFORM_COPYNAME,"username");
373 curl::curl_pair<CURLformoption,std::string> username_cont(CURLFORM_COPYCONTENTS,event.msg.member.nickname); 374 curl::curl_pair<CURLformoption,std::string> username_cont(CURLFORM_COPYCONTENTS,username);
374 curl::curl_pair<CURLformoption,std::string> pass_form(CURLFORM_COPYNAME,"user_id"); 375 curl::curl_pair<CURLformoption,std::string> pass_form(CURLFORM_COPYNAME,"user_id");
375 curl::curl_pair<CURLformoption,std::string> pass_cont(CURLFORM_COPYCONTENTS,user_id_str); 376 curl::curl_pair<CURLformoption,std::string> pass_cont(CURLFORM_COPYCONTENTS,user_id_str);
376 curl::curl_pair<CURLformoption,std::string> av_form(CURLFORM_COPYNAME,"avatar_url"); 377 curl::curl_pair<CURLformoption,std::string> av_form(CURLFORM_COPYNAME,"avatar_url");