iniquity

A re-imagining of the iconic BBS software.

View on GitHub

Class: Iniquity

Core.Iniquity

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Iniquity()

Inherited from

IQBaseConfig.constructor

Properties

access

access: IQModuleACLS

Inherited from

IQBaseConfig.access

Defined in

core/src/index.ts:346


assets

assets: string

Inherited from

IQBaseConfig.assets

Defined in

core/src/index.ts:345


basepath

basepath: string

Inherited from

IQBaseConfig.basepath

Defined in

core/src/index.ts:344


computed

computed: any

Inherited from

IQBaseConfig.computed

Defined in

core/src/index.ts:349


data

data: IQReactorOptions

Inherited from

IQBaseConfig.data

Defined in

core/src/index.ts:348


encoding

encoding: "CP437" | "UTF8"

Inherited from

IQBaseConfig.encoding

Defined in

core/src/index.ts:347


terminfo

terminfo: IQTermInfoObject

Terminal information available to iniquity

Defined in

core/src/index.ts:511

Methods

artwork

artwork(options?): Artwork

Will allow you to render artwork to the screen

see IQArtworkOptions to learn more about the available options.

example

const artwork = iq.artwork({ basepath: "/iniquity/core/src/assets/" })
artwork.render({ filename: Assets.we_iniq3 })

iq.artwork({ basepath: "/iniquity/core/src/assets/", filename: Assets.we_iniq3 }).render({ clearScreenBefore: false })

Parameters

Name Type Description
options? IQArtworkOptions An object containing the various configuration properties.

Returns

Artwork

An instance of Artwork and its return functions.

Defined in

core/src/index.ts:544


ask

ask(question): string

Displays a prompt (value) and returns a string of user input (ala clent-side JS)

Parameters

Name Type
question string

Returns

string

response

Defined in

core/src/index.ts:488


cursor

cursor(options?): IQCursorChainableMethods

Sends the cursor to a particular coordinates on the screen

Parameters

Name Type
options? IQCursorOptions

Returns

IQCursorChainableMethods

Defined in

core/src/index.ts:443


disconnect

disconnect(): void

Will disconnect the user immediately.

Returns

void

void

Defined in

core/src/index.ts:496


frame

frame(options): IQFrame

Frame instance

Parameters

Name Type Description
options IQFrameOptions An object containing the various configuration properties.

Returns

IQFrame

An instance of Menu

Defined in

core/src/index.ts:561


gotoxy

gotoxy(x, y): void

Sends the cursor to a particular coordinates on the screen

Parameters

Name Type
x number
y number

Returns

void

Defined in

core/src/index.ts:435


logoff

logoff(): void

Returns

void

Defined in

core/src/index.ts:500


logout

logout(): void

Returns

void

Defined in

core/src/index.ts:504


menu(options): IQMenu

Menu instance

Parameters

Name Type Description
options IQMenuOptions An object containing the various configuration properties.

Returns

IQMenu

An instance of Menu

Defined in

core/src/index.ts:553


pause

pause(options?): void

Display a pause prompt on the screen.

summary This pause prompt does the usual stuff. It also provides a few helpers via its return functions.

see IQPauseOptions to learn more about the available options.

Parameters

Name Type
options? IQPauseOptions

Returns

void

Defined in

core/src/index.ts:424


print

print(options): IBBSPrintFunctions

Prints something to the user. Parses Renegade MCI/Synchronet @- codes.

see IQPrintOptions to learn more about the available options.

example

iq.print("Display some text on the screen that can parse @ codes.").center()
iq.print("Display some text on the screen that can parse @ codes.".newlines(2).color("background red"))
iq.print("Display some text on the screen that can parse @ codes.".color("cyan")).pause()

Parameters

Name Type Description
options string | IQPrintOptions you would like to print on the screen.

Returns

IBBSPrintFunctions

Defined in

core/src/index.ts:402


say

say(options): IBBSSayFunctions

Says something to the user. Does not parse MCI/@- codes.

see IQPrintOptions to learn more about the available options.

example

iq.say("Say something to the terminal!")
iq.say("This time say something but do some cool string manipulation.".newlines(2).color("bright red").center()).pause()

Parameters

Name Type Description
options any What you would like to say on the screen.

Returns

IBBSSayFunctions

Defined in

core/src/index.ts:364


user

user(options): User

User stuff

summary It doesn’t do much right now. But it does create new users and store them in the SBBS backend.

see IUserOptions to learn more about the available options.

Parameters

Name Type Description
options IUserOptions An object containing the various configuration properties.

Returns

User

An instance of User and its return functions.

Defined in

core/src/index.ts:526


wait

wait(options?): void

Halt the screen for a specified period of time.

example iq.wait(100) wait(10) this.wait(1000)

Parameters

Name Type Description
options? number | IQWaitOptions In miliseconds

Returns

void

void

Defined in

core/src/index.ts:477