mirror of
https://github.com/MeshEnvy/lobbs.git
synced 2026-03-28 16:22:33 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2edab47a31 | ||
|
|
63617076d3 | ||
|
|
fe1d85e84c | ||
|
|
5aedfc17e5 |
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "LoBBSModule.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "lobbs.pb.h"
|
||||
#include "LoDB.h"
|
||||
#include "lodb/src/plugin.h"
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -122,6 +122,11 @@ LoBBSModule::LoBBSModule() : SinglePortModule("LoBBS", meshtastic_PortNum_TEXT_M
|
||||
|
||||
ProcessMessage LoBBSModule::handleReceived(const meshtastic_MeshPacket &mp)
|
||||
{
|
||||
// Only process direct messages to this node, ignore broadcasts
|
||||
if (!isToUs(&mp)) {
|
||||
return ProcessMessage::CONTINUE;
|
||||
}
|
||||
|
||||
LOG_DEBUG("LoBBS received DM from=0x%0x, id=%d, msg=%.*s", mp.from, mp.id, mp.decoded.payload.size, mp.decoded.payload.bytes);
|
||||
|
||||
meshtastic_LoBBSUser existingUser = meshtastic_LoBBSUser_init_zero;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#pragma once
|
||||
#pragma MPM_MODULE(LoBBSModule)
|
||||
|
||||
#include "plugin.h"
|
||||
#include "LoBBSDal.h"
|
||||
#include "SinglePortModule.h"
|
||||
#include "lobbs.pb.h"
|
||||
|
||||
#define LOBBS_VERSION "1.0.0"
|
||||
#define LOBBS_HEADER "LoBBS v" LOBBS_VERSION "\nCommands:\n"
|
||||
|
||||
/**
|
||||
* LoBBS (Lo-Fi Bulletin Board System) Module
|
||||
@@ -37,4 +35,4 @@ class LoBBSModule : public SinglePortModule
|
||||
LoBBSDal *dal;
|
||||
|
||||
void sendReply(NodeNum to, const std::string &msg);
|
||||
};
|
||||
};
|
||||
9
src/plugin.h
Normal file
9
src/plugin.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#define LOBBS_VERSION "1.1.1"
|
||||
#define LOBBS_HEADER "LoBBS v" LOBBS_VERSION "\nCommands:\n"
|
||||
|
||||
#include "LoBBSModule.h"
|
||||
|
||||
#pragma MPM_MODULE(LoBBSModule)
|
||||
|
||||
Reference in New Issue
Block a user