SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/10/2017, 06:56 AM   #101
GamezCEO
Big Clucker
 
Join Date: Oct 2017
Posts: 73
Reputation: 37
Default Re: Discord Connector

Great. Rep+
GamezCEO is offline   Reply With Quote
Old 27/10/2017, 07:07 AM   #102
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,346
Reputation: 824
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
Kaperstone is offline   Reply With Quote
Old 27/10/2017, 12:10 PM   #103
PowerMwK
Big Clucker
 
PowerMwK's Avatar
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 173
Reputation: 4
Default Re: Discord Connector

Bro the plugin is awesome, do you don't have a wiki?
__________________
DISCORD DO SERVIDOR:

DISCORD DO TIME DE DESENVOLVIMENTO E CRIAЗГO:
Desenvolvimento RPG-DM:

PowerMwK is offline   Reply With Quote
Old 27/10/2017, 01:52 PM   #104
PowerMwK
Big Clucker
 
PowerMwK's Avatar
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 173
Reputation: 4
Default Re: Discord Connector

Someone Function to the public receive messages of only one room?
__________________
DISCORD DO SERVIDOR:

DISCORD DO TIME DE DESENVOLVIMENTO E CRIAЗГO:
Desenvolvimento RPG-DM:

PowerMwK is offline   Reply With Quote
Old 04/11/2017, 02:23 PM   #105
[WSF]ThA_Devil
Gangsta
 
[WSF]ThA_Devil's Avatar
 
Join Date: Sep 2010
Location: United Kingdom
Posts: 724
Reputation: 55
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 offline   Reply With Quote
Old 05/11/2017, 03:19 PM   #106
maddinat0r
Gangsta
 
maddinat0r's Avatar
 
Join Date: Jun 2010
Location: Germany
Posts: 898
Reputation: 481
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, 08:17 PM   #107
[WSF]ThA_Devil
Gangsta
 
[WSF]ThA_Devil's Avatar
 
Join Date: Sep 2010
Location: United Kingdom
Posts: 724
Reputation: 55
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 offline   Reply With Quote
Old 05/11/2017, 08:50 PM   #108
kvann
Huge Clucker
 
kvann's Avatar
 
Join Date: Jun 2012
Location: Estonia
Posts: 375
Reputation: 124
Default Re: Discord Connector

Could someone build this for Ubuntu 16.04?
kvann is offline   Reply With Quote
Old 07/11/2017, 03:50 AM   #109
Sgt.TheDarkness
Huge Clucker
 
Sgt.TheDarkness's Avatar
 
Join Date: Jun 2012
Location: Moscow, Russia.
Posts: 258
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
Old 15/11/2017, 01:34 PM   #110
Pizzy
Huge Clucker
 
Join Date: May 2012
Posts: 454
Reputation: 113
Default Re: Discord Connector

When sending multiple discord messages at once, lag and issues are caused. I am very skeptical about using this with 20+ players online (sending discord messages every time a player is killed, connects, disconnects etc).

Has anyone tried this with a fair amount of players, sending a decent amount of messages per second?
Pizzy 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 325 08/09/2018 07:04 PM
Route Connector James_Braga Русский/Russian 9 15/05/2015 08:24 AM
[Map] Connector Gas Tellken Maps 4 01/06/2012 03:04 AM
PSU connector help! patchkinson Everything and Nothing 3 20/03/2010 09:24 PM


All times are GMT. The time now is 10:36 PM.


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