SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 27/10/2017, 05:10 AM   #101
Awide
Big Clucker
 
Join Date: Mar 2014
Posts: 71
Reputation: 6
Default Re: Discord Connector

Code:
[06:00:04]  Loading plugin: discord-connector.so
[06:00:04]   Failed (log-core.so: cannot open shared object file: No such file or directory)
On Jessie. Is there something I miss?
Awide is offline   Reply With Quote
Old 27/10/2017, 07:56 AM   #102
GamezCEO
Big Clucker
 
Join Date: Oct 2017
Posts: 71
Reputation: 32
Default Re: Discord Connector

Great. Rep+
GamezCEO is offline   Reply With Quote
Old 27/10/2017, 08:07 AM   #103
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Vladivostok
Posts: 3,269
Reputation: 747
Default Re: Discord Connector

Quote:
Originally Posted by Awide View Post
Code:
[06:00:04]  Loading plugin: discord-connector.so
[06:00:04]   Failed (log-core.so: cannot open shared object file: No such file or directory)
On Jessie. Is there something I miss?
https://github.com/maddinat0r/samp-log/releases
__________________
Find me on GitHub SEF Community (Official NEF Successor) SALobby Community SA:MP Reviews Find me on Steam
Kaperstone is offline   Reply With Quote
Old 27/10/2017, 01:10 PM   #104
PowerMwK
Little Clucker
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 49
Reputation: 0
Default Re: Discord Connector

Bro the plugin is awesome, do you don't have a wiki?
__________________
[PROJETO]



STATUS - EM CONSTRUO

SOB LICENCA DE
(UNDER THE LICENSE)

PARA USO NO COMERCIAL SEM AUTORIZAO DO AUTOR DO PROJETO
(FOR NON-COMMERCIAL USE WITHOUT AUTHORIZATION BY THE PROJECT AUTHOR)
PowerMwK is offline   Reply With Quote
Old 27/10/2017, 02:52 PM   #105
PowerMwK
Little Clucker
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 49
Reputation: 0
Default Re: Discord Connector

Someone Function to the public receive messages of only one room?
__________________
[PROJETO]



STATUS - EM CONSTRUO

SOB LICENCA DE
(UNDER THE LICENSE)

PARA USO NO COMERCIAL SEM AUTORIZAO DO AUTOR DO PROJETO
(FOR NON-COMMERCIAL USE WITHOUT AUTHORIZATION BY THE PROJECT AUTHOR)
PowerMwK is offline   Reply With Quote
Old 04/11/2017, 03:23 PM   #106
[WSF]ThA_Devil
Gangsta
 
[WSF]ThA_Devil's Avatar
 
Join Date: Sep 2010
Location: United Kingdom
Posts: 699
Reputation: 54
Default Re: Discord Connector

Quote:
Originally Posted by PowerMwK View Post
Someone Function to the public receive messages of only one room?
block the bot from accessing other channels through discord and make him only access the ones you need.




A question to the OP:

Why was DCC_IsChannelPrivate removed? It was useful for pm'ing commands to bot privately (for ingame pm's and stuff) Is there any alternative, as I can't really find anything that would be a decent replacement for it in the new function list.

Also any chance of getting a function like DCC_GetUserPrivateChannel which would get the channel ID that you can privately message to them?
__________________
Quote:
Originally Posted by Shinobu View Post
Somebody save me, I am not a server.
[WSF]ThA_Devil is online now   Reply With Quote
Old 05/11/2017, 04:19 PM   #107
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 889
Reputation: 460
Default Re: Discord Connector

Quote:
Originally Posted by [WSF]ThA_Devil View Post
Why was DCC_IsChannelPrivate removed? It was useful for pm'ing commands to bot privately (for ingame pm's and stuff) Is there any alternative, as I can't really find anything that would be a decent replacement for it in the new function list.
This was a Discord API change, which I reflected back into the plugin functions. Basically the "private" field was removed and replaced by a channel "type" field:
Code:
new DCC_ChannelType:type;
DCC_GetChannelType(channel, type);
if (type == DM)
{
    // direct message (private) channel
}
These are all available channel types:
Code:
GUILD_TEXT
DM
GUILD_VOICE
GROUP_DM
GUILD_CATEGORY
Quote:
Originally Posted by [WSF]ThA_Devil View Post
Also any chance of getting a function like DCC_GetUserPrivateChannel which would get the channel ID that you can privately message to them?
This function and a lot more are planned for the next update.
maddinat0r is offline   Reply With Quote
Old 05/11/2017, 09:17 PM   #108
[WSF]ThA_Devil
Gangsta
 
[WSF]ThA_Devil's Avatar
 
Join Date: Sep 2010
Location: United Kingdom
Posts: 699
Reputation: 54
Default Re: Discord Connector

Quote:
Originally Posted by maddinat0r View Post
This was a Discord API change, which I reflected back into the plugin functions. Basically the "private" field was removed and replaced by a channel "type" field:
Code:
new DCC_ChannelType:type;
DCC_GetChannelType(channel, type);
if (type == DM)
{
    // direct message (private) channel
}
These are all available channel types:
Code:
GUILD_TEXT
DM
GUILD_VOICE
GROUP_DM
GUILD_CATEGORY

This function and a lot more are planned for the next update.
Ah... Thanks. This solves it. I did try to find something of sorts but I must've somehow missed out on this.
__________________
Quote:
Originally Posted by Shinobu View Post
Somebody save me, I am not a server.
[WSF]ThA_Devil is online now   Reply With Quote
Old 05/11/2017, 09:50 PM   #109
kvann
Huge Clucker
 
