iniquity

A re-imagining of the iconic BBS software.

View on GitHub

Class: User

Core.User

User

summary Some basic user utils. More to follow.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new User(options)

Mechanisms for working with an individual iniquity user

Parameters

Name Type
options IUserOptions

Overrides

Iniquity.constructor

Defined in

core/src/index.ts:803

Properties

access

access: IQModuleACLS

Inherited from

Iniquity.access

Defined in

core/src/index.ts:346


assets

assets: string

Inherited from

Iniquity.assets

Defined in

core/src/index.ts:345


basepath

basepath: string

Inherited from

Iniquity.basepath

Defined in

core/src/index.ts:344


computed

computed: any

Inherited from

Iniquity.computed

Defined in

core/src/index.ts:349


data

data: IQReactorOptions

Inherited from

Iniquity.data

Defined in

core/src/index.ts:348


encoding

encoding: "CP437" | "UTF8"

Inherited from

Iniquity.encoding

Defined in

core/src/index.ts:347


name

name: string = ""

Defined in

core/src/index.ts:795


password

password: string = ""

Defined in

core/src/index.ts:796


terminfo

terminfo: IQTermInfoObject

Terminal information available to iniquity

Inherited from

Iniquity.terminfo

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.

Inherited from

Iniquity.artwork

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

Inherited from

Iniquity.ask

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

Inherited from

Iniquity.cursor

Defined in

core/src/index.ts:443


disconnect

disconnect(): void

Will disconnect the user immediately.

Returns

void

void

Inherited from

Iniquity.disconnect

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

Inherited from

Iniquity.frame

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

Inherited from

Iniquity.gotoxy

Defined in

core/src/index.ts:435


login

login(): any

Returns

any

Defined in

core/src/index.ts:809


logoff

logoff(): void

Returns

void

Inherited from

Iniquity.logoff

Defined in

core/src/index.ts:500


logout

logout(): void

Returns

void

Inherited from

Iniquity.logout

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

Inherited from

Iniquity.menu

Defined in

core/src/index.ts:553


new

new(): object

Returns

object

Defined in

core/src/index.ts:814


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

Inherited from

Iniquity.pause

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

Inherited from

Iniquity.print

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

Inherited from

Iniquity.say

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.

Inherited from

Iniquity.user

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

Inherited from

Iniquity.wait

Defined in

core/src/index.ts:477