mirror of
https://github.com/Mudlet/Mudlet
synced 2026-08-13 18:26:27 -04:00
<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
## Summary
Implements full support for `telnet://` links in Mudlet, allowing users
to connect to MUD servers with a single click from browsers or other
applications.
## Usage Example
Users can now click links like:
```html
<a href="telnet://aardmud.org:4000">Play Aardwolf MUD</a>
<a href="telnet://batmud.bat.org">Connect to BatMUD</a>
```
Or run from command line:
```bash
mudlet "telnet://testserver.com:2000"
```
Mudlet will:
1. Parse the URI
2. Find or create a matching profile
3. Auto-connect to the MUD server
### TESTING
I ran it on WEB and it worked fine. I ran it from command line, it
worked fine
HERE IS A DEMO VIDEO :
https://github.com/user-attachments/assets/143cc98a-3453-4bd9-bbe8-5b48c58db490
#### Motivation for adding to Mudlet
The bounty and to improve myself and contribute
#### Other info (issues closed, discussion etc)
/closes #689
/claim #689
#### CHECKLIST:
[x] Windows
[x] Linux
[x] macOS
---------
Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Mike Conley <sousesider@gmail.com>
38 lines
1.7 KiB
C++
38 lines
1.7 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2024-2024 by Adam Robinson - seldon1951@hotmail.com *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the *
|
|
* Free Software Foundation, Inc., *
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
***************************************************************************/
|
|
|
|
#ifndef FILEOPENHANDLER_H
|
|
#define FILEOPENHANDLER_H
|
|
|
|
#include <QObject>
|
|
#include <QFileOpenEvent>
|
|
|
|
class FileOpenHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FileOpenHandler(QObject* parent = nullptr);
|
|
~FileOpenHandler() override;
|
|
|
|
protected:
|
|
bool eventFilter(QObject* obj, QEvent* event) override;
|
|
};
|
|
|
|
#endif //FILEOPENHANDLER_H
|