mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2022
Posts: 1
M
Maicol Offline OP
Mostly harmless
OP Offline
Mostly harmless
M
Joined: May 2022
Posts: 1
Hello!

My name is Maicol, I have around 14 years in irc networks, specifically Chatzona, I create utilities for users that can solve a need or, failing that, collaborate with the resolution of any requirement in mirc.

Previously I have created with a good friend utilities such as: See photos of web users in mirc, share the camera (with flash no longer works) share microphone (with flash no longer works) and a lot of other things

Several days ago I try to send a message from Mirc to discord using webhook, I have already created the interface in several languages, vb, c #, php, to send messages to discord through webhook, now I try to do it in Mirc with msl, to send a message from an alias but I can't get it, does anyone have an idea or an example of how I could achieve it?

I appreciate any help or pointers.


3ncriptados
Joined: Dec 2002
Posts: 252
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 252
By webhook, I assume you mean some form of HTTP API. You would need to look at $urlget()

Here's the info directly from the help file: /help $urlget

Note: the user:pass@address portion of the URI defines an OLD base64 authentication method (http response of: 401 unauthorized) This is NOT login/password for anything and everything, like forums or web API's etc... Logging into websites and API's you would need to form the proper query-string containing the form items and their values, for either GET method or POST method.

Once doing said login information, most sites give you a Unique ID as a cookie, which you MUST extract yourself from the $urlget().reply .. Any following calls to this website requiring this data must be formatted as valid header fields in a binvar and passed to $urlget() so it includes your extended header information (like cookies). Extra header information are NOT persistent across multiple $urlget() calls, unlike a browser.

Without further information on how you need to interact with your "Webhook" this is the best I can offer.

Quote

$urlget(url,hgpuadfbrtikc,target,alias,headers,body)
Downloads content from specified http/https address. Returns id number. Calls alias with id number as parameter when transfer completes.

url = http/https://user:pass@address:port/file?parameters

options =

hgpuad = head, get, post, put, patch, or delete
fb = file or &binvar
r = resume
t = use .part file
i = ignore SSL errors
k = prevent redirects
c = cancel

target = file or &binvar
alias = called on completion
headers = &binvar
body = &binvar

If the call fails, for any reason, it returns an id of zero.

$urlget(N/id) can be used with properties: url, redirect, method, type, target, alias, id, state, size, resume, rcvd, time, reply


Link Copied to Clipboard