kvann's Avatar
 
Join Date: Jun 2012
Location: Estonia
Posts: 361
Reputation: 67
Default Re: Discord Connector

Could someone build this for Ubuntu 16.04?
kvann is online now   Reply With Quote
Old 07/11/2017, 04:50 AM   #110
Sgt.TheDarkness
Huge Clucker
 
Sgt.TheDarkness's Avatar
 
Join Date: Jun 2012
Location: Moscow, Russia.
Posts: 248
Reputation: 50
Default Re: Discord Connector

Not sure why I keep having this issue, but I'll get about 15-20 minutes of uptime before the server crashes/infinite loops due to an issue with this plugin. I always have to kill the process, see below. The message never made it to my discord server either, it started hanging before it reached.


Also note I'm not running the plugin in debug mode as I cannot compile it on CentOS 7 due to CMake not being able to find the OpenSSL libraries although CMake reports it is installed on the system (1.0.2k), some enlightenment on that would be nice.

From server log:
Code:
[23:43:17] [chat] [TheDarkness]: test
[23:44:56] [debug] Server received interrupt signal while executing SFSE.amx
[23:44:56] [debug] AMX backtrace:
[23:44:56] [debug] #0 native DCC_SendChannelMessage () from discord-connector.so
[23:44:56] [debug] #1 0026ac88 in public OnPlayerText (playerid=1, text[]=@0019074c "test") at SFSE.pwn:1652
[23:44:56] [debug] Native backtrace:
[23:44:56] [debug] #0 f60d555b in _ZN10StackTraceC2EPv () from plugins/crashdetect.so
[23:44:56] [debug] #1 f60ce5df in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[23:44:56] [debug] #2 f60cf7a2 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[23:44:56] [debug] #3 f60cfb46 in _ZN11CrashDetect11OnInterruptEPv () from plugins/crashdetect.so
[23:44:56] [debug] #4 f60d529c in ?? () from plugins/crashdetect.so
[23:44:56] [debug] #5 f7782410 in ?? ()
[23:44:56] [debug] #6 f7782425 in ?? ()
[23:44:56] [debug] #7 f772e722 in ?? () from /lib/libpthread.so.0
[23:44:56] [debug] #8 f7729cd8 in ?? () from /lib/libpthread.so.0
[23:44:56] [debug] #9 f7729bb0 in __pthread_mutex_lock () from /lib/libpthread.so.0
[23:44:56] [debug] #10 f5ddab18 in ?? () from plugins/discord-connector.so
[23:44:56] [debug] #11 f5ddaf94 in ?? () from plugins/discord-connector.so
[23:44:56] [debug] #12 f5dbed9f in ?? () from plugins/discord-connector.so
[23:44:56] [debug] #13 f5e2e5c7 in ?? () from plugins/discord-connector.so
[23:44:56] [debug] #14 080950e4 in ?? () from ./samp03svr
[23:44:56] [debug] #15 f60d12eb in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[23:44:56] [debug] #16 f60d4318 in ?? () from plugins/crashdetect.so
[23:44:56] [debug] #17 f60d7e76 in amx_Exec () from plugins/crashdetect.so
[23:44:56] [debug] #18 f60d05a6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[23:44:56] [debug] #19 f60d4079 in ?? () from plugins/crashdetect.so
[23:44:56] [debug] #20 f600d5b1 in ?? () from plugins/streamer.so
From logs/plugins/discord-connector.log
Code:
[11/06/17 23:43:17] [DEBUG] DCC_SendChannelMessage(7, "[23:43:17] TheDarkness(1): test") (SFSE.pwn:1652)
[11/06/17 23:43:17] [DEBUG] Http::Post
[11/06/17 23:43:17] [DEBUG] Http::SendRequest
[11/06/17 23:43:17] [DEBUG] Http::PrepareRequest
[11/06/17 23:43:47] [DEBUG] WebSocket::DoHeartbeat
[11/06/17 23:43:47] [DEBUG] sending heartbeat
[11/06/17 23:43:47] [DEBUG] WebSocket::OnWsRead
[11/06/17 23:43:47] [DEBUG] heartbeat ACK
[11/06/17 23:43:47] [DEBUG] WebSocket::WsRead
[11/06/17 23:44:29] [DEBUG] WebSocket::DoHeartbeat
[11/06/17 23:44:29] [DEBUG] sending heartbeat
[11/06/17 23:44:29] [DEBUG] WebSocket::OnWsRead
[11/06/17 23:44:29] [DEBUG] heartbeat ACK
[11/06/17 23:44:29] [DEBUG] WebSocket::WsRead
[11/06/17 23:45:10] [DEBUG] WebSocket::DoHeartbeat
[11/06/17 23:45:10] [DEBUG] sending heartbeat
[11/06/17 23:45:10] [DEBUG] WebSocket::OnWsRead
[11/06/17 23:45:10] [DEBUG] heartbeat ACK
[11/06/17 23:45:10] [DEBUG] WebSocket::WsRead
__________________
Sgt.TheDarkness is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Teamspeak Connector maddinat0r Plugin Development 321 19/01/2018 04:23 PM
Route Connector James_Braga Русский/Russian 9 15/05/2015 09:24 AM
[Map] Connector Gas Tellken Maps 4 01/06/2012 04:04 AM
PSU connector help! patchkinson Everything and Nothing 3 20/03/2010 10:24 PM


All times are GMT. The time now is 04:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.