View Issue Details

IDProjectCategoryView StatusLast Update
0006227unrealircdpublic2025-11-28 18:00
Reporterarmyn Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version6.0.6 
Fixed in Version6.2.2 
Summary0006227: JSON-RPC : sent a message to a bot to give it an order
DescriptionHi
https://www.unrealircd.org/docs/JSON-RPC:Technical_documentation#JSON-RPC_Methods
Would it be possible to send a message to a bot via the JSON-RPC API?

Here is a useful example:
1) For example, a user sends a PHP request (SQL & INSERT) as a service to report abuse
2) Me (or us admins) deal with abuse (on a PHP page)
3) But now I would like when the INSERT is done (from step 1) as soon as the insert is successful this php page would send a PRIVMSG to a NodeJS robot such as: PRIVMSG Sysop ABUS from:<Account1> for:<Account2> id:<id_inserted>
The robot would then send a private message in real time to the specific ircops an alert in private message telling them that an abuse has just been posted between FROM and TO and with the url containing the id directly and here is the request for abuse would be dealt with directly.

You have to be honest but I don't receive any notification there currently and I don't immediately think of going to the php page to moderate abuse. If only there was something that alerts in real time like api-rpc that would be great.

There are only about 7 to 10 abuse requests per day (the abuse button is very discreet so that it is only used by people who have a good level of intelligence so as not to be inundated.

If this command cannot be created on json-rpc There would be another quick trick to implement, here is an example:
1) Create a sql table named: "irc_commands_to_execute" and I put 2 columns id|cmd
2) The nodejs robot (ircop) it recovers via a select and once a minute everything that is there in this sql table and it directly sends the command received
3) and in php I just put the message hard in sql, example: privmsg Sysop ABUS from:<Account1> for:<Account2> id:<id_insered>
or directly the processing of the "ABUS" command to send the message directly to the ircops concerned with the url.

Salutations
3rd party modules

Activities

syzop

2025-11-28 12:30

administrator   ~0023575

PR/commit from Valware https://github.com/unrealircd/unrealircd/commit/65f85a1b28c13c5bee7e7bdaeb279e4084285076

commit 65f85a1b28c13c5bee7e7bdaeb279e4084285076 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD)
Author: Valerie Liu <[email protected]>
Date: Fri Nov 28 11:24:19 2025 +0000

    JSON-RPC: Add message.* (PR #327 from Valware)
    
    * message.send_privmsg
    * message.send_notice
    * message.send_numeric
    * message.send_standard_reply

syzop

2025-11-28 12:30

administrator   ~0023576

Done. Docs will be added later on https://www.unrealircd.org/docs/JSON-RPC:Technical_documentation

syzop

2025-11-28 18:00

administrator   ~0023577

Docs are done https://www.unrealircd.org/docs/JSON-RPC:Message

Issue History

Date Modified Username Field Change
2023-02-19 04:58 armyn New Issue
2025-11-28 12:30 syzop Note Added: 0023575
2025-11-28 12:30 syzop Assigned To => syzop
2025-11-28 12:30 syzop Status new => resolved
2025-11-28 12:30 syzop Resolution open => fixed
2025-11-28 12:30 syzop Fixed in Version => 6.2.2
2025-11-28 12:30 syzop Note Added: 0023576
2025-11-28 18:00 syzop Note Added: 0023577