core updates
This commit is contained in:
parent
43043d1eba
commit
386979503e
@ -8,7 +8,7 @@ import {
|
||||
Auto
|
||||
} 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 { IIRCMessage, IRC } from './irc';
|
||||
@ -60,6 +60,22 @@ class IRCMessage implements IMessage {
|
||||
}
|
||||
|
||||
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 type = 'IRCProtocol';
|
||||
|
||||
@ -252,7 +268,7 @@ class IRCServicePlugin extends Plugin {
|
||||
|
||||
private startAll(list: any[]): void {
|
||||
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);
|
||||
this.monitor(newProto);
|
||||
this.service?.use(newProto, true);
|
||||
|
1567
package-lock.json
generated
1567
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": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@squeebot/core": "^3.3.1",
|
||||
"typescript": "^4.4.2"
|
||||
"@squeebot/core": "^3.6.0",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.13",
|
||||
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
||||
"eslint": "^8.4.1"
|
||||
"@types/node": "^20.4.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"eslint": "^8.46.0"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"plugins": [
|
||||
{
|
||||
"name": "irc",
|
||||
"version": "1.2.1"
|
||||
"version": "1.3.0"
|
||||
},
|
||||
{
|
||||
"name": "ircprototest",
|
||||
|
Loading…
Reference in New Issue
Block a user