core updates
This commit is contained in:
parent
43043d1eba
commit
386979503e
@ -8,7 +8,7 @@ import {
|
|||||||
Auto
|
Auto
|
||||||
} from '@squeebot/core/lib/plugin';
|
} from '@squeebot/core/lib/plugin';
|
||||||
|
|
||||||
import { EMessageType, Formatter, IMessage, IMessageTarget, Protocol } from '@squeebot/core/lib/types';
|
import { EMessageType, Formatter, IMessage, IMessageTarget, Protocol, ProtocolFeatureFlag } from '@squeebot/core/lib/types';
|
||||||
|
|
||||||
import { logger } from '@squeebot/core/lib/core';
|
import { logger } from '@squeebot/core/lib/core';
|
||||||
import { IIRCMessage, IRC } from './irc';
|
import { IIRCMessage, IRC } from './irc';
|
||||||
@ -60,6 +60,22 @@ class IRCMessage implements IMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class IRCProtocol extends Protocol {
|
class IRCProtocol extends Protocol {
|
||||||
|
public static Features = [
|
||||||
|
ProtocolFeatureFlag.SHORT_FORM_MESSAGING,
|
||||||
|
ProtocolFeatureFlag.ACCOUNT_VERIFICATION,
|
||||||
|
ProtocolFeatureFlag.COLORS,
|
||||||
|
ProtocolFeatureFlag.FORMATTING,
|
||||||
|
ProtocolFeatureFlag.PLAIN,
|
||||||
|
ProtocolFeatureFlag.MENTION,
|
||||||
|
ProtocolFeatureFlag.EVENT_MESSAGE,
|
||||||
|
ProtocolFeatureFlag.EVENT_ROOM_JOIN,
|
||||||
|
ProtocolFeatureFlag.EVENT_ROOM_LEAVE,
|
||||||
|
ProtocolFeatureFlag.EVENT_ROOM_NAME_CHANGE,
|
||||||
|
ProtocolFeatureFlag.KICK,
|
||||||
|
ProtocolFeatureFlag.BAN,
|
||||||
|
ProtocolFeatureFlag.MUTE,
|
||||||
|
];
|
||||||
|
|
||||||
public format: Formatter = new IRCFormatter(true, true);
|
public format: Formatter = new IRCFormatter(true, true);
|
||||||
public type = 'IRCProtocol';
|
public type = 'IRCProtocol';
|
||||||
|
|
||||||
@ -252,7 +268,7 @@ class IRCServicePlugin extends Plugin {
|
|||||||
|
|
||||||
private startAll(list: any[]): void {
|
private startAll(list: any[]): void {
|
||||||
for (const ins of list) {
|
for (const ins of list) {
|
||||||
const newProto = new IRCProtocol(this, ins);
|
const newProto = new IRCProtocol(this, ins, IRCProtocol.Features);
|
||||||
logger.log('[%s] Starting IRC service "%s".', this.name, ins.name);
|
logger.log('[%s] Starting IRC service "%s".', this.name, ins.name);
|
||||||
this.monitor(newProto);
|
this.monitor(newProto);
|
||||||
this.service?.use(newProto, true);
|
this.service?.use(newProto, true);
|
||||||
|
1569
package-lock.json
generated
1569
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -11,12 +11,12 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@squeebot/core": "^3.3.1",
|
"@squeebot/core": "^3.6.0",
|
||||||
"typescript": "^4.4.2"
|
"typescript": "^5.1.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.11.13",
|
"@types/node": "^20.4.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||||
"eslint": "^8.4.1"
|
"eslint": "^8.46.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "irc",
|
"name": "irc",
|
||||||
"version": "1.2.1"
|
"version": "1.3.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ircprototest",
|
"name": "ircprototest",
|
||||||
|
Loading…
Reference in New Issue
Block a user