diff --git a/.github/workflows/CODEOWNERS b/.github/workflows/CODEOWNERS new file mode 100644 index 0000000..24136e4 --- /dev/null +++ b/.github/workflows/CODEOWNERS @@ -0,0 +1,2 @@ +@HarryCordewener +@SharpMUSH \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f1b4210 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "SharpMUSH-submodule"] + path = SharpMUSH-submodule + url = https://github.com/SharpMUSH/SharpMUSH.git diff --git a/README.md b/README.md index f9f6d31..4ba91d8 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,44 @@ -# Starlight Starter Kit: Basics +# SharpMUSH Documentation + +The official documentation website for SharpMUSH, built with [Astro](https://astro.build) and [Starlight](https://starlight.astro.build). [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) -``` -npm create astro@latest -- --template starlight -``` +## šŸŽÆ Overview -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) -[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics) -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs) +This documentation site automatically pulls help files from the main [SharpMUSH repository](https://github.com/SharpMUSH/SharpMUSH) using Git submodules and converts them to a modern, searchable web interface. -> šŸ§‘ā€šŸš€ **Seasoned astronaut?** Delete this file. Have fun! +## šŸš€ Quick Start -## šŸš€ Project Structure +```bash +# Clone with submodules +git clone --recursive https://github.com/SharpMUSH/SharpMUSH.Docs.git +cd SharpMUSH.Docs + +# Install dependencies +npm install + +# Start development server (auto-converts docs) +npm run dev +``` -Inside of your Astro + Starlight project, you'll see the following folders and files: +## ļæ½ Project Structure ``` . -ā”œā”€ā”€ public/ +ā”œā”€ā”€ SharpMUSH-submodule/ # Git submodule to main repository +ā”œā”€ā”€ scripts/ +│ ā”œā”€ā”€ convert-docs.js # Documentation converter +│ └── README.md # Converter documentation ā”œā”€ā”€ src/ -│ ā”œā”€ā”€ assets/ │ ā”œā”€ā”€ content/ -│ │ ā”œā”€ā”€ docs/ -│ └── content.config.ts +│ │ └── docs/ +│ │ └── reference/ +│ │ └── sharpmush-help/ # Auto-generated from submodule +│ └── assets/ +ā”œā”€ā”€ .github/workflows/ # CI/CD for automatic updates ā”œā”€ā”€ astro.config.mjs -ā”œā”€ā”€ package.json -└── tsconfig.json +└── package.json ``` Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. diff --git a/SharpMUSH-submodule b/SharpMUSH-submodule new file mode 160000 index 0000000..1e64a1e --- /dev/null +++ b/SharpMUSH-submodule @@ -0,0 +1 @@ +Subproject commit 1e64a1ec89c71036a96d924fb24bbaf36088d2e0 diff --git a/astro.config.mjs b/astro.config.mjs index cc4d44d..7054a1a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,6 +5,7 @@ import netlify from '@astrojs/netlify'; // https://astro.build/config export default defineConfig({ + site: 'https://sharpmush.com', integrations: [ starlight({ title: 'SharpMUSH', diff --git a/package.json b/package.json index 80f4be5..39e5532 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,16 @@ "type": "module", "version": "0.0.1", "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", + "dev": "npm run convert-docs && astro dev", + "start": "npm run convert-docs && astro dev", + "build": "npm run convert-docs && astro build", "preview": "astro preview", - "astro": "astro" + "astro": "astro", + "convert-docs": "node scripts/convert-docs.js", + "index-headers": "node scripts/index-headers.js", + "update-submodule": "git submodule update --remote", + "prebuild": "npm run update-submodule && npm run index-headers && npm run convert-docs", + "predev": "npm run convert-docs" }, "dependencies": { "@astrojs/netlify": "^6.2.4", diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..1ae21c5 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,173 @@ +# Documentation Conversion Scripts + +This directory contains scripts for automatically converting SharpMUSH documentation from the Git submodule into Starlight-compatible format. + +## Files + +### `convert-docs.js` + +Converts markdown files from the SharpMUSH submodule into Starlight-compatible documentation with: + +- **Filename-based titles**: Uses predefined titles based on filenames for consistent documentation structure +- **Frontmatter generation**: Adds Starlight-compatible YAML frontmatter with title and description +- **Heading level adjustment**: Converts H1 (`#`) to H2 (`##`) and H2 (`##`) to H3 (`###`) for better integration with Starlight navigation +- **Link conversion**: Converts PennMUSH-style internal links (`[help TOPIC|DISPLAY]`) to Starlight navigation links +- **Automatic categorization**: Intelligently maps help topics to appropriate documentation files + +### `index-headers.js` + +Analyzes all documentation files to generate comprehensive header mappings: + +- **Header extraction**: Finds all `#` and `##` headers in documentation files +- **Normalization**: Converts headers to consistent format for matching +- **Mapping generation**: Creates topic-to-document mappings for accurate cross-references +- **JSON output**: Saves mappings to `doc-mappings.json` for use by the converter +- **Analysis reporting**: Provides statistics on headers found per document + +#### Link Conversion Examples + +- `[help ATTRIBUTE FLAGS|attribute flags]` → `[attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags)` +- `[help @set|@set]` → `[@set](/reference/sharpmush-help/penncmd/#set)` +- `[help nearby()|nearby()]` → `[nearby()](/reference/sharpmush-help/pennfunc/#nearby)` +- `[attribute flags2]` → `[attribute flags2](/reference/sharpmush-help/pennattr/#attribute-flags2)` +- `[nearby()]` → `[nearby()](/reference/sharpmush-help/pennfunc/#nearby)` + +### Exclusions + +The converter intelligently excludes certain patterns from conversion: + +- **Code blocks**: Content inside ``` fenced blocks and `backticks` is preserved +- **Function calls**: `[get(obj/attr)]`, `[function(arg1,arg2)]` are not converted +- **Paths and URLs**: Links containing `/`, `#`, `$`, `&` are skipped +- **Short patterns**: Single characters or very short strings (unless starting with @ or &) +- **Numbers**: Pure numeric content like `[123]` is ignored +- **Existing markdown**: Already converted links with `](` are skipped + +#### Document Mapping + +The script automatically categorizes topics into appropriate documents: + +- **pennattr**: Attribute-related topics (ATTRIBUTE FLAGS, ATTRIBUTE TREES, etc.) +- **penncmd**: Commands (topics starting with @) +- **pennfunc**: Functions (topics ending with ()) +- **pennflag**: Flag-related topics +- **pennlock**: Lock-related topics +- **pennmail**: Mail system topics +- **pennchat**: Chat/channel topics +- **pennevents**: Event system topics +- **pennhttp**: HTTP-related topics +- **pennpueb**: Pueblo client topics +- **pennconf**: Configuration and other topics (fallback) + +#### File Titles + +Document titles are mapped from filenames for consistency: + +| Filename | Title | +|----------|-------| +| `pennattr.md` | Attributes | +| `pennchat.md` | Chat and Channels | +| `penncmd.md` | Commands | +| `penncode.md` | Coding and Programming | +| `pennconf.md` | Configuration | +| `pennevents.md` | Events | +| `pennflag.md` | Flags | +| `pennfunc.md` | Functions | +| `pennhttp.md` | HTTP Features | +| `pennlock.md` | Locks | +| `pennmail.md` | Mail System | +| `pennpueb.md` | Pueblo Client | +| `penntop.md` | Top-Level Topics | + +## Usage + +### Manual Conversion + +```bash +npm run convert-docs +``` + +### Generate Header Mappings + +```bash +npm run index-headers +``` + +### Update Submodule and Convert + +```bash +npm run update-submodule +npm run index-headers +npm run convert-docs +``` + +### Automatic Conversion + +The conversion runs automatically during: + +- `npm run dev` (development server) +- `npm run build` (production build) +- `npm run start` (development server) + +## Configuration + +To modify the conversion behavior, edit the following sections in `convert-docs.js`: + +- **FILE_TITLES**: Update filename-to-title mappings for consistent documentation structure +- **doc-mappings.json**: Generated header-to-document mappings (regenerate with `npm run index-headers`) +- **convertInternalLinks()**: Modify link conversion patterns +- **addFrontmatter()**: Customize frontmatter generation + +### Updating Header Mappings + +Header mappings are automatically generated from the source documentation: + +```bash +# Regenerate mappings from current documentation +npm run index-headers +``` + +This creates/updates `scripts/doc-mappings.json` with: +- All headers found in documentation files +- Normalized header names for consistent matching +- Document assignments for each header +- Metadata about the generation process + +### Updating File Titles + +To change the title for a documentation file, update the `FILE_TITLES` object: + +```javascript +const FILE_TITLES = { + 'pennattr.md': 'New Attributes Title', + 'penncmd.md': 'New Commands Title', + // ... +}; +``` + +## Troubleshooting + +### Submodule Not Found + +If you get an error about the source directory not being found: + +```bash +git submodule init +git submodule update +``` + +### Link Conversion Issues + +If internal links aren't converting properly: + +1. Check the topic name in the source markdown +2. Verify the mapping in `DOC_MAPPINGS` +3. Ensure the target document exists in the output directory + +### Build Failures + +If the build fails during conversion: + +1. Ensure Node.js version 16+ is installed +2. Check that all source files are valid markdown +3. Verify file permissions in the output directory \ No newline at end of file diff --git a/scripts/convert-docs.js b/scripts/convert-docs.js new file mode 100644 index 0000000..15198c6 --- /dev/null +++ b/scripts/convert-docs.js @@ -0,0 +1,312 @@ +#!/usr/bin/env node + +import fs from 'fs/promises'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const SUBMODULE_DOCS_PATH = path.join(__dirname, '..', 'SharpMUSH-submodule', 'SharpMUSH.Documentation', 'Helpfiles', 'SharpMUSH'); +const OUTPUT_DOCS_PATH = path.join(__dirname, '..', 'src', 'content', 'docs', 'reference', 'sharpmush-help'); + +// Mapping of internal link patterns to Starlight-compatible links +const LINK_MAPPINGS = { + // Pattern: [help ATTRIBUTE FLAGS|ATTRIBUTE FLAGS] -> /reference/sharpmush-help/pennattr/#attribute-flags + // Pattern: [help @set|@set] -> /reference/sharpmush-help/penncmd/#set (for commands) + // Pattern: [help nearby()|nearby()] -> /reference/sharpmush-help/pennfunc/#nearby (for functions) +}; + +// Known file titles based on filenames +const FILE_TITLES = { + 'pennattr.md': 'Attributes', + 'pennchat.md': 'Chat and Channels', + 'penncmd.md': 'Commands', + 'penncode.md': 'Coding and Programming', + 'pennconf.md': 'Configuration', + 'pennevents.md': 'Events', + 'pennflag.md': 'Flags', + 'pennfunc.md': 'Functions', + 'pennhttp.md': 'HTTP Features', + 'pennlock.md': 'Locks', + 'pennmail.md': 'Mail System', + 'pennpueb.md': 'Pueblo Client', + 'penntop.md': 'Top-Level Topics' +}; + +// Load document mappings from JSON file +let DOC_MAPPINGS = {}; + +async function loadDocMappings() { + try { + const mappingsPath = path.join(__dirname, 'doc-mappings.json'); + const mappingsData = await fs.readFile(mappingsPath, 'utf-8'); + const parsed = JSON.parse(mappingsData); + DOC_MAPPINGS = parsed.mappings || {}; + console.log(`Loaded ${Object.keys(DOC_MAPPINGS).length} header mappings from doc-mappings.json`); + } catch (error) { + console.warn('Could not load doc-mappings.json, using fallback logic:', error.message); + console.warn('Run "node scripts/index-headers.js" to generate mappings.'); + DOC_MAPPINGS = {}; + } +} + +function createSlugFromTitle(title) { + return title.toLowerCase() + .replace(/[()]/g, '') // Remove parentheses + .replace(/[@]/g, '') // Remove @ symbols + .replace(/[^a-z0-9\s-]/g, '') // Remove other special chars + .replace(/\s+/g, '-') // Replace spaces with hyphens + .replace(/-+/g, '-') // Replace multiple hyphens with single + .replace(/^-|-$/g, ''); // Remove leading/trailing hyphens +} + +function convertInternalLinks(content) { + // Split content into sections, preserving code blocks + const sections = []; + let currentIndex = 0; + + // Find all code blocks (``` fenced blocks and single backticks) + const codeBlockPattern = /```[\s\S]*?```|`[^`\n]*`/g; + let match; + + while ((match = codeBlockPattern.exec(content)) !== null) { + // Add text before the code block + if (match.index > currentIndex) { + sections.push({ + type: 'text', + content: content.slice(currentIndex, match.index) + }); + } + + // Add the code block (unchanged) + sections.push({ + type: 'code', + content: match[0] + }); + + currentIndex = match.index + match[0].length; + } + + // Add remaining text after last code block + if (currentIndex < content.length) { + sections.push({ + type: 'text', + content: content.slice(currentIndex) + }); + } + + // Process only text sections for link conversion + const processedSections = sections.map(section => { + if (section.type === 'code') { + return section.content; // Return code unchanged + } + + let textContent = section.content; + + // Pattern 1: [help TOPIC|DISPLAY] or [help TOPIC] + const helpLinkPattern = /\[help\s+([^\]|]+?)(\|([^\]]+?))?\]/gi; + textContent = textContent.replace(helpLinkPattern, (match, topic, pipe, display) => { + const displayText = display || topic; + return convertTopicToLink(topic, displayText); + }); + + // Pattern 2: Simple [TOPIC] links - but be more selective + const simpleLinkPattern = /\[([^\]]+?)\]/g; + textContent = textContent.replace(simpleLinkPattern, (match, topic) => { + // Skip if this looks like it's already a markdown link + if (topic.includes('](') || topic.includes('http') || match.includes('](')) { + return match; + } + + // Skip common non-help patterns + if (topic.match(/^\d+$/) || topic.length < 2) { + return match; + } + + // Skip function calls and other code-like patterns + if (topic.includes('(') && topic.includes(')')) { + // But allow function names that are likely help topics + if (!topic.match(/^\w+\(\)$/)) { + return match; + } + } + + // Skip patterns that contain special characters that suggest they're not help topics + if (topic.includes('/') || topic.includes('#') || topic.includes('$') || topic.includes('&')) { + return match; + } + + // Skip single character or very short topics that are likely not help references + if (topic.length < 3 && !topic.match(/^[@&]/)) { + return match; + } + + return convertTopicToLink(topic, topic); + }); + + return textContent; + }); + + return processedSections.join(''); +} + +function convertTopicToLink(topic, displayText) { + const topicUpper = topic.toUpperCase().trim(); + + // Find the appropriate document for this topic + let targetDoc = DOC_MAPPINGS[topicUpper]; + + // If not found in mappings, try to guess based on naming patterns + if (!targetDoc) { + if (topicUpper.includes('()') || topicUpper.endsWith('()')) { + targetDoc = 'pennfunc'; + } else if (topicUpper.startsWith('@')) { + targetDoc = 'penncmd'; + } else if (topicUpper.includes('ATTRIBUTE') || topicUpper.includes('ATTR')) { + targetDoc = 'pennattr'; + } else if (topicUpper.includes('FLAG')) { + targetDoc = 'pennflag'; + } else if (topicUpper.includes('LOCK')) { + targetDoc = 'pennlock'; + } else if (topicUpper.includes('MAIL')) { + targetDoc = 'pennmail'; + } else if (topicUpper.includes('CHAT') || topicUpper.includes('CHANNEL')) { + targetDoc = 'pennchat'; + } else if (topicUpper.includes('EVENT')) { + targetDoc = 'pennevents'; + } else if (topicUpper.includes('HTTP')) { + targetDoc = 'pennhttp'; + } else if (topicUpper.includes('PUEBLO')) { + targetDoc = 'pennpueb'; + } else if (topicUpper.includes('REGEX')) { + targetDoc = 'pennconf'; + } else if (topicUpper.includes('VERB')) { + targetDoc = 'penncmd'; + } else { + targetDoc = 'pennconf'; // Default fallback + } + } + + const slug = createSlugFromTitle(topic); + const link = `/reference/sharpmush-help/${targetDoc}/${slug ? '#' + slug : ''}`; + + return `[${displayText}](${link})`; +} + +function convertHeadingLevels(content) { + // First convert ## H2 tags to ### H3 tags + content = content.replace(/^## (.+)$/gm, '### $1'); + + // Then convert # H1 tags to ## H2 tags + content = content.replace(/^# (.+)$/gm, '## $1'); + + return content; +} + +function addFrontmatter(content, filename) { + // Use filename-based title instead of extracting from headers + let title = FILE_TITLES[filename] || filename.replace('.md', ''); + + // Clean and escape title for YAML + title = title + .trim() + .replace(/\r?\n/g, ' ') // Replace newlines with spaces + .replace(/\s+/g, ' ') // Collapse multiple spaces + .replace(/"/g, '\\"'); // Escape quotes + + // Use simple string format for YAML to avoid issues + const frontmatter = `--- +title: "${title}" +description: "SharpMUSH documentation for ${title}" +--- + +`; + + return frontmatter + content; +} + +async function ensureDirectoryExists(dirPath) { + try { + await fs.access(dirPath); + } catch { + await fs.mkdir(dirPath, { recursive: true }); + } +} + +async function convertFile(sourceFile, targetFile) { + try { + console.log(`Converting ${sourceFile} -> ${targetFile}`); + + let content = await fs.readFile(sourceFile, 'utf-8'); + + // Convert heading levels (H1 -> H2, H2 -> H3) + content = convertHeadingLevels(content); + + // Convert internal links + content = convertInternalLinks(content); + + // Add Starlight frontmatter + content = addFrontmatter(content, path.basename(sourceFile)); + + // Ensure target directory exists + await ensureDirectoryExists(path.dirname(targetFile)); + + // Write converted content + await fs.writeFile(targetFile, content, 'utf-8'); + + console.log(`āœ“ Converted ${path.basename(sourceFile)}`); + } catch (error) { + console.error(`āœ— Error converting ${sourceFile}:`, error.message); + throw error; + } +} + +async function convertAllDocs() { + try { + console.log('Starting documentation conversion...'); + console.log(`Source: ${SUBMODULE_DOCS_PATH}`); + console.log(`Target: ${OUTPUT_DOCS_PATH}`); + + // Load document mappings + await loadDocMappings(); + + // Ensure source directory exists + try { + await fs.access(SUBMODULE_DOCS_PATH); + } catch { + console.error(`Source directory not found: ${SUBMODULE_DOCS_PATH}`); + console.error('Make sure the git submodule is properly initialized.'); + process.exit(1); + } + + // Get list of markdown files in source directory + const files = await fs.readdir(SUBMODULE_DOCS_PATH); + const markdownFiles = files.filter(file => file.endsWith('.md')); + + if (markdownFiles.length === 0) { + console.warn('No markdown files found in source directory'); + return; + } + + console.log(`Found ${markdownFiles.length} markdown files to convert`); + + // Convert each file + for (const file of markdownFiles) { + const sourceFile = path.join(SUBMODULE_DOCS_PATH, file); + const targetFile = path.join(OUTPUT_DOCS_PATH, file); + + await convertFile(sourceFile, targetFile); + } + + console.log(`\nāœ… Successfully converted ${markdownFiles.length} files`); + console.log(`šŸ“ Output directory: ${OUTPUT_DOCS_PATH}`); + + } catch (error) { + console.error('āŒ Conversion failed:', error.message); + process.exit(1); + } +} + +// Run the conversion +convertAllDocs(); \ No newline at end of file diff --git a/scripts/doc-mappings.json b/scripts/doc-mappings.json new file mode 100644 index 0000000..c4d0e4e --- /dev/null +++ b/scripts/doc-mappings.json @@ -0,0 +1,10866 @@ +{ + "_metadata": { + "generatedAt": "2025-10-21T20:04:17.972Z", + "sourceFiles": [ + "pennattr.md", + "pennchat.md", + "penncmd.md", + "penncode.md", + "pennconf.md", + "pennevents.md", + "pennflag.md", + "pennfunc.md", + "pennhttp.md", + "pennlock.md", + "pennmail.md", + "pennpueb.md", + "penntop.md" + ], + "totalMappings": 1567 + }, + "mappings": { + "ATTRIBUTE FLAGS": "pennattr", + "ATTRIBUTE FLAGS2": "pennattr", + "ATTRIBUTE FLAGS3": "pennattr", + "SEE ALSO": "penntop", + "ATTRIBUTE TREES": "pennattr", + "ATTR TREES": "pennattr", + "ATTRIB TREES": "pennattr", + "ATTRIBUTE TREES2": "pennattr", + "ATTR TREES2": "pennattr", + "ATTRIB TREES2": "pennattr", + "\\`2": "pennattr", + "ATTRIBUTE TREES3": "pennattr", + "ATTR TREES3": "pennattr", + "ATTRIB TREES3": "pennattr", + "\\`3": "pennattr", + "ATTRIBUTE TREES4": "pennattr", + "ATTR TREES4": "pennattr", + "ATTRIB TREES4": "pennattr", + "\\`4": "pennattr", + "CHAT": "pennchat", + "CHAT SYSTEM": "pennchat", + "COMSYS": "pennchat", + "CHANNELS": "pennchat", + "@CHAT": "pennchat", + "EXAMPLE": "pennchat", + "@CHATFORMAT": "pennchat", + "REGISTERS": "penntop", + "@CHATFORMAT2": "pennchat", + "EXAMPLES": "pennchat", + "@CHATFORMAT3": "pennchat", + "CHAN_USEFIRSTMATCH": "pennchat", + "@CEMIT": "pennchat", + "@NSCEMIT": "pennchat", + "CEMIT()": "pennchat", + "NSCEMIT()": "pennchat", + "@CHANNEL": "pennchat", + "@CHANNEL JOINING": "pennchat", + "@CHANNEL/LIST": "pennchat", + "@CHANNEL/WHAT": "pennchat", + "@CHANNEL/WHO": "pennchat", + "@CHANNEL/ON": "pennchat", + "@CHANNEL/JOIN": "pennchat", + "@CHANNEL/OFF": "pennchat", + "@CHANNEL/LEAVE": "pennchat", + "@CHANNEL JOINING2": "pennchat", + "@CHANNEL/GAG": "pennchat", + "@CHANNEL/UNGAG": "pennchat", + "@CHANNEL/HIDE": "pennchat", + "@CHANNEL/UNHIDE": "pennchat", + "@CHANNEL/MUTE": "pennchat", + "@CHANNEL/COMBINE": "pennchat", + "@CHANNEL/UNCOMBINE": "pennchat", + "@CHANNEL OTHER": "pennchat", + "@CHANNEL/RECALL": "pennchat", + "@CHANNEL/TITLE": "pennchat", + "@CHANNEL/BUFFER": "pennchat", + "@CHANNEL ADMIN": "pennchat", + "@CHANNEL/ADD": "pennchat", + "@CHANNEL/DELETE": "pennchat", + "@CHANNEL/MOGRIFIER": "pennchat", + "@CHANNEL/CHOWN": "pennchat", + "@CHANNEL/NAME": "pennchat", + "@CHANNEL/DESC": "pennchat", + "@CHANNEL/PRIVS": "pennchat", + "@CHANNEL/WIPE": "pennchat", + "@CHANNEL/CLOCK": "pennchat", + "@CHANNEL LIST": "pennchat", + "@CHANNEL PRIVS": "pennchat", + "@CHANNEL CLOCK": "pennchat", + "@CLOCK": "pennchat", + "CHANNEL FUNCTIONS": "pennchat", + "CHANNELS()": "pennchat", + "COWNER()": "pennchat", + "CFLAGS()": "pennchat", + "CSTATUS()": "pennchat", + "MUXCOMSYS": "pennchat", + "COMMANDS": "penncmd", + "@-ATTRIBUTES": "penncmd", + "@-BUILDING": "penncmd", + "@-GENERAL": "penncmd", + "@-WIZARD": "penncmd", + "]2": "penncmd", + "@@": "penncmd", + "@ACLONE": "penncmd", + "@ACONNECT": "penncmd", + "@AMAIL": "penncmd", + "@ADESCRIBE": "penncmd", + "@ODESCRIBE": "penncmd", + "@ADESTROY": "penncmd", + "@ADISCONNECT": "penncmd", + "@ADROP": "penncmd", + "@ODROP": "penncmd", + "@DROP": "penncmd", + "@AEFAIL": "penncmd", + "@OEFAIL": "penncmd", + "@EFAIL": "penncmd", + "@AUFAIL": "penncmd", + "@OUFAIL": "penncmd", + "@UFAIL": "penncmd", + "@AFAILURE": "penncmd", + "@OFAILURE": "penncmd", + "@FAILURE": "penncmd", + "@FOLLOW": "penncmd", + "@OFOLLOW": "penncmd", + "@AFOLLOW": "penncmd", + "@UNFOLLOW": "penncmd", + "@OUNFOLLOW": "penncmd", + "@AUNFOLLOW": "penncmd", + "@AHEAR": "penncmd", + "@AMHEAR": "penncmd", + "@AAHEAR": "penncmd", + "@LEAVE": "penncmd", + "@OLEAVE": "penncmd", + "@OXLEAVE": "penncmd", + "@ALEAVE": "penncmd", + "@LFAIL": "penncmd", + "@OLFAIL": "penncmd", + "@ALFAIL": "penncmd", + "@ALIAS": "penncmd", + "@MOVE": "penncmd", + "@OMOVE": "penncmd", + "@OXMOVE": "penncmd", + "@AMOVE": "penncmd", + "@AENTER": "penncmd", + "@ENTER": "penncmd", + "@OENTER": "penncmd", + "@OXENTER": "penncmd", + "@APAYMENT": "penncmd", + "@PAYMENT": "penncmd", + "@OPAYMENT": "penncmd", + "@ATPORT": "penncmd", + "@TPORT": "penncmd", + "@OTPORT": "penncmd", + "@OXTPORT": "penncmd", + "@ATRCHOWN": "penncmd", + "@ATTRCHOWN": "penncmd", + "@ATRLOCK": "penncmd", + "@ATTRLOCK": "penncmd", + "@ASUCCESS": "penncmd", + "@SUCCESS": "penncmd", + "@OSUCCESS": "penncmd", + "@ATTRIBUTE": "penncmd", + "@ATTRIBUTE2": "penncmd", + "@ATTRIBUTE3": "penncmd", + "@AUSE": "penncmd", + "@USE": "penncmd", + "@OUSE": "penncmd", + "@AWAY": "penncmd", + "@BOOT": "penncmd", + "@BREAK": "penncmd", + "@ASSERT": "penncmd", + "@BREAK2": "penncmd", + "@ASSERT2": "penncmd", + "@CHARGES": "penncmd", + "@RUNOUT": "penncmd", + "CHARGES2": "penncmd", + "RUNOUT2": "penncmd", + "@CHOWN": "penncmd", + "@CHOWNALL": "penncmd", + "@CHZONE": "penncmd", + "@CHZONE2": "penncmd", + "@CHZONEALL": "penncmd", + "@CLONE": "penncmd", + "@COMMAND": "penncmd", + "@COMMAND2": "penncmd", + "@COMMAND3": "penncmd", + "@COMMENT": "penncmd", + "@CONFIG": "penncmd", + "@CONFORMAT": "penncmd", + "@INCLUDE": "penncmd", + "@INCLUDE2": "penncmd", + "@INVFORMAT": "penncmd", + "@DESCFORMAT": "penncmd", + "@IDESCFORMAT": "penncmd", + "@NAMEACCENT": "penncmd", + "@NAMEFORMAT": "penncmd", + "@COST": "penncmd", + "@CPATTR": "penncmd", + "@MVATTR": "penncmd", + "@CREATE": "penncmd", + "@DBCK": "penncmd", + "@DECOMPILE": "penncmd", + "@DECOMPILE2": "penncmd", + "@DECOMPILE3": "penncmd", + "@DESCRIBE": "penncmd", + "@DESC": "penncmd", + "@DESTROY": "penncmd", + "@RECYCLE": "penncmd", + "@NUKE": "penncmd", + "@DESTROY2": "penncmd", + "DESTRUCTION": "penncmd", + "@UNDESTROY": "penncmd", + "@UNRECYCLE": "penncmd", + "@DIG": "penncmd", + "@DIG2": "penncmd", + "@DOING": "penncmd", + "@DOLIST": "penncmd", + "@DOLIST2": "penncmd", + "@DOLIST3": "penncmd", + "@DRAIN": "penncmd", + "@DUMP": "penncmd", + "@EALIAS": "penncmd", + "@LALIAS": "penncmd", + "@EDIT": "penncmd", + "@GEDIT": "penncmd", + "@EDIT2": "penncmd", + "@ELOCK": "penncmd", + "@EUNLOCK": "penncmd", + "@EMIT": "penncmd", + "@ENABLE": "penncmd", + "@DISABLE": "penncmd", + "@ZENTER": "penncmd", + "@OZENTER": "penncmd", + "@AZENTER": "penncmd", + "@ZLEAVE": "penncmd", + "@OZLEAVE": "penncmd", + "@AZLEAVE": "penncmd", + "@ENTRANCES": "penncmd", + "@EXITFORMAT": "penncmd", + "@HTTP": "penncmd", + "@FIRSTEXIT": "penncmd", + "@FILTER": "penncmd", + "@FILTER2": "penncmd", + "@FIND": "penncmd", + "@FORWARDLIST": "penncmd", + "FORWARDLIST": "penncmd", + "@DEBUGFORWARDLIST": "penncmd", + "DEBUGFORWARDLIST": "penncmd", + "@FORCE": "penncmd", + "@FORCE2": "penncmd", + "@FORCE3": "penncmd", + "@FLAG": "penncmd", + "@FLAG2": "penncmd", + "FLAG PERMISSIONS": "penncmd", + "@FUNCTION": "penncmd", + "@FUNCTION2": "penncmd", + "@FUNCTION3": "penncmd", + "@FUNCTION4": "penncmd", + "@GREP": "penncmd", + "@HALT": "penncmd", + "@ALLHALT": "penncmd", + "@HAVEN": "penncmd", + "@HIDE": "penncmd", + "@IDESCRIBE": "penncmd", + "@OIDESCRIBE": "penncmd", + "@AIDESCRIBE": "penncmd", + "@HOOK": "penncmd", + "@HOOK2": "penncmd", + "@HOOK3": "penncmd", + "@HOOK4": "penncmd", + "@HOOK5": "penncmd", + "@HOOK6": "penncmd", + "@HOOK7": "penncmd", + "HUH_COMMAND": "penncmd", + "@IDLE": "penncmd", + "@IF": "penncmd", + "@IFELSE": "penncmd", + "@SKIP": "penncmd", + "@IF2": "penncmd", + "@INFILTER": "penncmd", + "@INPREFIX": "penncmd", + "@KICK": "penncmd", + "@LEMIT": "penncmd", + "@LIST": "penncmd", + "@LINK": "penncmd", + "@DESTINATION": "penncmd", + "@EXITTO": "penncmd", + "VARIABLE EXITS": "penncmd", + "@LISTEN": "penncmd", + "@LISTEN2": "penncmd", + "LOCKING": "penncmd", + "LOCKS": "penncmd", + "@LOCK": "penncmd", + "@LSET": "penncmd", + "@LOG": "penncmd", + "@LOGWIPE": "penncmd", + "@MESSAGE": "penncmd", + "@MESSAGE2": "penncmd", + "@MESSAGE3": "penncmd", + "@MONIKER": "penncmd", + "@MOTD": "penncmd", + "@LISTMOTD": "penncmd", + "@WIZMOTD": "penncmd", + "@REJECTMOTD": "penncmd", + "@NAME": "penncmd", + "@ONAME": "penncmd", + "@ANAME": "penncmd", + "@NEWPASSWORD": "penncmd", + "@NOTIFY": "penncmd", + "@NOTIFY2": "penncmd", + "@NSPEMIT": "penncmd", + "@NSEMIT": "penncmd", + "@NSLEMIT": "penncmd", + "@NSREMIT": "penncmd", + "@NSZEMIT": "penncmd", + "@NSOEMIT": "penncmd", + "@NSPROMPT": "penncmd", + "@OEMIT": "penncmd", + "@OEMIT2": "penncmd", + "@OPEN": "penncmd", + "@PARENT": "penncmd", + "@PASSWORD": "penncmd", + "@PAGEFORMAT": "penncmd", + "@OUTPAGEFORMAT": "penncmd", + "@PAGEFORMAT2": "penncmd", + "@OUTPAGEFORMAT2": "penncmd", + "@RECEIVE": "penncmd", + "@ORECEIVE": "penncmd", + "@ARECEIVE": "penncmd", + "@GIVE": "penncmd", + "@OGIVE": "penncmd", + "@AGIVE": "penncmd", + "@PCREATE": "penncmd", + "@PROMPT": "penncmd", + "PROMPT_NEWLINES": "penncmd", + "@PEMIT": "penncmd", + "@PEMIT2": "penncmd", + "@POLL": "penncmd", + "@POOR": "penncmd", + "@POWER": "penncmd", + "@POWER2": "penncmd", + "@POWER3": "penncmd", + "@PREFIX": "penncmd", + "@PS": "penncmd", + "@PS2": "penncmd", + "@PURGE": "penncmd", + "@QUOTA": "penncmd", + "@QUOTA2": "penncmd", + "@SQUOTA": "penncmd", + "@ALLQUOTA": "penncmd", + "@READCACHE": "penncmd", + "@REMIT": "penncmd", + "@RETRY": "penncmd", + "@RETRY2": "penncmd", + "@RESTART": "penncmd", + "@SCAN": "penncmd", + "@SEARCH": "penncmd", + "@SEARCH2": "penncmd", + "@SEARCH3": "penncmd", + "@SEARCH4": "penncmd", + "@SEARCH5": "penncmd", + "@SET": "penncmd", + "ATTRIB_SET": "penncmd", + "@_": "penncmd", + "@SEX": "penncmd", + "@SHUTDOWN": "penncmd", + "@SITELOCK": "penncmd", + "@SITELOCK2": "penncmd", + "@SITELOCK3": "penncmd", + "@SLAVE": "penncmd", + "@SOCKSET": "penncmd", + "SOCKSET": "penncmd", + "COLORSTYLE": "penncmd", + "@SPEECHMOD": "penncmd", + "@MAPSQL": "penncmd", + "@SQL": "penncmd", + "@STARTUP": "penncmd", + "@STATS": "penncmd", + "@SWEEP": "penncmd", + "@SWITCH": "penncmd", + "@SELECT": "penncmd", + "@SWITCH2": "penncmd", + "@SWITCH3": "penncmd", + "@SWITCH4": "penncmd", + "@TELEPORT": "penncmd", + "@TELEPORT2": "penncmd", + "@TRIGGER": "penncmd", + "@TRIGGER2": "penncmd", + "@TRIGGER3": "penncmd", + "@ULOCK": "penncmd", + "@UUNLOCK": "penncmd", + "@UPTIME": "penncmd", + "@UPTIME2": "penncmd", + "@UNLINK": "penncmd", + "@UNLOCK": "penncmd", + "@VERSION": "penncmd", + "@VERB": "penncmd", + "@VERB2": "penncmd", + "@VERB3": "penncmd", + "@VERB4": "penncmd", + "@WAIT": "penncmd", + "@WAIT2": "penncmd", + "@WAIT3": "penncmd", + "@WALL": "penncmd", + "@RWALL": "penncmd", + "@WIZWALL": "penncmd", + "@WARNINGS": "penncmd", + "@WARNINGS2": "penncmd", + "@WARNINGS3": "penncmd", + "@WCHECK": "penncmd", + "@WHEREIS": "penncmd", + "@WIPE": "penncmd", + "@ZEMIT": "penncmd", + "AHELP": "penncmd", + "ANEWS": "penncmd", + "BRIEF": "penncmd", + "CD": "penncmd", + "CH": "penncmd", + "CV": "penncmd", + "OUTPUTPREFIX": "penncmd", + "OUTPUTSUFFIX": "penncmd", + "IDLE": "penncmd", + "TEACH": "penncmd", + "DROP": "penncmd", + "ENTER": "penncmd", + "EXAMINE": "penncmd", + "FOLLOW": "penncmd", + "DISMISS": "penncmd", + "DESERT": "penncmd", + "EMPTY": "penncmd", + "GET": "penncmd", + "TAKE": "penncmd", + "@BUY": "penncmd", + "@ABUY": "penncmd", + "@OBUY": "penncmd", + "@PRICELIST": "penncmd", + "BUY": "penncmd", + "GIVE": "penncmd", + "GO": "penncmd", + "GOTO": "penncmd", + "MOVE": "penncmd", + "INFO": "penncmd", + "INVENTORY": "penncmd", + "LEAVE": "penncmd", + "LOGOUT": "penncmd", + "LOOK": "penncmd", + "READ": "penncmd", + "LOOK2": "penncmd", + "NEWS": "penncmd", + "PAGE": "penncmd", + "PAGE2": "penncmd", + "POSE": "penncmd", + "SEMIPOSE": "penncmd", + "POSE2": "penncmd", + "SAY": "penncmd", + "SCORE": "penncmd", + "THINK": "penncmd", + "QUIT": "penncmd", + "UNFOLLOW": "penncmd", + "USE": "penncmd", + "WARN_ON_MISSING": "penncmd", + "UNIMPLEMENTED_COMMAND": "penncmd", + "WHISPER": "penncmd", + "WHO": "penncmd", + "DOING": "penncmd", + "WHO2": "penncmd", + "SESSION": "penncmd", + "WITH": "penncmd", + "SOCKET COMMANDS": "penncmd", + "MSSP-REQUEST": "penncmd", + "@SUGGEST": "penncmd", + "CODE": "penncode", + "CONTACT": "penncode", + "DOWNLOAD": "penncode", + "I18N": "penncode", + "INTERNATIONALIZATION": "penncode", + "LOCALE": "penncode", + "TRANSLATION": "penncode", + "COPYRIGHT": "penncode", + "COPYRITE": "penncode", + "LICENSE": "penncode", + "@CONFIG PARAMETERS": "pennconf", + "@CONFIG ATTRIBS": "pennconf", + "@CONFIG CHAT": "pennconf", + "@CONFIG CMDS": "pennconf", + "@CONFIG COSMETIC": "pennconf", + "@CONFIG COSMETIC2": "pennconf", + "@CONFIG COSTS": "pennconf", + "@CONFIG DB": "pennconf", + "@CONFIG DUMP": "pennconf", + "@CONFIG FLAGS": "pennconf", + "@CONFIG FUNCS": "pennconf", + "@CONFIG LIMITS": "pennconf", + "@CONFIG LIMITS2": "pennconf", + "@CONFIG LIMITS3": "pennconf", + "@CONFIG LIMITS4": "pennconf", + "@CONFIG LOG": "pennconf", + "@CONFIG NET": "pennconf", + "@CONFIG TINY": "pennconf", + "EVENTS": "pennevents", + "EVENT": "pennevents", + "EVENT EXAMPLES": "pennevents", + "EVENT EXAMPLES2": "pennevents", + "EVENT LIST": "pennevents", + "EVENT DB": "pennevents", + "EVENT DUMP": "pennevents", + "EVENT LOG": "pennevents", + "EVENT OBJECT": "pennevents", + "EVENT SQL": "pennevents", + "EVENT SIGNAL": "pennevents", + "EVENT PLAYER": "pennevents", + "EVENT SOCKET": "pennevents", + "EVENT HTTP": "pennevents", + "FLAGS": "pennflag", + "FLAGS2": "pennflag", + "FLAG LIST": "pennflag", + "FLAGS LIST": "pennflag", + "ABODE": "pennflag", + "ANSI": "pennflag", + "AUDIBLE": "pennflag", + "TRACK_MONEY": "pennflag", + "CHOWN_OK": "pennflag", + "CLOUDY": "pennflag", + "COLOR": "pennflag", + "XTERM256": "pennflag", + "CONNECTED": "pennflag", + "DARK": "pennflag", + "DEBUG": "pennflag", + "DEBUG2": "pennflag", + "DESTROY_OK": "pennflag", + "ENTER_OK": "pennflag", + "FIXED": "pennflag", + "FLOATING": "pennflag", + "GAGGED": "pennflag", + "GOING": "pennflag", + "HALTED": "pennflag", + "HAVEN": "pennflag", + "INHERIT": "pennflag", + "JUMP_OK": "pennflag", + "KEEPALIVE": "pennflag", + "LIGHT": "pennflag", + "LINK_OK": "pennflag", + "MONITOR": "pennflag", + "MYOPIC": "pennflag", + "NOSPOOF": "pennflag", + "OPAQUE": "pennflag", + "ORPHAN": "pennflag", + "PUPPET": "pennflag", + "QUIET": "pennflag", + "SAFE": "pennflag", + "SHARED": "pennflag", + "STICKY": "pennflag", + "TRANSPARENT": "pennflag", + "UNFINDABLE": "pennflag", + "UNINSPECTED": "pennflag", + "VERBOSE": "pennflag", + "VISUAL": "pennflag", + "WIZARD": "pennflag", + "FUNCTIONS": "pennfunc", + "FUNCTION": "pennfunc", + "FUNCTIONS2": "pennfunc", + "FUNCTION LIST": "pennfunc", + "FUNCTION TYPES": "pennfunc", + "ATTRIBUTE FUNCTIONS": "pennfunc", + "BITWISE FUNCTIONS": "pennfunc", + "BOOLEAN FUNCTIONS": "pennfunc", + "COMMUNICATION FUNCTIONS": "pennfunc", + "CONNECTION FUNCTIONS": "pennfunc", + "DBREF FUNCTIONS": "pennfunc", + "INFORMATION FUNCTIONS": "pennfunc", + "LIST FUNCTIONS": "pennfunc", + "MATH FUNCTIONS": "pennfunc", + "VECTOR FUNCTIONS": "pennfunc", + "REGULAR EXPRESSION FUNCTIONS": "pennfunc", + "SQL FUNCTIONS": "pennfunc", + "STRING FUNCTIONS": "pennfunc", + "TIME FUNCTIONS": "pennfunc", + "UTILITY FUNCTIONS": "pennfunc", + "@@()": "pennfunc", + "NULL()": "pennfunc", + "ABS()": "pennfunc", + "ACCENT()": "pennfunc", + "ACCENTS": "pennfunc", + "ACCENTS2": "pennfunc", + "ACCENT2": "pennfunc", + "ACCENTS3": "pennfunc", + "ACCNAME()": "pennfunc", + "ACOS()": "pennfunc", + "ADD()": "pennfunc", + "AFTER()": "pennfunc", + "ALIGN()": "pennfunc", + "LALIGN()": "pennfunc", + "ALIGN2": "pennfunc", + "ALIGN3": "pennfunc", + "ALIGN4": "pennfunc", + "ALIGN5": "pennfunc", + "ALLOF()": "pennfunc", + "ALPHAMAX()": "pennfunc", + "ALPHAMIN()": "pennfunc", + "AND()": "pennfunc", + "CAND()": "pennfunc", + "ANDFLAGS()": "pennfunc", + "ANDLFLAGS()": "pennfunc", + "ANDLPOWERS()": "pennfunc", + "ANSI()": "pennfunc", + "ANSI2": "pennfunc", + "ANSI3": "pennfunc", + "APOSS()": "pennfunc", + "%A": "pennfunc", + "ART()": "pennfunc", + "ASIN()": "pennfunc", + "ATAN()": "pennfunc", + "ATAN2()": "pennfunc", + "ATRLOCK()": "pennfunc", + "ATTRIB_SET()": "pennfunc", + "BAND()": "pennfunc", + "BASECONV()": "pennfunc", + "BEEP()": "pennfunc", + "BEFORE()": "pennfunc", + "BENCHMARK()": "pennfunc", + "BRACKETS()": "pennfunc", + "BNAND()": "pennfunc", + "BNOT()": "pennfunc", + "BOR()": "pennfunc", + "BOUND()": "pennfunc", + "BXOR()": "pennfunc", + "CAPSTR()": "pennfunc", + "CAT()": "pennfunc", + "STRCAT()": "pennfunc", + "CENTER()": "pennfunc", + "CHECKPASS()": "pennfunc", + "CHR()": "pennfunc", + "ORD()": "pennfunc", + "CLONE()": "pennfunc", + "CMDS()": "pennfunc", + "SENT()": "pennfunc", + "RECV()": "pennfunc", + "COLORS()": "pennfunc", + "COLORS2": "pennfunc", + "COMP()": "pennfunc", + "CON()": "pennfunc", + "COND()": "pennfunc", + "CONDALL()": "pennfunc", + "NCOND()": "pennfunc", + "NCONDALL()": "pennfunc", + "CONFIG()": "pennfunc", + "CONN()": "pennfunc", + "CONTROLS()": "pennfunc", + "CONVSECS()": "pennfunc", + "CONVUTCSECS()": "pennfunc", + "CONVTIME()": "pennfunc", + "CONVUTCTIME()": "pennfunc", + "COS()": "pennfunc", + "PCREATE()": "pennfunc", + "CREATE()": "pennfunc", + "CTIME()": "pennfunc", + "CSECS()": "pennfunc", + "ANGLES": "pennfunc", + "CTU()": "pennfunc", + "DEC()": "pennfunc", + "DECOMPOSE()": "pennfunc", + "DEFAULT()": "pennfunc", + "STRDELETE()": "pennfunc", + "DELETE()": "pennfunc", + "DIE()": "pennfunc", + "DIG()": "pennfunc", + "DIGEST()": "pennfunc", + "MD5": "pennfunc", + "SHA1": "pennfunc", + "CHECKSUM": "pennfunc", + "HASH": "pennfunc", + "DIST2D()": "pennfunc", + "DIST3D()": "pennfunc", + "DIV()": "pennfunc", + "FLOORDIV()": "pennfunc", + "FDIV()": "pennfunc", + "DOING()": "pennfunc", + "E()": "pennfunc", + "EXP()": "pennfunc", + "EDEFAULT()": "pennfunc", + "EDIT()": "pennfunc", + "ELEMENTS()": "pennfunc", + "ELOCK()": "pennfunc", + "EMIT()": "pennfunc", + "NSEMIT()": "pennfunc", + "ENCODE64()": "pennfunc", + "DECODE64()": "pennfunc", + "BASE64": "pennfunc", + "ENCRYPT()": "pennfunc", + "DECRYPT()": "pennfunc", + "ENTRANCES()": "pennfunc", + "EQ()": "pennfunc", + "ESCAPE()": "pennfunc", + "EVAL()": "pennfunc", + "GET_EVAL()": "pennfunc", + "EXIT()": "pennfunc", + "EXTRACT()": "pennfunc", + "FILTER()": "pennfunc", + "FILTERBOOL()": "pennfunc", + "FINDABLE()": "pennfunc", + "FIRST()": "pennfunc", + "FIRSTOF()": "pennfunc", + "FLAGS()": "pennfunc", + "LFLAGS()": "pennfunc", + "FLIP()": "pennfunc", + "REVERSE()": "pennfunc", + "FMOD()": "pennfunc", + "FOLD()": "pennfunc", + "FOLD2": "pennfunc", + "FOLLOWERS()": "pennfunc", + "FOLLOWING()": "pennfunc", + "FOREACH()": "pennfunc", + "FOREACH2": "pennfunc", + "FRACTION()": "pennfunc", + "FULLNAME()": "pennfunc", + "FUNCTIONS()": "pennfunc", + "GET()": "pennfunc", + "XGET()": "pennfunc", + "GETPIDS()": "pennfunc", + "GRAB()": "pennfunc", + "REGRAB()": "pennfunc", + "REGRABI()": "pennfunc", + "GRABALL()": "pennfunc", + "REGRABALL()": "pennfunc", + "REGRABALLI()": "pennfunc", + "GREP()": "pennfunc", + "REGREP()": "pennfunc", + "WILDGREP()": "pennfunc", + "GREPI()": "pennfunc", + "REGREPI()": "pennfunc", + "WILDGREPI()": "pennfunc", + "PGREP()": "pennfunc", + "GT()": "pennfunc", + "GTE()": "pennfunc", + "HASATTR()": "pennfunc", + "HASATTRP()": "pennfunc", + "HASATTRVAL()": "pennfunc", + "HASATTRPVAL()": "pennfunc", + "HASFLAG()": "pennfunc", + "HASPOWER()": "pennfunc", + "HASTYPE()": "pennfunc", + "HIDDEN()": "pennfunc", + "HOME()": "pennfunc", + "HOST()": "pennfunc", + "HOSTNAME()": "pennfunc", + "IDLE()": "pennfunc", + "IDLESECS()": "pennfunc", + "IF()": "pennfunc", + "IFELSE()": "pennfunc", + "INAME()": "pennfunc", + "INC()": "pennfunc", + "INDEX()": "pennfunc", + "INSERT()": "pennfunc", + "LINSERT()": "pennfunc", + "ISDAYLIGHT()": "pennfunc", + "ISDBREF()": "pennfunc", + "ISOBJID()": "pennfunc", + "ISINT()": "pennfunc", + "ISNUM()": "pennfunc", + "ISREGEXP()": "pennfunc", + "ISWORD()": "pennfunc", + "ITEMS()": "pennfunc", + "ITEMIZE()": "pennfunc", + "ELIST()": "pennfunc", + "ITER()": "pennfunc", + "PARSE()": "pennfunc", + "ITER2": "pennfunc", + "IBREAK()": "pennfunc", + "ILEV()": "pennfunc", + "ITEXT()": "pennfunc", + "INUM()": "pennfunc", + "%I": "pennfunc", + "%I0": "pennfunc", + "ITEXT2": "pennfunc", + "IPADDR()": "pennfunc", + "LAST()": "pennfunc", + "LATTR()": "pennfunc", + "LATTRP()": "pennfunc", + "REGLATTR()": "pennfunc", + "REGLATTRP()": "pennfunc", + "NATTR()": "pennfunc", + "NATTRP()": "pennfunc", + "ATTRCNT()": "pennfunc", + "ATTRPCNT()": "pennfunc", + "REGNATTR()": "pennfunc", + "REGNATTRP()": "pennfunc", + "LCON()": "pennfunc", + "LCSTR()": "pennfunc", + "LCSTR2()": "pennfunc", + "LDELETE()": "pennfunc", + "LEFT()": "pennfunc", + "NSLEMIT()": "pennfunc", + "LEMIT()": "pennfunc", + "LETQ()": "pennfunc", + "LEXITS()": "pennfunc", + "LJUST()": "pennfunc", + "LINK()": "pennfunc", + "LIST()": "pennfunc", + "LIT()": "pennfunc", + "LMATH()": "pennfunc", + "LN()": "pennfunc", + "LNUM()": "pennfunc", + "LOC()": "pennfunc", + "LOCALIZE()": "pennfunc", + "LOCATE()": "pennfunc", + "LOCATE2": "pennfunc", + "LOCATE3": "pennfunc", + "LOCK()": "pennfunc", + "LLOCKS()": "pennfunc", + "LOCKS()": "pennfunc", + "LOCKFILTER()": "pennfunc", + "LOCKFLAGS()": "pennfunc", + "LLOCKFLAGS()": "pennfunc", + "LOCKOWNER()": "pennfunc", + "LSET()": "pennfunc", + "LOG()": "pennfunc", + "LPARENT()": "pennfunc", + "LPLAYERS()": "pennfunc", + "LTHINGS()": "pennfunc", + "LPOS()": "pennfunc", + "LSEARCH()": "pennfunc", + "NLSEARCH()": "pennfunc", + "SEARCH()": "pennfunc", + "NSEARCH()": "pennfunc", + "LSEARCHR()": "pennfunc", + "CHILDREN()": "pennfunc", + "NCHILDREN()": "pennfunc", + "LSEARCH2": "pennfunc", + "SEARCH2": "pennfunc", + "LSEARCH3": "pennfunc", + "SEARCH3": "pennfunc", + "LSTATS()": "pennfunc", + "STATS()": "pennfunc", + "LT()": "pennfunc", + "LTE()": "pennfunc", + "LVCON()": "pennfunc", + "LVEXITS()": "pennfunc", + "LVPLAYERS()": "pennfunc", + "LVTHINGS()": "pennfunc", + "LWHO()": "pennfunc", + "LWHOID()": "pennfunc", + "MAP()": "pennfunc", + "ELEMENT()": "pennfunc", + "MATCH()": "pennfunc", + "MATCHALL()": "pennfunc", + "MATCH2": "pennfunc", + "REGLMATCH()": "pennfunc", + "REGLMATCHI()": "pennfunc", + "REGLMATCHALL()": "pennfunc", + "REGLMATCHALLI()": "pennfunc", + "REGLMATCH2": "pennfunc", + "MAX()": "pennfunc", + "AVG()": "pennfunc", + "MEAN()": "pennfunc", + "MEDIAN()": "pennfunc", + "MEMBER()": "pennfunc", + "MERGE()": "pennfunc", + "MESSAGE()": "pennfunc", + "MID()": "pennfunc", + "MIN()": "pennfunc", + "MIX()": "pennfunc", + "MIX2": "pennfunc", + "MOD()": "pennfunc", + "MODULO()": "pennfunc", + "MODULUS()": "pennfunc", + "REMAINDER()": "pennfunc", + "MONEY()": "pennfunc", + "MTIME()": "pennfunc", + "MSECS()": "pennfunc", + "MUDNAME()": "pennfunc", + "MUDURL()": "pennfunc", + "MUL()": "pennfunc", + "MUNGE()": "pennfunc", + "MUNGE2": "pennfunc", + "MUNGE3": "pennfunc", + "MWHO()": "pennfunc", + "MWHOID()": "pennfunc", + "ALIAS()": "pennfunc", + "FULLALIAS()": "pennfunc", + "NAME()": "pennfunc", + "MONIKER()": "pennfunc", + "CNAME()": "pennfunc", + "NAMELIST()": "pennfunc", + "NAMEGRAB()": "pennfunc", + "NAMEGRABALL()": "pennfunc", + "NAND()": "pennfunc", + "NCAND()": "pennfunc", + "NEARBY()": "pennfunc", + "NEQ()": "pennfunc", + "NEXT()": "pennfunc", + "NEXTDBREF()": "pennfunc", + "NOR()": "pennfunc", + "NCOR()": "pennfunc", + "NOT()": "pennfunc", + "NUM()": "pennfunc", + "NVCON()": "pennfunc", + "NCON()": "pennfunc", + "NVEXITS()": "pennfunc", + "NEXITS()": "pennfunc", + "NVPLAYERS()": "pennfunc", + "NPLAYERS()": "pennfunc", + "NVTHINGS()": "pennfunc", + "NTHINGS()": "pennfunc", + "NMWHO()": "pennfunc", + "NWHO()": "pennfunc", + "OBJ()": "pennfunc", + "%O": "pennfunc", + "OBJEVAL()": "pennfunc", + "OBJID()": "pennfunc", + "OBJMEM()": "pennfunc", + "OEMIT()": "pennfunc", + "NSOEMIT()": "pennfunc", + "OPEN()": "pennfunc", + "OR()": "pennfunc", + "COR()": "pennfunc", + "ORFLAGS()": "pennfunc", + "ORLFLAGS()": "pennfunc", + "ORLPOWERS()": "pennfunc", + "OWNER()": "pennfunc", + "PARENT()": "pennfunc", + "PEMIT()": "pennfunc", + "NSPEMIT()": "pennfunc", + "PROMPT()": "pennfunc", + "NSPROMPT()": "pennfunc", + "PI()": "pennfunc", + "PIDINFO()": "pennfunc", + "PLAYERMEM()": "pennfunc", + "PLAYER()": "pennfunc", + "PMATCH()": "pennfunc", + "POLL()": "pennfunc", + "LPIDS()": "pennfunc", + "LPORTS()": "pennfunc", + "PORTS()": "pennfunc", + "POS()": "pennfunc", + "POSS()": "pennfunc", + "%P": "pennfunc", + "POWER()": "pennfunc", + "POWERS()": "pennfunc", + "QUOTA()": "pennfunc", + "R()": "pennfunc", + "%Q": "pennfunc", + "R-FUNCTION": "pennfunc", + "RAND()": "pennfunc", + "RANDWORD()": "pennfunc", + "PICKRAND()": "pennfunc", + "RANDEXTRACT()": "pennfunc", + "REGEDIT()": "pennfunc", + "REGEDITALL()": "pennfunc", + "REGEDITI()": "pennfunc", + "REGEDITALLI()": "pennfunc", + "REGMATCH()": "pennfunc", + "REGMATCHI()": "pennfunc", + "REGMATCH2": "pennfunc", + "REMIT()": "pennfunc", + "NSREMIT()": "pennfunc", + "REMOVE()": "pennfunc", + "RENDER()": "pennfunc", + "REPEAT()": "pennfunc", + "LREPLACE()": "pennfunc", + "REPLACE()": "pennfunc", + "REST()": "pennfunc", + "REVWORDS()": "pennfunc", + "RIGHT()": "pennfunc", + "RJUST()": "pennfunc", + "RLOC()": "pennfunc", + "RNUM()": "pennfunc", + "ROOM()": "pennfunc", + "ROOT()": "pennfunc", + "ROUND()": "pennfunc", + "CEIL()": "pennfunc", + "FLOOR()": "pennfunc", + "FN()": "pennfunc", + "FN2": "pennfunc", + "S()": "pennfunc", + "S-FUNCTION": "pennfunc", + "SCAN()": "pennfunc", + "SCRAMBLE()": "pennfunc", + "SECS()": "pennfunc", + "SECURE()": "pennfunc", + "SET()": "pennfunc", + "SETDIFF()": "pennfunc", + "SETSYMDIFF()": "pennfunc", + "SETINTER()": "pennfunc", + "SETQ()": "pennfunc", + "SETR()": "pennfunc", + "SETQ2": "pennfunc", + "SETQ3": "pennfunc", + "SETQ4": "pennfunc", + "LISTQ()": "pennfunc", + "UNSETQ()": "pennfunc", + "REGISTERS()": "pennfunc", + "SETUNION()": "pennfunc", + "SHA0()": "pennfunc", + "SHL()": "pennfunc", + "SHR()": "pennfunc", + "SHUFFLE()": "pennfunc", + "SIGN()": "pennfunc", + "SIN()": "pennfunc", + "SORT()": "pennfunc", + "SORTBY()": "pennfunc", + "SORTKEY()": "pennfunc", + "SORTING": "pennfunc", + "SOUNDEX()": "pennfunc", + "SOUNDEX2": "pennfunc", + "SOUNDLIKE()": "pennfunc", + "SOUNDSLIKE()": "pennfunc", + "SPACE()": "pennfunc", + "SPEAK()": "pennfunc", + "SPEAKPENN()": "pennfunc", + "SPEAK2": "pennfunc", + "SPEAK3": "pennfunc", + "SPEAK4": "pennfunc", + "SPEAK5": "pennfunc", + "SPEAK6": "pennfunc", + "SPEAK7": "pennfunc", + "SPELLNUM()": "pennfunc", + "ORDINAL()": "pennfunc", + "SPLICE()": "pennfunc", + "MAPSQL()": "pennfunc", + "SQL()": "pennfunc", + "SQL EXAMPLES": "pennfunc", + "SQLESCAPE()": "pennfunc", + "SQRT()": "pennfunc", + "SQUISH()": "pennfunc", + "STARTTIME()": "pennfunc", + "RESTARTTIME()": "pennfunc", + "RESTARTS()": "pennfunc", + "SSL()": "pennfunc", + "STEP()": "pennfunc", + "STDDEV()": "pennfunc", + "STRFIRSTOF()": "pennfunc", + "STRALLOF()": "pennfunc", + "STRINSERT()": "pennfunc", + "STRIPACCENTS()": "pennfunc", + "STRIPANSI()": "pennfunc", + "STRLEN()": "pennfunc", + "STRMATCH()": "pennfunc", + "STRREPLACE()": "pennfunc", + "SUB()": "pennfunc", + "SUBJ()": "pennfunc", + "%S": "pennfunc", + "RESWITCH()": "pennfunc", + "RESWITCHI()": "pennfunc", + "RESWITCHALL()": "pennfunc", + "RESWITCHALLI()": "pennfunc", + "SWITCH()": "pennfunc", + "SWITCHALL()": "pennfunc", + "CASE()": "pennfunc", + "CASEALL()": "pennfunc", + "SWITCH2": "pennfunc", + "SWITCH WILDCARDS": "pennfunc", + "STEXT()": "pennfunc", + "SLEV()": "pennfunc", + "%$": "pennfunc", + "%$0": "pennfunc", + "T()": "pennfunc", + "TABLE()": "pennfunc", + "TAN()": "pennfunc", + "TEL()": "pennfunc", + "TERMINFO()": "pennfunc", + "JSON FUNCTIONS": "pennfunc", + "OOB()": "pennfunc", + "GMCP": "pennfunc", + "ISJSON()": "pennfunc", + "JSON()": "pennfunc", + "JSON2": "pennfunc", + "JSON_MAP()": "pennfunc", + "JSON_MAP2": "pennfunc", + "JSON_MAP3": "pennfunc", + "JSON_QUERY()": "pennfunc", + "JSON_QUERY2": "pennfunc", + "JSON_QUERY3": "pennfunc", + "JSON PATHS": "pennfunc", + "JSON_MOD()": "pennfunc", + "JSON_MOD2": "pennfunc", + "TESTLOCK()": "pennfunc", + "TEXTFILE()": "pennfunc", + "TEXTENTRIES()": "pennfunc", + "TEXTSEARCH()": "pennfunc", + "DYNHELP()": "pennfunc", + "TIME()": "pennfunc", + "UTCTIME()": "pennfunc", + "TIME2": "pennfunc", + "TIMECALC()": "pennfunc", + "SECSCALC()": "pennfunc", + "TIMECALC2": "pennfunc", + "TIMEZONES": "pennfunc", + "@TZ": "pennfunc", + "TIMEZONES2": "pennfunc", + "TIMEZONES3": "pennfunc", + "TIMEZONES4": "pennfunc", + "TIMEZONES5": "pennfunc", + "TIMEZONES6": "pennfunc", + "TIMEZONES7": "pennfunc", + "TIMEZONES8": "pennfunc", + "TIMEZONES9": "pennfunc", + "TIMEZONES10": "pennfunc", + "TIMEZONES11": "pennfunc", + "TIMEZONES12": "pennfunc", + "TIMEZONES13": "pennfunc", + "ETIME()": "pennfunc", + "ETIMEFMT()": "pennfunc", + "ETIMEFMT2": "pennfunc", + "ETIMEFMT3": "pennfunc", + "TIMEFMT()": "pennfunc", + "TIMEFMT2": "pennfunc", + "TIMESTRING()": "pennfunc", + "STRINGSECS()": "pennfunc", + "TR()": "pennfunc", + "TRIM()": "pennfunc", + "TRIMPENN()": "pennfunc", + "TRIMTINY()": "pennfunc", + "TRUNC()": "pennfunc", + "VAL()": "pennfunc", + "TYPE()": "pennfunc", + "PFUN()": "pennfunc", + "PFUN2": "pennfunc", + "PFUN3": "pennfunc", + "U()": "pennfunc", + "UFUN()": "pennfunc", + "ULAMBDA()": "pennfunc", + "U2": "pennfunc", + "UFUN2": "pennfunc", + "U3": "pennfunc", + "UFUN3": "pennfunc", + "UCSTR()": "pennfunc", + "UCSTR2()": "pennfunc", + "UDEFAULT()": "pennfunc", + "ULDEFAULT()": "pennfunc", + "ULOCAL()": "pennfunc", + "ULOCAL2": "pennfunc", + "UNIQUE()": "pennfunc", + "V()": "pennfunc", + "V-FUNCTION": "pennfunc", + "VADD()": "pennfunc", + "VALID()": "pennfunc", + "VALID2": "pennfunc", + "VCROSS()": "pennfunc", + "VDIM()": "pennfunc", + "VDOT()": "pennfunc", + "VMIN()": "pennfunc", + "VMAX()": "pennfunc", + "VERSION()": "pennfunc", + "NUMVERSION()": "pennfunc", + "VISIBLE()": "pennfunc", + "VMAG()": "pennfunc", + "VMUL()": "pennfunc", + "VSUB()": "pennfunc", + "VUNIT()": "pennfunc", + "WIDTH()": "pennfunc", + "HEIGHT()": "pennfunc", + "SCREENWIDTH": "pennfunc", + "SCREENHEIGHT": "pennfunc", + "WHERE()": "pennfunc", + "WIPE()": "pennfunc", + "WORDPOS()": "pennfunc", + "WORDS()": "pennfunc", + "WRAP()": "pennfunc", + "XATTR()": "pennfunc", + "XATTRP()": "pennfunc", + "REGXATTR()": "pennfunc", + "REGXATTRP()": "pennfunc", + "XOR()": "pennfunc", + "XVCON()": "pennfunc", + "XCON()": "pennfunc", + "XVEXITS()": "pennfunc", + "XEXITS()": "pennfunc", + "XVPLAYERS()": "pennfunc", + "XPLAYERS()": "pennfunc", + "XVTHINGS()": "pennfunc", + "XTHINGS()": "pennfunc", + "XWHO()": "pennfunc", + "XWHOID()": "pennfunc", + "XMWHO()": "pennfunc", + "XMWHOID()": "pennfunc", + "ZWHO()": "pennfunc", + "ZMWHO()": "pennfunc", + "ZEMIT()": "pennfunc", + "NSZEMIT()": "pennfunc", + "ZFUN()": "pennfunc", + "ZONE()": "pennfunc", + "UPTIME()": "pennfunc", + "SUGGEST()": "pennfunc", + "CONNLOG()": "pennfunc", + "CONNLOG2": "pennfunc", + "CONNLOG3": "pennfunc", + "CONNRECORD()": "pennfunc", + "ADDRLOG()": "pennfunc", + "URLENCODE()": "pennfunc", + "URLDECODE()": "pennfunc", + "HMAC()": "pennfunc", + "HTTP": "pennhttp", + "HTTP_HANDLER": "pennhttp", + "HTTP_PER_SECOND": "pennhttp", + "@CONFIG HTTP_PER_SECOND": "pennhttp", + "@CONFIG HTTP_HANDLER": "pennhttp", + "HTTP2": "pennhttp", + "HTTP3": "pennhttp", + "@RESPOND": "pennhttp", + "@RESPOND/TYPE": "pennhttp", + "@RESPOND/HEADER": "pennhttp", + "@RESPOND2": "pennhttp", + "@RESPOND3": "pennhttp", + "FORMDECODE()": "pennhttp", + "HTTP EXAMPLES": "pennhttp", + "HTTP SIMPLE": "pennhttp", + "HTTP GET": "pennhttp", + "HTTP POST": "pennhttp", + "HTTP SITELOCK": "pennhttp", + "LOCK KEYS": "pennlock", + "LOCK KEYS2": "pennlock", + "@LOCK-COMPLEX": "pennlock", + "@LOCK-SIMPLE": "pennlock", + "@LOCK-OBJID": "pennlock", + "SIMPLE LOCKS": "pennlock", + "@LOCK-OWNER": "pennlock", + "@LOCK-CARRY": "pennlock", + "OWNER LOCK": "pennlock", + "CARRY LOCK": "pennlock", + "@LOCK-ATTRIBUTE": "pennlock", + "ATTRIBUTE LOCKS": "pennlock", + "@LOCK-EVALUATION": "pennlock", + "EVALUATION LOCK": "pennlock", + "@LOCK-EVAL2": "pennlock", + "@LOCK-EVALUATION2": "pennlock", + "@LOCK-NAME": "pennlock", + "NAME LOCKS": "pennlock", + "@LOCK-BIT": "pennlock", + "@LOCK-FLAG": "pennlock", + "@LOCK-TYPE": "pennlock", + "@LOCK-POWER": "pennlock", + "@LOCK-CHANNEL": "pennlock", + "BIT LOCKS": "pennlock", + "@LOCK-DBREFLIST": "pennlock", + "@LOCK-LIST": "pennlock", + "LIST LOCK": "pennlock", + "@LOCK-INDIRECT": "pennlock", + "INDIRECT LOCKS": "pennlock", + "@LOCK-HOST": "pennlock", + "HOST LOCKS": "pennlock", + "LOCKTYPES": "pennlock", + "LOCKLIST": "pennlock", + "LOCK TYPES": "pennlock", + "LOCK LIST": "pennlock", + "LOCK TYPES2": "pennlock", + "LOCKTYPES2": "pennlock", + "@LOCK/BASIC": "pennlock", + "@LOCK/ENTER": "pennlock", + "@LOCK/LEAVE": "pennlock", + "@LOCK/TELEPORT": "pennlock", + "BASIC LOCK": "pennlock", + "ENTER LOCK": "pennlock", + "LEAVE LOCK": "pennlock", + "TELEPORT LOCK": "pennlock", + "@LOCK/FOLLOW": "pennlock", + "@LOCK/FORWARD": "pennlock", + "@LOCK/DROPTO": "pennlock", + "FOLLOW LOCK": "pennlock", + "FORWARD LOCK": "pennlock", + "DROPTO LOCK": "pennlock", + "@LOCK/USE": "pennlock", + "@LOCK/COMMAND": "pennlock", + "@LOCK/LISTEN": "pennlock", + "USE LOCK": "pennlock", + "COMMAND LOCK": "pennlock", + "LISTEN LOCK": "pennlock", + "@LOCK/PAGE": "pennlock", + "@LOCK/SPEECH": "pennlock", + "@LOCK/MAIL": "pennlock", + "@LOCK/MAILFORWARD": "pennlock", + "@LOCK/INTERACT": "pennlock", + "PAGE LOCK": "pennlock", + "SPEECH LOCK": "pennlock", + "MAIL LOCK": "pennlock", + "MAILFORWARD LOCK": "pennlock", + "INTERACT LOCK": "pennlock", + "@LOCK/DROP": "pennlock", + "@LOCK/DROPIN": "pennlock", + "@LOCK/GIVE": "pennlock", + "@LOCK/FROM": "pennlock", + "@LOCK/PAY": "pennlock", + "@LOCK/RECEIVE": "pennlock", + "@LOCK/TAKE": "pennlock", + "DROP LOCK": "pennlock", + "DROPIN LOCK": "pennlock", + "GIVE LOCK": "pennlock", + "FROM LOCK": "pennlock", + "PAY LOCK": "pennlock", + "RECEIVE LOCK": "pennlock", + "TAKE LOCK": "pennlock", + "@LOCK/FILTER": "pennlock", + "@LOCK/INFILTER": "pennlock", + "FILTER LOCK": "pennlock", + "INFILTER LOCK": "pennlock", + "@LOCK/CONTROL": "pennlock", + "@LOCK/DESTROY": "pennlock", + "@LOCK/EXAMINE": "pennlock", + "CONTROL LOCK": "pennlock", + "DESTROY LOCK": "pennlock", + "EXAMINE LOCK": "pennlock", + "@LOCK/ZONE": "pennlock", + "@LOCK/CHZONE": "pennlock", + "@LOCK/CHOWN": "pennlock", + "@LOCK/PARENT": "pennlock", + "@LOCK/LINK": "pennlock", + "@LOCK/OPEN": "pennlock", + "ZONE LOCK": "pennlock", + "CHZONE LOCK": "pennlock", + "CHOWN LOCK": "pennlock", + "PARENT LOCK": "pennlock", + "LINK LOCK": "pennlock", + "OPEN LOCK": "pennlock", + "@LOCK/USER": "pennlock", + "@LOCK/USER:": "pennlock", + "USER-DEFINED LOCKS": "pennlock", + "MAIL": "pennmail", + "@MAIL": "pennmail", + "MAIL-READING": "pennmail", + "@MAIL/READ": "pennmail", + "@MAIL/LIST": "pennmail", + "@MAIL/CSTATS": "pennmail", + "MAIL-SENDING": "pennmail", + "@MAIL/SEND": "pennmail", + "@MAIL/FWD": "pennmail", + "MAIL-OTHER": "pennmail", + "@MAIL/CLEAR": "pennmail", + "@MAIL/UNCLEAR": "pennmail", + "@MAIL/PURGE": "pennmail", + "@MAIL/TAG": "pennmail", + "@MAIL/UNTAG": "pennmail", + "@MAIL/UNREAD": "pennmail", + "@MAIL/STATUS": "pennmail", + "MAIL-FOLDERS": "pennmail", + "@MAIL/FOLDER": "pennmail", + "@MAIL/UNFOLDER": "pennmail", + "@MAIL/FILE": "pennmail", + "MAIL-REVIEWING": "pennmail", + "@MAIL/REVIEW": "pennmail", + "@MAIL/RETRACT": "pennmail", + "@MAILQUOTA": "pennmail", + "@MAILFILTER": "pennmail", + "MAILFILTER": "pennmail", + "@MAILSIGNATURE": "pennmail", + "MAILSIGNATURE": "pennmail", + "MAIL-ADMIN": "pennmail", + "@MALIAS": "pennmail", + "@MALIAS2": "pennmail", + "@MALIAS3": "pennmail", + "@MALIAS4": "pennmail", + "@MALIAS5": "pennmail", + "MAIL FUNCTIONS": "pennmail", + "FOLDERSTATS()": "pennmail", + "MAIL()": "pennmail", + "MAILLIST()": "pennmail", + "MAILFROM()": "pennmail", + "MAILTIME()": "pennmail", + "MAILSTATUS()": "pennmail", + "MAILSUBJECT()": "pennmail", + "MAILSTATS()": "pennmail", + "MAILDSTATS()": "pennmail", + "MAILFSTATS()": "pennmail", + "MAILSEND()": "pennmail", + "MALIAS()": "pennmail", + "PUEBLO": "pennpueb", + "PUEBLO2": "pennpueb", + "HTML": "pennpueb", + "PUEBLO()": "pennpueb", + "@VRML_URL": "pennpueb", + "VRML_URL": "pennpueb", + "VRML": "pennpueb", + "HTML FUNCTIONS": "pennpueb", + "HTML()": "pennpueb", + "TAG()": "pennpueb", + "ENDTAG()": "pennpueb", + "TAGWRAP()": "pennpueb", + "WEBSOCKETS": "pennpueb", + "WSHTML()": "pennpueb", + "WSJSON()": "pennpueb", + "HELP": "penntop", + "HELP SEARCH": "penntop", + "HELP/SEARCH": "penntop", + "HELPFILE": "penntop", + "HELPFILE2": "penntop", + "HELP QUERY": "penntop", + "NEWBIE": "penntop", + "NEWBIE2": "penntop", + "NEWBIE3": "penntop", + "GETTING STARTED": "penntop", + "GS": "penntop", + "WALKTHROUGH": "penntop", + "GS MOVING": "penntop", + "GS MOVING2": "penntop", + "GS TALKING": "penntop", + "GS TALKING2": "penntop", + "GS CHAT": "penntop", + "GS CHANNELS": "penntop", + "GS CHAT2": "penntop", + "GS MAIL": "penntop", + "GS MAIL2": "penntop", + "TOPICS": "penntop", + "TOPICS2": "penntop", + "ACTION LISTS": "penntop", + "ACTION2": "penntop", + "ANCESTORS": "penntop", + "ANONYMOUS ATTRIBUTES": "penntop", + "LAMBDA": "penntop", + "#LAMBDA": "penntop", + "#APPLY": "penntop", + "ANONYMOUS2": "penntop", + "LAMBDA2": "penntop", + "#LAMBDA2": "penntop", + "ANONYMOUS3": "penntop", + "LAMBDA3": "penntop", + "#LAMBDA3": "penntop", + "ANONYMOUS4": "penntop", + "LAMBDA4": "penntop", + "#LAMBDA4": "penntop", + "LAMBDA FUNCTIONS": "penntop", + "ATTRIB-OWNERSHIP": "penntop", + "ATTRIBUTES": "penntop", + "ATTRIBUTES LIST": "penntop", + "ATTRIBUTE LIST": "penntop", + "ATTRIBUTES2": "penntop", + "ATTRIBUTES3": "penntop", + "ATTRIBUTES4": "penntop", + "BOOLEAN VALUES": "penntop", + "BOOLEAN2": "penntop", + "BOOLEAN3": "penntop", + "CLIENTS": "penntop", + "CONTROL": "penntop", + "COSTS": "penntop", + "CREDITS": "penntop", + "DATABASE": "penntop", + "DBREFS": "penntop", + "DBREF NUMBER": "penntop", + "DBREF #": "penntop", + "DBREF2": "penntop", + "OBJIDS": "penntop", + "OBJECT IDS": "penntop", + "DROP-TOS": "penntop", + "DROPTOS": "penntop", + "%#": "penntop", + "%N": "penntop", + "%K": "penntop", + "%~": "penntop", + "%:": "penntop", + "ENACTOR": "penntop", + "%!": "penntop", + "EXECUTOR": "penntop", + "%@": "penntop", + "CALLER": "penntop", + "EVALUATION ORDER": "penntop", + "EVALUATION2": "penntop", + "FAILURE": "penntop", + "FAILURE2": "penntop", + "GENDER": "penntop", + "SEX": "penntop", + "GLOBALS": "penntop", + "GLOBAL COMMANDS": "penntop", + "HERE": "penntop", + "HOMES": "penntop", + "HOME": "penntop", + "INTERIORS": "penntop", + "INTERIORS2": "penntop", + "LAST": "penntop", + "LASTLOGOUT": "penntop", + "LASTSITE": "penntop", + "LASTIP": "penntop", + "LINKING": "penntop", + "LISTENING": "penntop", + "^-LISTENS": "penntop", + "LISTENING2": "penntop", + "LISTENING3": "penntop", + "LISTS": "penntop", + "LOOPING": "penntop", + "MASTER ROOM": "penntop", + "ME": "penntop", + "MONEY": "penntop", + "MONIKERS": "penntop", + "MONIKERS2": "penntop", + "MUSHCODE": "penntop", + "SOFTCODE": "penntop", + "MUSHCODE2": "penntop", + "NON-STANDARD ATTRIBUTES": "penntop", + "PARENT": "penntop", + "PARENTS": "penntop", + "OBJECT PARENTS": "penntop", + "PARENTS2": "penntop", + "PARENTS3": "penntop", + "PARENTS4": "penntop", + "PARENTS5": "penntop", + "PUPPETS": "penntop", + "PUPPETS2": "penntop", + "QUEUE": "penntop", + "QUEUE2": "penntop", + "QUOTAS": "penntop", + "REGEXP": "penntop", + "REGEXPS": "penntop", + "REGEXPS2": "penntop", + "REGEXP SYNTAX": "penntop", + "REGEXP SYNTAX2": "penntop", + "REGEXP SYNTAX3": "penntop", + "REGEXP SYNTAX4": "penntop", + "REGEXP SYNTAX5": "penntop", + "REGEXP SYNTAX6": "penntop", + "REGEXP SYNTAX7": "penntop", + "REGEXP SYNTAX8": "penntop", + "REGEXP CLASSES": "penntop", + "REGEXP CLASSES2": "penntop", + "REGEXP EXAMPLES": "penntop", + "REGISTERS2": "penntop", + "RQUOTA": "penntop", + "SEMAPHORES": "penntop", + "SEMAPHORES2": "penntop", + "SEMAPHORES3": "penntop", + "SEMAPHORES4": "penntop", + "SEMAPHORES5": "penntop", + "SEMAPHORES6": "penntop", + "SETTING-ATTRIBUTES": "penntop", + "SETTING ATTRIBUTES": "penntop", + "SPOOFING": "penntop", + "STACK": "penntop", + "STRINGS": "penntop", + "%B": "penntop", + "%T": "penntop", + "%%": "penntop", + "SUBSTITUTIONS": "penntop", + "SUBSTITUTIONS2": "penntop", + "%2": "penntop", + "%V": "penntop", + "%W": "penntop", + "%X": "penntop", + "SUBSTITUTIONS3": "penntop", + "%3": "penntop", + "%L": "penntop", + "%C": "penntop", + "%U": "penntop", + "%?": "penntop", + "%=": "penntop", + "%+": "penntop", + "SUBSTITUTIONS4": "penntop", + "%4": "penntop", + "SUCCESS": "penntop", + "SWITCHES": "penntop", + "TYPES OF OBJECTS": "penntop", + "TYPES": "penntop", + "OBJECTS": "penntop", + "PLAYERS": "penntop", + "ROOMS": "penntop", + "THINGS": "penntop", + "EXITS": "penntop", + "GARBAGE": "penntop", + "$-COMMANDS": "penntop", + "MACROS": "penntop", + "USER-DEFINED COMMANDS": "penntop", + "$-COMMANDS2": "penntop", + "MACROS2": "penntop", + "USER-DEFINED2": "penntop", + "VERBS": "penntop", + "VERBS2": "penntop", + "NONAME": "penntop", + "NOSPACE": "penntop", + "WARNINGS": "penntop", + "WARNINGS LIST": "penntop", + "WARNINGS LIST2": "penntop", + "WILDCARDS": "penntop", + "ZONE MASTER ROOMS": "penntop", + "ZMRS": "penntop", + "ZONE MASTERS": "penntop", + "ZMPS": "penntop", + "SHARED PLAYERS": "penntop", + "SHARED PLAYERS2": "penntop", + "ZONES": "penntop", + "ZONE OBJECTS": "penntop", + "ZONE MASTER OBJECTS": "penntop", + "ZONE MASTER THINGS": "penntop", + "ZMOS": "penntop", + "ZMTS": "penntop", + "ZONES2": "penntop", + "MATCHING": "penntop", + "&HELP": "penntop", + "RESTRICT": "penntop", + "RESTRICT2": "penntop", + "RESTRICT3": "penntop", + "DESCRIPTOR": "penntop", + "PORT": "penntop", + "UNICODE": "penntop" + }, + "index": { + "pennattr": [ + { + "original": "ATTRIBUTE FLAGS", + "normalized": "ATTRIBUTE FLAGS" + }, + { + "original": "ATTRIBUTE FLAGS2", + "normalized": "ATTRIBUTE FLAGS2" + }, + { + "original": "ATTRIBUTE FLAGS3", + "normalized": "ATTRIBUTE FLAGS3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATTRIBUTE TREES", + "normalized": "ATTRIBUTE TREES" + }, + { + "original": "ATTR TREES", + "normalized": "ATTR TREES" + }, + { + "original": "ATTRIB TREES", + "normalized": "ATTRIB TREES" + }, + { + "original": "ATTRIBUTE TREES2", + "normalized": "ATTRIBUTE TREES2" + }, + { + "original": "ATTR TREES2", + "normalized": "ATTR TREES2" + }, + { + "original": "ATTRIB TREES2", + "normalized": "ATTRIB TREES2" + }, + { + "original": "\\`2", + "normalized": "\\`2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATTRIBUTE TREES3", + "normalized": "ATTRIBUTE TREES3" + }, + { + "original": "ATTR TREES3", + "normalized": "ATTR TREES3" + }, + { + "original": "ATTRIB TREES3", + "normalized": "ATTRIB TREES3" + }, + { + "original": "\\`3", + "normalized": "\\`3" + }, + { + "original": "ATTRIBUTE TREES4", + "normalized": "ATTRIBUTE TREES4" + }, + { + "original": "ATTR TREES4", + "normalized": "ATTR TREES4" + }, + { + "original": "ATTRIB TREES4", + "normalized": "ATTRIB TREES4" + }, + { + "original": "\\`4", + "normalized": "\\`4" + } + ], + "pennchat": [ + { + "original": "CHAT", + "normalized": "CHAT" + }, + { + "original": "CHAT SYSTEM", + "normalized": "CHAT SYSTEM" + }, + { + "original": "comsys", + "normalized": "COMSYS" + }, + { + "original": "CHANNELS", + "normalized": "CHANNELS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@chat", + "normalized": "@CHAT" + }, + { + "original": "Example", + "normalized": "EXAMPLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHATFORMAT", + "normalized": "@CHATFORMAT" + }, + { + "original": "Registers", + "normalized": "REGISTERS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHATFORMAT2", + "normalized": "@CHATFORMAT2" + }, + { + "original": "Examples", + "normalized": "EXAMPLES" + }, + { + "original": "@CHATFORMAT3", + "normalized": "@CHATFORMAT3" + }, + { + "original": "CHAN_USEFIRSTMATCH", + "normalized": "CHAN_USEFIRSTMATCH" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CEMIT", + "normalized": "@CEMIT" + }, + { + "original": "@NSCEMIT", + "normalized": "@NSCEMIT" + }, + { + "original": "CEMIT()", + "normalized": "CEMIT()" + }, + { + "original": "NSCEMIT()", + "normalized": "NSCEMIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@channel", + "normalized": "@CHANNEL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL JOINING", + "normalized": "@CHANNEL JOINING" + }, + { + "original": "@channel/list", + "normalized": "@CHANNEL/LIST" + }, + { + "original": "@channel/what", + "normalized": "@CHANNEL/WHAT" + }, + { + "original": "@channel/who", + "normalized": "@CHANNEL/WHO" + }, + { + "original": "@channel/on", + "normalized": "@CHANNEL/ON" + }, + { + "original": "@channel/join", + "normalized": "@CHANNEL/JOIN" + }, + { + "original": "@channel/off", + "normalized": "@CHANNEL/OFF" + }, + { + "original": "@channel/leave", + "normalized": "@CHANNEL/LEAVE" + }, + { + "original": "@CHANNEL JOINING2", + "normalized": "@CHANNEL JOINING2" + }, + { + "original": "@channel/gag", + "normalized": "@CHANNEL/GAG" + }, + { + "original": "@channel/ungag", + "normalized": "@CHANNEL/UNGAG" + }, + { + "original": "@channel/hide", + "normalized": "@CHANNEL/HIDE" + }, + { + "original": "@channel/unhide", + "normalized": "@CHANNEL/UNHIDE" + }, + { + "original": "@channel/mute", + "normalized": "@CHANNEL/MUTE" + }, + { + "original": "@channel/combine", + "normalized": "@CHANNEL/COMBINE" + }, + { + "original": "@channel/uncombine", + "normalized": "@CHANNEL/UNCOMBINE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL OTHER", + "normalized": "@CHANNEL OTHER" + }, + { + "original": "@channel/recall", + "normalized": "@CHANNEL/RECALL" + }, + { + "original": "@channel/title", + "normalized": "@CHANNEL/TITLE" + }, + { + "original": "@channel/buffer", + "normalized": "@CHANNEL/BUFFER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL ADMIN", + "normalized": "@CHANNEL ADMIN" + }, + { + "original": "@channel/add", + "normalized": "@CHANNEL/ADD" + }, + { + "original": "@channel/delete", + "normalized": "@CHANNEL/DELETE" + }, + { + "original": "@channel/mogrifier", + "normalized": "@CHANNEL/MOGRIFIER" + }, + { + "original": "@channel/chown", + "normalized": "@CHANNEL/CHOWN" + }, + { + "original": "@channel/name", + "normalized": "@CHANNEL/NAME" + }, + { + "original": "@channel/desc", + "normalized": "@CHANNEL/DESC" + }, + { + "original": "@channel/privs", + "normalized": "@CHANNEL/PRIVS" + }, + { + "original": "@channel/wipe", + "normalized": "@CHANNEL/WIPE" + }, + { + "original": "@channel/clock", + "normalized": "@CHANNEL/CLOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL LIST", + "normalized": "@CHANNEL LIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL PRIVS", + "normalized": "@CHANNEL PRIVS" + }, + { + "original": "Examples", + "normalized": "EXAMPLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@CHANNEL CLOCK", + "normalized": "@CHANNEL CLOCK" + }, + { + "original": "@clock", + "normalized": "@CLOCK" + }, + { + "original": "Examples", + "normalized": "EXAMPLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CHANNEL FUNCTIONS", + "normalized": "CHANNEL FUNCTIONS" + }, + { + "original": "CHANNELS()", + "normalized": "CHANNELS()" + }, + { + "original": "COWNER()", + "normalized": "COWNER()" + }, + { + "original": "CFLAGS()", + "normalized": "CFLAGS()" + }, + { + "original": "CSTATUS()", + "normalized": "CSTATUS()" + }, + { + "original": "CEMIT()", + "normalized": "CEMIT()" + }, + { + "original": "NSCEMIT()", + "normalized": "NSCEMIT()" + }, + { + "original": "Examples", + "normalized": "EXAMPLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MUXCOMSYS", + "normalized": "MUXCOMSYS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "penncmd": [ + { + "original": "COMMANDS", + "normalized": "COMMANDS" + }, + { + "original": "@-ATTRIBUTES", + "normalized": "@-ATTRIBUTES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@-BUILDING", + "normalized": "@-BUILDING" + }, + { + "original": "@-GENERAL", + "normalized": "@-GENERAL" + }, + { + "original": "@-WIZARD", + "normalized": "@-WIZARD" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "]2", + "normalized": "]2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@@", + "normalized": "@@" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@aclone", + "normalized": "@ACLONE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@aconnect", + "normalized": "@ACONNECT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@amail", + "normalized": "@AMAIL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@adescribe", + "normalized": "@ADESCRIBE" + }, + { + "original": "@odescribe", + "normalized": "@ODESCRIBE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@adestroy", + "normalized": "@ADESTROY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@adisconnect", + "normalized": "@ADISCONNECT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@adrop", + "normalized": "@ADROP" + }, + { + "original": "@odrop", + "normalized": "@ODROP" + }, + { + "original": "@drop", + "normalized": "@DROP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@aefail", + "normalized": "@AEFAIL" + }, + { + "original": "@oefail", + "normalized": "@OEFAIL" + }, + { + "original": "@efail", + "normalized": "@EFAIL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@aufail", + "normalized": "@AUFAIL" + }, + { + "original": "@oufail", + "normalized": "@OUFAIL" + }, + { + "original": "@ufail", + "normalized": "@UFAIL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@afailure", + "normalized": "@AFAILURE" + }, + { + "original": "@ofailure", + "normalized": "@OFAILURE" + }, + { + "original": "@failure", + "normalized": "@FAILURE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@follow", + "normalized": "@FOLLOW" + }, + { + "original": "@ofollow", + "normalized": "@OFOLLOW" + }, + { + "original": "@afollow", + "normalized": "@AFOLLOW" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@unfollow", + "normalized": "@UNFOLLOW" + }, + { + "original": "@ounfollow", + "normalized": "@OUNFOLLOW" + }, + { + "original": "@aunfollow", + "normalized": "@AUNFOLLOW" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@ahear", + "normalized": "@AHEAR" + }, + { + "original": "@amhear", + "normalized": "@AMHEAR" + }, + { + "original": "@aahear", + "normalized": "@AAHEAR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@leave", + "normalized": "@LEAVE" + }, + { + "original": "@oleave", + "normalized": "@OLEAVE" + }, + { + "original": "@oxleave", + "normalized": "@OXLEAVE" + }, + { + "original": "@aleave", + "normalized": "@ALEAVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@lfail", + "normalized": "@LFAIL" + }, + { + "original": "@olfail", + "normalized": "@OLFAIL" + }, + { + "original": "@alfail", + "normalized": "@ALFAIL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@alias", + "normalized": "@ALIAS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@move", + "normalized": "@MOVE" + }, + { + "original": "@omove", + "normalized": "@OMOVE" + }, + { + "original": "@oxmove", + "normalized": "@OXMOVE" + }, + { + "original": "@amove", + "normalized": "@AMOVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@aenter", + "normalized": "@AENTER" + }, + { + "original": "@enter", + "normalized": "@ENTER" + }, + { + "original": "@oenter", + "normalized": "@OENTER" + }, + { + "original": "@oxenter", + "normalized": "@OXENTER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@apayment", + "normalized": "@APAYMENT" + }, + { + "original": "@payment", + "normalized": "@PAYMENT" + }, + { + "original": "@opayment", + "normalized": "@OPAYMENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@atport", + "normalized": "@ATPORT" + }, + { + "original": "@tport", + "normalized": "@TPORT" + }, + { + "original": "@otport", + "normalized": "@OTPORT" + }, + { + "original": "@oxtport", + "normalized": "@OXTPORT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@atrchown", + "normalized": "@ATRCHOWN" + }, + { + "original": "@attrchown", + "normalized": "@ATTRCHOWN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@atrlock", + "normalized": "@ATRLOCK" + }, + { + "original": "@attrlock", + "normalized": "@ATTRLOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@asuccess", + "normalized": "@ASUCCESS" + }, + { + "original": "@success", + "normalized": "@SUCCESS" + }, + { + "original": "@osuccess", + "normalized": "@OSUCCESS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@attribute", + "normalized": "@ATTRIBUTE" + }, + { + "original": "@attribute2", + "normalized": "@ATTRIBUTE2" + }, + { + "original": "@attribute3", + "normalized": "@ATTRIBUTE3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@ause", + "normalized": "@AUSE" + }, + { + "original": "@use", + "normalized": "@USE" + }, + { + "original": "@ouse", + "normalized": "@OUSE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@away", + "normalized": "@AWAY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@boot", + "normalized": "@BOOT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@break", + "normalized": "@BREAK" + }, + { + "original": "@assert", + "normalized": "@ASSERT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@break2", + "normalized": "@BREAK2" + }, + { + "original": "@assert2", + "normalized": "@ASSERT2" + }, + { + "original": "@charges", + "normalized": "@CHARGES" + }, + { + "original": "@runout", + "normalized": "@RUNOUT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "charges2", + "normalized": "CHARGES2" + }, + { + "original": "runout2", + "normalized": "RUNOUT2" + }, + { + "original": "@chown", + "normalized": "@CHOWN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@chownall", + "normalized": "@CHOWNALL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@chzone", + "normalized": "@CHZONE" + }, + { + "original": "@chzone2", + "normalized": "@CHZONE2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@chzoneall", + "normalized": "@CHZONEALL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@clone", + "normalized": "@CLONE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@command", + "normalized": "@COMMAND" + }, + { + "original": "@command2", + "normalized": "@COMMAND2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@command3", + "normalized": "@COMMAND3" + }, + { + "original": "@comment", + "normalized": "@COMMENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@config", + "normalized": "@CONFIG" + }, + { + "original": "@conformat", + "normalized": "@CONFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@include", + "normalized": "@INCLUDE" + }, + { + "original": "@include2", + "normalized": "@INCLUDE2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@invformat", + "normalized": "@INVFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@descformat", + "normalized": "@DESCFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@idescformat", + "normalized": "@IDESCFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@nameaccent", + "normalized": "@NAMEACCENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@nameformat", + "normalized": "@NAMEFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@cost", + "normalized": "@COST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@cpattr", + "normalized": "@CPATTR" + }, + { + "original": "@mvattr", + "normalized": "@MVATTR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@create", + "normalized": "@CREATE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@dbck", + "normalized": "@DBCK" + }, + { + "original": "@decompile", + "normalized": "@DECOMPILE" + }, + { + "original": "@decompile2", + "normalized": "@DECOMPILE2" + }, + { + "original": "@decompile3", + "normalized": "@DECOMPILE3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@describe", + "normalized": "@DESCRIBE" + }, + { + "original": "@desc", + "normalized": "@DESC" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@destroy", + "normalized": "@DESTROY" + }, + { + "original": "@recycle", + "normalized": "@RECYCLE" + }, + { + "original": "@nuke", + "normalized": "@NUKE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@destroy2", + "normalized": "@DESTROY2" + }, + { + "original": "DESTRUCTION", + "normalized": "DESTRUCTION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@undestroy", + "normalized": "@UNDESTROY" + }, + { + "original": "@unrecycle", + "normalized": "@UNRECYCLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@dig", + "normalized": "@DIG" + }, + { + "original": "@dig2", + "normalized": "@DIG2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@doing", + "normalized": "@DOING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@dolist", + "normalized": "@DOLIST" + }, + { + "original": "@dolist2", + "normalized": "@DOLIST2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@dolist3", + "normalized": "@DOLIST3" + }, + { + "original": "@drain", + "normalized": "@DRAIN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@dump", + "normalized": "@DUMP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@ealias", + "normalized": "@EALIAS" + }, + { + "original": "@lalias", + "normalized": "@LALIAS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@edit", + "normalized": "@EDIT" + }, + { + "original": "@gedit", + "normalized": "@GEDIT" + }, + { + "original": "@edit2", + "normalized": "@EDIT2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@elock", + "normalized": "@ELOCK" + }, + { + "original": "@eunlock", + "normalized": "@EUNLOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@emit", + "normalized": "@EMIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@enable", + "normalized": "@ENABLE" + }, + { + "original": "@disable", + "normalized": "@DISABLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@zenter", + "normalized": "@ZENTER" + }, + { + "original": "@ozenter", + "normalized": "@OZENTER" + }, + { + "original": "@azenter", + "normalized": "@AZENTER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@zleave", + "normalized": "@ZLEAVE" + }, + { + "original": "@ozleave", + "normalized": "@OZLEAVE" + }, + { + "original": "@azleave", + "normalized": "@AZLEAVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@entrances", + "normalized": "@ENTRANCES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@exitformat", + "normalized": "@EXITFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@HTTP", + "normalized": "@HTTP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@firstexit", + "normalized": "@FIRSTEXIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@filter", + "normalized": "@FILTER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@filter2", + "normalized": "@FILTER2" + }, + { + "original": "@find", + "normalized": "@FIND" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@forwardlist", + "normalized": "@FORWARDLIST" + }, + { + "original": "forwardlist", + "normalized": "FORWARDLIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@debugforwardlist", + "normalized": "@DEBUGFORWARDLIST" + }, + { + "original": "debugforwardlist", + "normalized": "DEBUGFORWARDLIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@force", + "normalized": "@FORCE" + }, + { + "original": "@force2", + "normalized": "@FORCE2" + }, + { + "original": "@force3", + "normalized": "@FORCE3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@flag", + "normalized": "@FLAG" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@flag2", + "normalized": "@FLAG2" + }, + { + "original": "flag permissions", + "normalized": "FLAG PERMISSIONS" + }, + { + "original": "@function", + "normalized": "@FUNCTION" + }, + { + "original": "@function2", + "normalized": "@FUNCTION2" + }, + { + "original": "@function3", + "normalized": "@FUNCTION3" + }, + { + "original": "@function4", + "normalized": "@FUNCTION4" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@grep", + "normalized": "@GREP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@halt", + "normalized": "@HALT" + }, + { + "original": "@allhalt", + "normalized": "@ALLHALT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@haven", + "normalized": "@HAVEN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@hide", + "normalized": "@HIDE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@idescribe", + "normalized": "@IDESCRIBE" + }, + { + "original": "@oidescribe", + "normalized": "@OIDESCRIBE" + }, + { + "original": "@aidescribe", + "normalized": "@AIDESCRIBE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@hook", + "normalized": "@HOOK" + }, + { + "original": "@hook2", + "normalized": "@HOOK2" + }, + { + "original": "@hook3", + "normalized": "@HOOK3" + }, + { + "original": "@hook4", + "normalized": "@HOOK4" + }, + { + "original": "@hook5", + "normalized": "@HOOK5" + }, + { + "original": "@hook6", + "normalized": "@HOOK6" + }, + { + "original": "@hook7", + "normalized": "@HOOK7" + }, + { + "original": "HUH_COMMAND", + "normalized": "HUH_COMMAND" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@idle", + "normalized": "@IDLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@if", + "normalized": "@IF" + }, + { + "original": "@ifelse", + "normalized": "@IFELSE" + }, + { + "original": "@skip", + "normalized": "@SKIP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@if2", + "normalized": "@IF2" + }, + { + "original": "@infilter", + "normalized": "@INFILTER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@inprefix", + "normalized": "@INPREFIX" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@kick", + "normalized": "@KICK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@lemit", + "normalized": "@LEMIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@list", + "normalized": "@LIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@link", + "normalized": "@LINK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@destination", + "normalized": "@DESTINATION" + }, + { + "original": "@exitto", + "normalized": "@EXITTO" + }, + { + "original": "Variable Exits", + "normalized": "VARIABLE EXITS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@listen", + "normalized": "@LISTEN" + }, + { + "original": "@listen2", + "normalized": "@LISTEN2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCKING", + "normalized": "LOCKING" + }, + { + "original": "LOCKS", + "normalized": "LOCKS" + }, + { + "original": "@lock", + "normalized": "@LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@lset", + "normalized": "@LSET" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@log", + "normalized": "@LOG" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@logwipe", + "normalized": "@LOGWIPE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@message", + "normalized": "@MESSAGE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@message2", + "normalized": "@MESSAGE2" + }, + { + "original": "@message3", + "normalized": "@MESSAGE3" + }, + { + "original": "@moniker", + "normalized": "@MONIKER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@motd", + "normalized": "@MOTD" + }, + { + "original": "@listmotd", + "normalized": "@LISTMOTD" + }, + { + "original": "@wizmotd", + "normalized": "@WIZMOTD" + }, + { + "original": "@rejectmotd", + "normalized": "@REJECTMOTD" + }, + { + "original": "@name", + "normalized": "@NAME" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@ONAME", + "normalized": "@ONAME" + }, + { + "original": "@ANAME", + "normalized": "@ANAME" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@newpassword", + "normalized": "@NEWPASSWORD" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@notify", + "normalized": "@NOTIFY" + }, + { + "original": "@notify2", + "normalized": "@NOTIFY2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@nspemit", + "normalized": "@NSPEMIT" + }, + { + "original": "@nsemit", + "normalized": "@NSEMIT" + }, + { + "original": "@nslemit", + "normalized": "@NSLEMIT" + }, + { + "original": "@nsremit", + "normalized": "@NSREMIT" + }, + { + "original": "@nszemit", + "normalized": "@NSZEMIT" + }, + { + "original": "@nsoemit", + "normalized": "@NSOEMIT" + }, + { + "original": "@nsprompt", + "normalized": "@NSPROMPT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@oemit", + "normalized": "@OEMIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@oemit2", + "normalized": "@OEMIT2" + }, + { + "original": "@open", + "normalized": "@OPEN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@parent", + "normalized": "@PARENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@password", + "normalized": "@PASSWORD" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@pageformat", + "normalized": "@PAGEFORMAT" + }, + { + "original": "@outpageformat", + "normalized": "@OUTPAGEFORMAT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@pageformat2", + "normalized": "@PAGEFORMAT2" + }, + { + "original": "@outpageformat2", + "normalized": "@OUTPAGEFORMAT2" + }, + { + "original": "@receive", + "normalized": "@RECEIVE" + }, + { + "original": "@oreceive", + "normalized": "@ORECEIVE" + }, + { + "original": "@areceive", + "normalized": "@ARECEIVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@give", + "normalized": "@GIVE" + }, + { + "original": "@ogive", + "normalized": "@OGIVE" + }, + { + "original": "@agive", + "normalized": "@AGIVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@pcreate", + "normalized": "@PCREATE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@prompt", + "normalized": "@PROMPT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PROMPT_NEWLINES", + "normalized": "PROMPT_NEWLINES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@pemit", + "normalized": "@PEMIT" + }, + { + "original": "@pemit2", + "normalized": "@PEMIT2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@poll", + "normalized": "@POLL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@poor", + "normalized": "@POOR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@power", + "normalized": "@POWER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@power2", + "normalized": "@POWER2" + }, + { + "original": "@power3", + "normalized": "@POWER3" + }, + { + "original": "@prefix", + "normalized": "@PREFIX" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@ps", + "normalized": "@PS" + }, + { + "original": "@ps2", + "normalized": "@PS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@purge", + "normalized": "@PURGE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@quota", + "normalized": "@QUOTA" + }, + { + "original": "@quota2", + "normalized": "@QUOTA2" + }, + { + "original": "@squota", + "normalized": "@SQUOTA" + }, + { + "original": "@allquota", + "normalized": "@ALLQUOTA" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@readcache", + "normalized": "@READCACHE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@remit", + "normalized": "@REMIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@retry", + "normalized": "@RETRY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@retry2", + "normalized": "@RETRY2" + }, + { + "original": "@restart", + "normalized": "@RESTART" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@scan", + "normalized": "@SCAN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@search", + "normalized": "@SEARCH" + }, + { + "original": "@search2", + "normalized": "@SEARCH2" + }, + { + "original": "@search3", + "normalized": "@SEARCH3" + }, + { + "original": "@search4", + "normalized": "@SEARCH4" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@search5", + "normalized": "@SEARCH5" + }, + { + "original": "@set", + "normalized": "@SET" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATTRIB_SET", + "normalized": "ATTRIB_SET" + }, + { + "original": "@_", + "normalized": "@_" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@sex", + "normalized": "@SEX" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@shutdown", + "normalized": "@SHUTDOWN" + }, + { + "original": "@sitelock", + "normalized": "@SITELOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@sitelock2", + "normalized": "@SITELOCK2" + }, + { + "original": "@sitelock3", + "normalized": "@SITELOCK3" + }, + { + "original": "@SLAVE", + "normalized": "@SLAVE" + }, + { + "original": "@SOCKSET", + "normalized": "@SOCKSET" + }, + { + "original": "SOCKSET", + "normalized": "SOCKSET" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COLORSTYLE", + "normalized": "COLORSTYLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@SPEECHMOD", + "normalized": "@SPEECHMOD" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@mapsql", + "normalized": "@MAPSQL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@sql", + "normalized": "@SQL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@startup", + "normalized": "@STARTUP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@stats", + "normalized": "@STATS" + }, + { + "original": "@sweep", + "normalized": "@SWEEP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@switch", + "normalized": "@SWITCH" + }, + { + "original": "@select", + "normalized": "@SELECT" + }, + { + "original": "@switch2", + "normalized": "@SWITCH2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@switch3", + "normalized": "@SWITCH3" + }, + { + "original": "@switch4", + "normalized": "@SWITCH4" + }, + { + "original": "@teleport", + "normalized": "@TELEPORT" + }, + { + "original": "@teleport2", + "normalized": "@TELEPORT2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@trigger", + "normalized": "@TRIGGER" + }, + { + "original": "@trigger2", + "normalized": "@TRIGGER2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@trigger3", + "normalized": "@TRIGGER3" + }, + { + "original": "@ulock", + "normalized": "@ULOCK" + }, + { + "original": "@uunlock", + "normalized": "@UUNLOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@uptime", + "normalized": "@UPTIME" + }, + { + "original": "@uptime2", + "normalized": "@UPTIME2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@unlink", + "normalized": "@UNLINK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@unlock", + "normalized": "@UNLOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@version", + "normalized": "@VERSION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@verb", + "normalized": "@VERB" + }, + { + "original": "@verb2", + "normalized": "@VERB2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@verb3", + "normalized": "@VERB3" + }, + { + "original": "@verb4", + "normalized": "@VERB4" + }, + { + "original": "@wait", + "normalized": "@WAIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@wait2", + "normalized": "@WAIT2" + }, + { + "original": "@wait3", + "normalized": "@WAIT3" + }, + { + "original": "@wall", + "normalized": "@WALL" + }, + { + "original": "@rwall", + "normalized": "@RWALL" + }, + { + "original": "@wizwall", + "normalized": "@WIZWALL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@warnings", + "normalized": "@WARNINGS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@warnings2", + "normalized": "@WARNINGS2" + }, + { + "original": "@warnings3", + "normalized": "@WARNINGS3" + }, + { + "original": "@wcheck", + "normalized": "@WCHECK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@whereis", + "normalized": "@WHEREIS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@wipe", + "normalized": "@WIPE" + }, + { + "original": "@zemit", + "normalized": "@ZEMIT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ahelp", + "normalized": "AHELP" + }, + { + "original": "anews", + "normalized": "ANEWS" + }, + { + "original": "brief", + "normalized": "BRIEF" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "cd", + "normalized": "CD" + }, + { + "original": "ch", + "normalized": "CH" + }, + { + "original": "cv", + "normalized": "CV" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OUTPUTPREFIX", + "normalized": "OUTPUTPREFIX" + }, + { + "original": "OUTPUTSUFFIX", + "normalized": "OUTPUTSUFFIX" + }, + { + "original": "IDLE", + "normalized": "IDLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "teach", + "normalized": "TEACH" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "drop", + "normalized": "DROP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "enter", + "normalized": "ENTER" + }, + { + "original": "examine", + "normalized": "EXAMINE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "follow", + "normalized": "FOLLOW" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "dismiss", + "normalized": "DISMISS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "desert", + "normalized": "DESERT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "empty", + "normalized": "EMPTY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "get", + "normalized": "GET" + }, + { + "original": "take", + "normalized": "TAKE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@buy", + "normalized": "@BUY" + }, + { + "original": "@abuy", + "normalized": "@ABUY" + }, + { + "original": "@obuy", + "normalized": "@OBUY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@pricelist", + "normalized": "@PRICELIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "buy", + "normalized": "BUY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "give", + "normalized": "GIVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "go", + "normalized": "GO" + }, + { + "original": "goto", + "normalized": "GOTO" + }, + { + "original": "move", + "normalized": "MOVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INFO", + "normalized": "INFO" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "inventory", + "normalized": "INVENTORY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "leave", + "normalized": "LEAVE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOGOUT", + "normalized": "LOGOUT" + }, + { + "original": "look", + "normalized": "LOOK" + }, + { + "original": "read", + "normalized": "READ" + }, + { + "original": "look2", + "normalized": "LOOK2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "news", + "normalized": "NEWS" + }, + { + "original": "page", + "normalized": "PAGE" + }, + { + "original": "page2", + "normalized": "PAGE2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "pose", + "normalized": "POSE" + }, + { + "original": "semipose", + "normalized": "SEMIPOSE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "pose2", + "normalized": "POSE2" + }, + { + "original": "say", + "normalized": "SAY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "score", + "normalized": "SCORE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "think", + "normalized": "THINK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "QUIT", + "normalized": "QUIT" + }, + { + "original": "unfollow", + "normalized": "UNFOLLOW" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "use", + "normalized": "USE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WARN_ON_MISSING", + "normalized": "WARN_ON_MISSING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UNIMPLEMENTED_COMMAND", + "normalized": "UNIMPLEMENTED_COMMAND" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "whisper", + "normalized": "WHISPER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WHO", + "normalized": "WHO" + }, + { + "original": "DOING", + "normalized": "DOING" + }, + { + "original": "WHO2", + "normalized": "WHO2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SESSION", + "normalized": "SESSION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "with", + "normalized": "WITH" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "socket commands", + "normalized": "SOCKET COMMANDS" + }, + { + "original": "MSSP-REQUEST", + "normalized": "MSSP-REQUEST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@SUGGEST", + "normalized": "@SUGGEST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "penncode": [ + { + "original": "code", + "normalized": "CODE" + }, + { + "original": "contact", + "normalized": "CONTACT" + }, + { + "original": "download", + "normalized": "DOWNLOAD" + }, + { + "original": "i18n", + "normalized": "I18N" + }, + { + "original": "internationalization", + "normalized": "INTERNATIONALIZATION" + }, + { + "original": "locale", + "normalized": "LOCALE" + }, + { + "original": "translation", + "normalized": "TRANSLATION" + }, + { + "original": "copyright", + "normalized": "COPYRIGHT" + }, + { + "original": "copyrite", + "normalized": "COPYRITE" + }, + { + "original": "license", + "normalized": "LICENSE" + } + ], + "pennconf": [ + { + "original": "@config parameters", + "normalized": "@CONFIG PARAMETERS" + }, + { + "original": "@config attribs", + "normalized": "@CONFIG ATTRIBS" + }, + { + "original": "@config chat", + "normalized": "@CONFIG CHAT" + }, + { + "original": "@config cmds", + "normalized": "@CONFIG CMDS" + }, + { + "original": "@config cosmetic", + "normalized": "@CONFIG COSMETIC" + }, + { + "original": "@config cosmetic2", + "normalized": "@CONFIG COSMETIC2" + }, + { + "original": "@config costs", + "normalized": "@CONFIG COSTS" + }, + { + "original": "@config db", + "normalized": "@CONFIG DB" + }, + { + "original": "@config dump", + "normalized": "@CONFIG DUMP" + }, + { + "original": "@config flags", + "normalized": "@CONFIG FLAGS" + }, + { + "original": "@config funcs", + "normalized": "@CONFIG FUNCS" + }, + { + "original": "@config limits", + "normalized": "@CONFIG LIMITS" + }, + { + "original": "@config limits2", + "normalized": "@CONFIG LIMITS2" + }, + { + "original": "@config limits3", + "normalized": "@CONFIG LIMITS3" + }, + { + "original": "@config limits4", + "normalized": "@CONFIG LIMITS4" + }, + { + "original": "@config log", + "normalized": "@CONFIG LOG" + }, + { + "original": "@config net", + "normalized": "@CONFIG NET" + }, + { + "original": "@config tiny", + "normalized": "@CONFIG TINY" + } + ], + "pennevents": [ + { + "original": "EVENTS", + "normalized": "EVENTS" + }, + { + "original": "EVENT", + "normalized": "EVENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EVENT EXAMPLES", + "normalized": "EVENT EXAMPLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EVENT EXAMPLES2", + "normalized": "EVENT EXAMPLES2" + }, + { + "original": "EVENT LIST", + "normalized": "EVENT LIST" + }, + { + "original": "EVENT DB", + "normalized": "EVENT DB" + }, + { + "original": "EVENT DUMP", + "normalized": "EVENT DUMP" + }, + { + "original": "EVENT LOG", + "normalized": "EVENT LOG" + }, + { + "original": "EVENT OBJECT", + "normalized": "EVENT OBJECT" + }, + { + "original": "EVENT SQL", + "normalized": "EVENT SQL" + }, + { + "original": "EVENT SIGNAL", + "normalized": "EVENT SIGNAL" + }, + { + "original": "EVENT PLAYER", + "normalized": "EVENT PLAYER" + }, + { + "original": "EVENT SOCKET", + "normalized": "EVENT SOCKET" + }, + { + "original": "EVENT HTTP", + "normalized": "EVENT HTTP" + } + ], + "pennflag": [ + { + "original": "FLAGS", + "normalized": "FLAGS" + }, + { + "original": "FLAGS2", + "normalized": "FLAGS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FLAG LIST", + "normalized": "FLAG LIST" + }, + { + "original": "FLAGS LIST", + "normalized": "FLAGS LIST" + }, + { + "original": "ABODE", + "normalized": "ABODE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANSI", + "normalized": "ANSI" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "AUDIBLE", + "normalized": "AUDIBLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TRACK_MONEY", + "normalized": "TRACK_MONEY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CHOWN_OK", + "normalized": "CHOWN_OK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CLOUDY", + "normalized": "CLOUDY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COLOR", + "normalized": "COLOR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XTERM256", + "normalized": "XTERM256" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONNECTED", + "normalized": "CONNECTED" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DARK", + "normalized": "DARK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DEBUG", + "normalized": "DEBUG" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DEBUG2", + "normalized": "DEBUG2" + }, + { + "original": "DESTROY_OK", + "normalized": "DESTROY_OK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ENTER_OK", + "normalized": "ENTER_OK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FIXED", + "normalized": "FIXED" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FLOATING", + "normalized": "FLOATING" + }, + { + "original": "GAGGED", + "normalized": "GAGGED" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GOING", + "normalized": "GOING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HALTED", + "normalized": "HALTED" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HAVEN", + "normalized": "HAVEN" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INHERIT", + "normalized": "INHERIT" + }, + { + "original": "JUMP_OK", + "normalized": "JUMP_OK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "KEEPALIVE", + "normalized": "KEEPALIVE" + }, + { + "original": "LIGHT", + "normalized": "LIGHT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LINK_OK", + "normalized": "LINK_OK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MONITOR", + "normalized": "MONITOR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MYOPIC", + "normalized": "MYOPIC" + }, + { + "original": "NOSPOOF", + "normalized": "NOSPOOF" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OPAQUE", + "normalized": "OPAQUE" + }, + { + "original": "ORPHAN", + "normalized": "ORPHAN" + }, + { + "original": "PUPPET", + "normalized": "PUPPET" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "QUIET", + "normalized": "QUIET" + }, + { + "original": "SAFE", + "normalized": "SAFE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SHARED", + "normalized": "SHARED" + }, + { + "original": "STICKY", + "normalized": "STICKY" + }, + { + "original": "TRANSPARENT", + "normalized": "TRANSPARENT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UNFINDABLE", + "normalized": "UNFINDABLE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UNINSPECTED", + "normalized": "UNINSPECTED" + }, + { + "original": "VERBOSE", + "normalized": "VERBOSE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VISUAL", + "normalized": "VISUAL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WIZARD", + "normalized": "WIZARD" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "pennfunc": [ + { + "original": "FUNCTIONS", + "normalized": "FUNCTIONS" + }, + { + "original": "FUNCTION", + "normalized": "FUNCTION" + }, + { + "original": "FUNCTIONS2", + "normalized": "FUNCTIONS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FUNCTION LIST", + "normalized": "FUNCTION LIST" + }, + { + "original": "FUNCTION TYPES", + "normalized": "FUNCTION TYPES" + }, + { + "original": "Attribute functions", + "normalized": "ATTRIBUTE FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Bitwise functions", + "normalized": "BITWISE FUNCTIONS" + }, + { + "original": "Boolean functions", + "normalized": "BOOLEAN FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Communication functions", + "normalized": "COMMUNICATION FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Connection functions", + "normalized": "CONNECTION FUNCTIONS" + }, + { + "original": "Dbref functions", + "normalized": "DBREF FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Information functions", + "normalized": "INFORMATION FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "List functions", + "normalized": "LIST FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Math functions", + "normalized": "MATH FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Vector functions", + "normalized": "VECTOR FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Regular expression functions", + "normalized": "REGULAR EXPRESSION FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SQL functions", + "normalized": "SQL FUNCTIONS" + }, + { + "original": "String functions", + "normalized": "STRING FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Time functions", + "normalized": "TIME FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Utility functions", + "normalized": "UTILITY FUNCTIONS" + }, + { + "original": "@@()", + "normalized": "@@()" + }, + { + "original": "NULL()", + "normalized": "NULL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ABS()", + "normalized": "ABS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ACCENT()", + "normalized": "ACCENT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ACCENTS", + "normalized": "ACCENTS" + }, + { + "original": "ACCENTS2", + "normalized": "ACCENTS2" + }, + { + "original": "ACCENT2", + "normalized": "ACCENT2" + }, + { + "original": "ACCENTS3", + "normalized": "ACCENTS3" + }, + { + "original": "ACCNAME()", + "normalized": "ACCNAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ACOS()", + "normalized": "ACOS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ADD()", + "normalized": "ADD()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "AFTER()", + "normalized": "AFTER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ALIGN()", + "normalized": "ALIGN()" + }, + { + "original": "LALIGN()", + "normalized": "LALIGN()" + }, + { + "original": "ALIGN2", + "normalized": "ALIGN2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ALIGN3", + "normalized": "ALIGN3" + }, + { + "original": "ALIGN4", + "normalized": "ALIGN4" + }, + { + "original": "ALIGN5", + "normalized": "ALIGN5" + }, + { + "original": "ALLOF()", + "normalized": "ALLOF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ALPHAMAX()", + "normalized": "ALPHAMAX()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ALPHAMIN()", + "normalized": "ALPHAMIN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "AND()", + "normalized": "AND()" + }, + { + "original": "CAND()", + "normalized": "CAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANDFLAGS()", + "normalized": "ANDFLAGS()" + }, + { + "original": "ANDLFLAGS()", + "normalized": "ANDLFLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANDLPOWERS()", + "normalized": "ANDLPOWERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANSI()", + "normalized": "ANSI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANSI2", + "normalized": "ANSI2" + }, + { + "original": "ANSI3", + "normalized": "ANSI3" + }, + { + "original": "APOSS()", + "normalized": "APOSS()" + }, + { + "original": "%a", + "normalized": "%A" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ART()", + "normalized": "ART()" + }, + { + "original": "ASIN()", + "normalized": "ASIN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATAN()", + "normalized": "ATAN()" + }, + { + "original": "ATAN2()", + "normalized": "ATAN2()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATRLOCK()", + "normalized": "ATRLOCK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATTRIB_SET()", + "normalized": "ATTRIB_SET()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BAND()", + "normalized": "BAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BASECONV()", + "normalized": "BASECONV()" + }, + { + "original": "BEEP()", + "normalized": "BEEP()" + }, + { + "original": "BEFORE()", + "normalized": "BEFORE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BENCHMARK()", + "normalized": "BENCHMARK()" + }, + { + "original": "BRACKETS()", + "normalized": "BRACKETS()" + }, + { + "original": "BNAND()", + "normalized": "BNAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BNOT()", + "normalized": "BNOT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BOR()", + "normalized": "BOR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BOUND()", + "normalized": "BOUND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BXOR()", + "normalized": "BXOR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CAPSTR()", + "normalized": "CAPSTR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CAT()", + "normalized": "CAT()" + }, + { + "original": "STRCAT()", + "normalized": "STRCAT()" + }, + { + "original": "CENTER()", + "normalized": "CENTER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CHECKPASS()", + "normalized": "CHECKPASS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CHR()", + "normalized": "CHR()" + }, + { + "original": "ORD()", + "normalized": "ORD()" + }, + { + "original": "CLONE()", + "normalized": "CLONE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CMDS()", + "normalized": "CMDS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SENT()", + "normalized": "SENT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RECV()", + "normalized": "RECV()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COLORS()", + "normalized": "COLORS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "colors2", + "normalized": "COLORS2" + }, + { + "original": "COMP()", + "normalized": "COMP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CON()", + "normalized": "CON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COND()", + "normalized": "COND()" + }, + { + "original": "CONDALL()", + "normalized": "CONDALL()" + }, + { + "original": "NCOND()", + "normalized": "NCOND()" + }, + { + "original": "NCONDALL()", + "normalized": "NCONDALL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONFIG()", + "normalized": "CONFIG()" + }, + { + "original": "CONN()", + "normalized": "CONN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONTROLS()", + "normalized": "CONTROLS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONVSECS()", + "normalized": "CONVSECS()" + }, + { + "original": "CONVUTCSECS()", + "normalized": "CONVUTCSECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONVTIME()", + "normalized": "CONVTIME()" + }, + { + "original": "CONVUTCTIME()", + "normalized": "CONVUTCTIME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COS()", + "normalized": "COS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PCREATE()", + "normalized": "PCREATE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CREATE()", + "normalized": "CREATE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CTIME()", + "normalized": "CTIME()" + }, + { + "original": "CSECS()", + "normalized": "CSECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANGLES", + "normalized": "ANGLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CTU()", + "normalized": "CTU()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DEC()", + "normalized": "DEC()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DECOMPOSE()", + "normalized": "DECOMPOSE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DEFAULT()", + "normalized": "DEFAULT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRDELETE()", + "normalized": "STRDELETE()" + }, + { + "original": "DELETE()", + "normalized": "DELETE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIE()", + "normalized": "DIE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIG()", + "normalized": "DIG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIGEST()", + "normalized": "DIGEST()" + }, + { + "original": "MD5", + "normalized": "MD5" + }, + { + "original": "SHA1", + "normalized": "SHA1" + }, + { + "original": "CHECKSUM", + "normalized": "CHECKSUM" + }, + { + "original": "HASH", + "normalized": "HASH" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIST2D()", + "normalized": "DIST2D()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIST3D()", + "normalized": "DIST3D()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DIV()", + "normalized": "DIV()" + }, + { + "original": "FLOORDIV()", + "normalized": "FLOORDIV()" + }, + { + "original": "FDIV()", + "normalized": "FDIV()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DOING()", + "normalized": "DOING()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "E()", + "normalized": "E()" + }, + { + "original": "EXP()", + "normalized": "EXP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EDEFAULT()", + "normalized": "EDEFAULT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EDIT()", + "normalized": "EDIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ELEMENTS()", + "normalized": "ELEMENTS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ELOCK()", + "normalized": "ELOCK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EMIT()", + "normalized": "EMIT()" + }, + { + "original": "NSEMIT()", + "normalized": "NSEMIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ENCODE64()", + "normalized": "ENCODE64()" + }, + { + "original": "DECODE64()", + "normalized": "DECODE64()" + }, + { + "original": "base64", + "normalized": "BASE64" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ENCRYPT()", + "normalized": "ENCRYPT()" + }, + { + "original": "DECRYPT()", + "normalized": "DECRYPT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ENTRANCES()", + "normalized": "ENTRANCES()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EQ()", + "normalized": "EQ()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ESCAPE()", + "normalized": "ESCAPE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EVAL()", + "normalized": "EVAL()" + }, + { + "original": "GET_EVAL()", + "normalized": "GET_EVAL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EXIT()", + "normalized": "EXIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EXTRACT()", + "normalized": "EXTRACT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FILTER()", + "normalized": "FILTER()" + }, + { + "original": "FILTERBOOL()", + "normalized": "FILTERBOOL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FINDABLE()", + "normalized": "FINDABLE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FIRST()", + "normalized": "FIRST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FIRSTOF()", + "normalized": "FIRSTOF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FLAGS()", + "normalized": "FLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LFLAGS()", + "normalized": "LFLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FLIP()", + "normalized": "FLIP()" + }, + { + "original": "REVERSE()", + "normalized": "REVERSE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FMOD()", + "normalized": "FMOD()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FOLD()", + "normalized": "FOLD()" + }, + { + "original": "FOLD2", + "normalized": "FOLD2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FOLLOWERS()", + "normalized": "FOLLOWERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FOLLOWING()", + "normalized": "FOLLOWING()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FOREACH()", + "normalized": "FOREACH()" + }, + { + "original": "FOREACH2", + "normalized": "FOREACH2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FRACTION()", + "normalized": "FRACTION()" + }, + { + "original": "FULLNAME()", + "normalized": "FULLNAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FUNCTIONS()", + "normalized": "FUNCTIONS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GET()", + "normalized": "GET()" + }, + { + "original": "XGET()", + "normalized": "XGET()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GETPIDS()", + "normalized": "GETPIDS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GRAB()", + "normalized": "GRAB()" + }, + { + "original": "REGRAB()", + "normalized": "REGRAB()" + }, + { + "original": "REGRABI()", + "normalized": "REGRABI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GRABALL()", + "normalized": "GRABALL()" + }, + { + "original": "REGRABALL()", + "normalized": "REGRABALL()" + }, + { + "original": "REGRABALLI()", + "normalized": "REGRABALLI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GREP()", + "normalized": "GREP()" + }, + { + "original": "REGREP()", + "normalized": "REGREP()" + }, + { + "original": "WILDGREP()", + "normalized": "WILDGREP()" + }, + { + "original": "GREPI()", + "normalized": "GREPI()" + }, + { + "original": "REGREPI()", + "normalized": "REGREPI()" + }, + { + "original": "WILDGREPI()", + "normalized": "WILDGREPI()" + }, + { + "original": "PGREP()", + "normalized": "PGREP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GT()", + "normalized": "GT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GTE()", + "normalized": "GTE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HASATTR()", + "normalized": "HASATTR()" + }, + { + "original": "HASATTRP()", + "normalized": "HASATTRP()" + }, + { + "original": "HASATTRVAL()", + "normalized": "HASATTRVAL()" + }, + { + "original": "HASATTRPVAL()", + "normalized": "HASATTRPVAL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HASFLAG()", + "normalized": "HASFLAG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HASPOWER()", + "normalized": "HASPOWER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HASTYPE()", + "normalized": "HASTYPE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HIDDEN()", + "normalized": "HIDDEN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HOME()", + "normalized": "HOME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HOST()", + "normalized": "HOST()" + }, + { + "original": "HOSTNAME()", + "normalized": "HOSTNAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "IDLE()", + "normalized": "IDLE()" + }, + { + "original": "IDLESECS()", + "normalized": "IDLESECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "IF()", + "normalized": "IF()" + }, + { + "original": "IFELSE()", + "normalized": "IFELSE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INAME()", + "normalized": "INAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INC()", + "normalized": "INC()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INDEX()", + "normalized": "INDEX()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INSERT()", + "normalized": "INSERT()" + }, + { + "original": "LINSERT()", + "normalized": "LINSERT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISDAYLIGHT()", + "normalized": "ISDAYLIGHT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISDBREF()", + "normalized": "ISDBREF()" + }, + { + "original": "ISOBJID()", + "normalized": "ISOBJID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISINT()", + "normalized": "ISINT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISNUM()", + "normalized": "ISNUM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISREGEXP()", + "normalized": "ISREGEXP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISWORD()", + "normalized": "ISWORD()" + }, + { + "original": "ITEMS()", + "normalized": "ITEMS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ITEMIZE()", + "normalized": "ITEMIZE()" + }, + { + "original": "ELIST()", + "normalized": "ELIST()" + }, + { + "original": "ITER()", + "normalized": "ITER()" + }, + { + "original": "PARSE()", + "normalized": "PARSE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ITER2", + "normalized": "ITER2" + }, + { + "original": "IBREAK()", + "normalized": "IBREAK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ILEV()", + "normalized": "ILEV()" + }, + { + "original": "ITEXT()", + "normalized": "ITEXT()" + }, + { + "original": "INUM()", + "normalized": "INUM()" + }, + { + "original": "%i", + "normalized": "%I" + }, + { + "original": "%i0", + "normalized": "%I0" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ITEXT2", + "normalized": "ITEXT2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "IPADDR()", + "normalized": "IPADDR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LAST()", + "normalized": "LAST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LATTR()", + "normalized": "LATTR()" + }, + { + "original": "LATTRP()", + "normalized": "LATTRP()" + }, + { + "original": "REGLATTR()", + "normalized": "REGLATTR()" + }, + { + "original": "REGLATTRP()", + "normalized": "REGLATTRP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NATTR()", + "normalized": "NATTR()" + }, + { + "original": "NATTRP()", + "normalized": "NATTRP()" + }, + { + "original": "ATTRCNT()", + "normalized": "ATTRCNT()" + }, + { + "original": "ATTRPCNT()", + "normalized": "ATTRPCNT()" + }, + { + "original": "REGNATTR()", + "normalized": "REGNATTR()" + }, + { + "original": "REGNATTRP()", + "normalized": "REGNATTRP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LCON()", + "normalized": "LCON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LCSTR()", + "normalized": "LCSTR()" + }, + { + "original": "LCSTR2()", + "normalized": "LCSTR2()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LDELETE()", + "normalized": "LDELETE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LEFT()", + "normalized": "LEFT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NSLEMIT()", + "normalized": "NSLEMIT()" + }, + { + "original": "LEMIT()", + "normalized": "LEMIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LETQ()", + "normalized": "LETQ()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LEXITS()", + "normalized": "LEXITS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LJUST()", + "normalized": "LJUST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LINK()", + "normalized": "LINK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LIST()", + "normalized": "LIST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LIT()", + "normalized": "LIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LMATH()", + "normalized": "LMATH()" + }, + { + "original": "LN()", + "normalized": "LN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LNUM()", + "normalized": "LNUM()" + }, + { + "original": "LOC()", + "normalized": "LOC()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCALIZE()", + "normalized": "LOCALIZE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCATE()", + "normalized": "LOCATE()" + }, + { + "original": "LOCATE2", + "normalized": "LOCATE2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCATE3", + "normalized": "LOCATE3" + }, + { + "original": "LOCK()", + "normalized": "LOCK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LLOCKS()", + "normalized": "LLOCKS()" + }, + { + "original": "LOCKS()", + "normalized": "LOCKS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCKFILTER()", + "normalized": "LOCKFILTER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCKFLAGS()", + "normalized": "LOCKFLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LLOCKFLAGS()", + "normalized": "LLOCKFLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCKOWNER()", + "normalized": "LOCKOWNER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LSET()", + "normalized": "LSET()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOG()", + "normalized": "LOG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LPARENT()", + "normalized": "LPARENT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LPLAYERS()", + "normalized": "LPLAYERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LTHINGS()", + "normalized": "LTHINGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LPOS()", + "normalized": "LPOS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LSEARCH()", + "normalized": "LSEARCH()" + }, + { + "original": "NLSEARCH()", + "normalized": "NLSEARCH()" + }, + { + "original": "SEARCH()", + "normalized": "SEARCH()" + }, + { + "original": "NSEARCH()", + "normalized": "NSEARCH()" + }, + { + "original": "LSEARCHR()", + "normalized": "LSEARCHR()" + }, + { + "original": "CHILDREN()", + "normalized": "CHILDREN()" + }, + { + "original": "NCHILDREN()", + "normalized": "NCHILDREN()" + }, + { + "original": "LSEARCH2", + "normalized": "LSEARCH2" + }, + { + "original": "SEARCH2", + "normalized": "SEARCH2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LSEARCH3", + "normalized": "LSEARCH3" + }, + { + "original": "SEARCH3", + "normalized": "SEARCH3" + }, + { + "original": "LSTATS()", + "normalized": "LSTATS()" + }, + { + "original": "STATS()", + "normalized": "STATS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LT()", + "normalized": "LT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LTE()", + "normalized": "LTE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LVCON()", + "normalized": "LVCON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LVEXITS()", + "normalized": "LVEXITS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LVPLAYERS()", + "normalized": "LVPLAYERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LVTHINGS()", + "normalized": "LVTHINGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LWHO()", + "normalized": "LWHO()" + }, + { + "original": "LWHOID()", + "normalized": "LWHOID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAP()", + "normalized": "MAP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ELEMENT()", + "normalized": "ELEMENT()" + }, + { + "original": "MATCH()", + "normalized": "MATCH()" + }, + { + "original": "MATCHALL()", + "normalized": "MATCHALL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MATCH2", + "normalized": "MATCH2" + }, + { + "original": "REGLMATCH()", + "normalized": "REGLMATCH()" + }, + { + "original": "REGLMATCHI()", + "normalized": "REGLMATCHI()" + }, + { + "original": "REGLMATCHALL()", + "normalized": "REGLMATCHALL()" + }, + { + "original": "REGLMATCHALLI()", + "normalized": "REGLMATCHALLI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGLMATCH2", + "normalized": "REGLMATCH2" + }, + { + "original": "MAX()", + "normalized": "MAX()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "AVG()", + "normalized": "AVG()" + }, + { + "original": "MEAN()", + "normalized": "MEAN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MEDIAN()", + "normalized": "MEDIAN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MEMBER()", + "normalized": "MEMBER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MERGE()", + "normalized": "MERGE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MESSAGE()", + "normalized": "MESSAGE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MID()", + "normalized": "MID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MIN()", + "normalized": "MIN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MIX()", + "normalized": "MIX()" + }, + { + "original": "MIX2", + "normalized": "MIX2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MOD()", + "normalized": "MOD()" + }, + { + "original": "MODULO()", + "normalized": "MODULO()" + }, + { + "original": "MODULUS()", + "normalized": "MODULUS()" + }, + { + "original": "REMAINDER()", + "normalized": "REMAINDER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MONEY()", + "normalized": "MONEY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MTIME()", + "normalized": "MTIME()" + }, + { + "original": "MSECS()", + "normalized": "MSECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MUDNAME()", + "normalized": "MUDNAME()" + }, + { + "original": "MUDURL()", + "normalized": "MUDURL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MUL()", + "normalized": "MUL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MUNGE()", + "normalized": "MUNGE()" + }, + { + "original": "MUNGE2", + "normalized": "MUNGE2" + }, + { + "original": "MUNGE3", + "normalized": "MUNGE3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MWHO()", + "normalized": "MWHO()" + }, + { + "original": "MWHOID()", + "normalized": "MWHOID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ALIAS()", + "normalized": "ALIAS()" + }, + { + "original": "FULLALIAS()", + "normalized": "FULLALIAS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NAME()", + "normalized": "NAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MONIKER()", + "normalized": "MONIKER()" + }, + { + "original": "CNAME()", + "normalized": "CNAME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NAMELIST()", + "normalized": "NAMELIST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NAMEGRAB()", + "normalized": "NAMEGRAB()" + }, + { + "original": "NAMEGRABALL()", + "normalized": "NAMEGRABALL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NAND()", + "normalized": "NAND()" + }, + { + "original": "NCAND()", + "normalized": "NCAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NEARBY()", + "normalized": "NEARBY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NEQ()", + "normalized": "NEQ()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NEXT()", + "normalized": "NEXT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NEXTDBREF()", + "normalized": "NEXTDBREF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NOR()", + "normalized": "NOR()" + }, + { + "original": "NCOR()", + "normalized": "NCOR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NOT()", + "normalized": "NOT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NUM()", + "normalized": "NUM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NVCON()", + "normalized": "NVCON()" + }, + { + "original": "NCON()", + "normalized": "NCON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NVEXITS()", + "normalized": "NVEXITS()" + }, + { + "original": "NEXITS()", + "normalized": "NEXITS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NVPLAYERS()", + "normalized": "NVPLAYERS()" + }, + { + "original": "NPLAYERS()", + "normalized": "NPLAYERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NVTHINGS()", + "normalized": "NVTHINGS()" + }, + { + "original": "NTHINGS()", + "normalized": "NTHINGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "NMWHO()", + "normalized": "NMWHO()" + }, + { + "original": "NWHO()", + "normalized": "NWHO()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OBJ()", + "normalized": "OBJ()" + }, + { + "original": "%o", + "normalized": "%O" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OBJEVAL()", + "normalized": "OBJEVAL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OBJID()", + "normalized": "OBJID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OBJMEM()", + "normalized": "OBJMEM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OEMIT()", + "normalized": "OEMIT()" + }, + { + "original": "NSOEMIT()", + "normalized": "NSOEMIT()" + }, + { + "original": "OPEN()", + "normalized": "OPEN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OR()", + "normalized": "OR()" + }, + { + "original": "COR()", + "normalized": "COR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ORFLAGS()", + "normalized": "ORFLAGS()" + }, + { + "original": "ORLFLAGS()", + "normalized": "ORLFLAGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ORLPOWERS()", + "normalized": "ORLPOWERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OWNER()", + "normalized": "OWNER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PARENT()", + "normalized": "PARENT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PEMIT()", + "normalized": "PEMIT()" + }, + { + "original": "NSPEMIT()", + "normalized": "NSPEMIT()" + }, + { + "original": "PROMPT()", + "normalized": "PROMPT()" + }, + { + "original": "NSPROMPT()", + "normalized": "NSPROMPT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PI()", + "normalized": "PI()" + }, + { + "original": "PIDINFO()", + "normalized": "PIDINFO()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PLAYERMEM()", + "normalized": "PLAYERMEM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PLAYER()", + "normalized": "PLAYER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PMATCH()", + "normalized": "PMATCH()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "POLL()", + "normalized": "POLL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LPIDS()", + "normalized": "LPIDS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LPORTS()", + "normalized": "LPORTS()" + }, + { + "original": "PORTS()", + "normalized": "PORTS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "POS()", + "normalized": "POS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "POSS()", + "normalized": "POSS()" + }, + { + "original": "%p", + "normalized": "%P" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "POWER()", + "normalized": "POWER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "POWERS()", + "normalized": "POWERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "QUOTA()", + "normalized": "QUOTA()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "R()", + "normalized": "R()" + }, + { + "original": "%q", + "normalized": "%Q" + }, + { + "original": "R-FUNCTION", + "normalized": "R-FUNCTION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RAND()", + "normalized": "RAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RANDWORD()", + "normalized": "RANDWORD()" + }, + { + "original": "PICKRAND()", + "normalized": "PICKRAND()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RANDEXTRACT()", + "normalized": "RANDEXTRACT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGEDIT()", + "normalized": "REGEDIT()" + }, + { + "original": "REGEDITALL()", + "normalized": "REGEDITALL()" + }, + { + "original": "REGEDITI()", + "normalized": "REGEDITI()" + }, + { + "original": "REGEDITALLI()", + "normalized": "REGEDITALLI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGMATCH()", + "normalized": "REGMATCH()" + }, + { + "original": "REGMATCHI()", + "normalized": "REGMATCHI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGMATCH2", + "normalized": "REGMATCH2" + }, + { + "original": "REMIT()", + "normalized": "REMIT()" + }, + { + "original": "NSREMIT()", + "normalized": "NSREMIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REMOVE()", + "normalized": "REMOVE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RENDER()", + "normalized": "RENDER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REPEAT()", + "normalized": "REPEAT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LREPLACE()", + "normalized": "LREPLACE()" + }, + { + "original": "REPLACE()", + "normalized": "REPLACE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REST()", + "normalized": "REST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REVWORDS()", + "normalized": "REVWORDS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RIGHT()", + "normalized": "RIGHT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RJUST()", + "normalized": "RJUST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RLOC()", + "normalized": "RLOC()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RNUM()", + "normalized": "RNUM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ROOM()", + "normalized": "ROOM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ROOT()", + "normalized": "ROOT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ROUND()", + "normalized": "ROUND()" + }, + { + "original": "CEIL()", + "normalized": "CEIL()" + }, + { + "original": "FLOOR()", + "normalized": "FLOOR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FN()", + "normalized": "FN()" + }, + { + "original": "FN2", + "normalized": "FN2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "S()", + "normalized": "S()" + }, + { + "original": "S-FUNCTION", + "normalized": "S-FUNCTION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SCAN()", + "normalized": "SCAN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SCRAMBLE()", + "normalized": "SCRAMBLE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SECS()", + "normalized": "SECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SECURE()", + "normalized": "SECURE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SET()", + "normalized": "SET()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETDIFF()", + "normalized": "SETDIFF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETSYMDIFF()", + "normalized": "SETSYMDIFF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETINTER()", + "normalized": "SETINTER()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETQ()", + "normalized": "SETQ()" + }, + { + "original": "SETR()", + "normalized": "SETR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETQ2", + "normalized": "SETQ2" + }, + { + "original": "SETQ3", + "normalized": "SETQ3" + }, + { + "original": "SETQ4", + "normalized": "SETQ4" + }, + { + "original": "LISTQ()", + "normalized": "LISTQ()" + }, + { + "original": "UNSETQ()", + "normalized": "UNSETQ()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGISTERS()", + "normalized": "REGISTERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SETUNION()", + "normalized": "SETUNION()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SHA0()", + "normalized": "SHA0()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SHL()", + "normalized": "SHL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SHR()", + "normalized": "SHR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SHUFFLE()", + "normalized": "SHUFFLE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SIGN()", + "normalized": "SIGN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SIN()", + "normalized": "SIN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SORT()", + "normalized": "SORT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SORTBY()", + "normalized": "SORTBY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SORTKEY()", + "normalized": "SORTKEY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SORTING", + "normalized": "SORTING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SOUNDEX()", + "normalized": "SOUNDEX()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SOUNDEX2", + "normalized": "SOUNDEX2" + }, + { + "original": "SOUNDLIKE()", + "normalized": "SOUNDLIKE()" + }, + { + "original": "SOUNDSLIKE()", + "normalized": "SOUNDSLIKE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SPACE()", + "normalized": "SPACE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SPEAK()", + "normalized": "SPEAK()" + }, + { + "original": "SPEAKPENN()", + "normalized": "SPEAKPENN()" + }, + { + "original": "SPEAK2", + "normalized": "SPEAK2" + }, + { + "original": "SPEAK3", + "normalized": "SPEAK3" + }, + { + "original": "SPEAK4", + "normalized": "SPEAK4" + }, + { + "original": "SPEAK5", + "normalized": "SPEAK5" + }, + { + "original": "SPEAK6", + "normalized": "SPEAK6" + }, + { + "original": "SPEAK7", + "normalized": "SPEAK7" + }, + { + "original": "SPELLNUM()", + "normalized": "SPELLNUM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ORDINAL()", + "normalized": "ORDINAL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SPLICE()", + "normalized": "SPLICE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAPSQL()", + "normalized": "MAPSQL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SQL()", + "normalized": "SQL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SQL Examples", + "normalized": "SQL EXAMPLES" + }, + { + "original": "SQLESCAPE()", + "normalized": "SQLESCAPE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SQRT()", + "normalized": "SQRT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SQUISH()", + "normalized": "SQUISH()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STARTTIME()", + "normalized": "STARTTIME()" + }, + { + "original": "RESTARTTIME()", + "normalized": "RESTARTTIME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RESTARTS()", + "normalized": "RESTARTS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SSL()", + "normalized": "SSL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STEP()", + "normalized": "STEP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STDDEV()", + "normalized": "STDDEV()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRFIRSTOF()", + "normalized": "STRFIRSTOF()" + }, + { + "original": "STRALLOF()", + "normalized": "STRALLOF()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRINSERT()", + "normalized": "STRINSERT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRIPACCENTS()", + "normalized": "STRIPACCENTS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRIPANSI()", + "normalized": "STRIPANSI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRLEN()", + "normalized": "STRLEN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRMATCH()", + "normalized": "STRMATCH()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRREPLACE()", + "normalized": "STRREPLACE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SUB()", + "normalized": "SUB()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SUBJ()", + "normalized": "SUBJ()" + }, + { + "original": "%s", + "normalized": "%S" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RESWITCH()", + "normalized": "RESWITCH()" + }, + { + "original": "RESWITCHI()", + "normalized": "RESWITCHI()" + }, + { + "original": "RESWITCHALL()", + "normalized": "RESWITCHALL()" + }, + { + "original": "RESWITCHALLI()", + "normalized": "RESWITCHALLI()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SWITCH()", + "normalized": "SWITCH()" + }, + { + "original": "SWITCHALL()", + "normalized": "SWITCHALL()" + }, + { + "original": "CASE()", + "normalized": "CASE()" + }, + { + "original": "CASEALL()", + "normalized": "CASEALL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SWITCH2", + "normalized": "SWITCH2" + }, + { + "original": "SWITCH WILDCARDS", + "normalized": "SWITCH WILDCARDS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STEXT()", + "normalized": "STEXT()" + }, + { + "original": "SLEV()", + "normalized": "SLEV()" + }, + { + "original": "%$", + "normalized": "%$" + }, + { + "original": "%$0", + "normalized": "%$0" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "T()", + "normalized": "T()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TABLE()", + "normalized": "TABLE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TAN()", + "normalized": "TAN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TEL()", + "normalized": "TEL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TERMINFO()", + "normalized": "TERMINFO()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON FUNCTIONS", + "normalized": "JSON FUNCTIONS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OOB()", + "normalized": "OOB()" + }, + { + "original": "GMCP", + "normalized": "GMCP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ISJSON()", + "normalized": "ISJSON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON()", + "normalized": "JSON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON2", + "normalized": "JSON2" + }, + { + "original": "JSON_MAP()", + "normalized": "JSON_MAP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON_MAP2", + "normalized": "JSON_MAP2" + }, + { + "original": "JSON_MAP3", + "normalized": "JSON_MAP3" + }, + { + "original": "JSON_QUERY()", + "normalized": "JSON_QUERY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON_QUERY2", + "normalized": "JSON_QUERY2" + }, + { + "original": "JSON_QUERY3", + "normalized": "JSON_QUERY3" + }, + { + "original": "JSON PATHS", + "normalized": "JSON PATHS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "JSON_MOD()", + "normalized": "JSON_MOD()" + }, + { + "original": "JSON_MOD2", + "normalized": "JSON_MOD2" + }, + { + "original": "TESTLOCK()", + "normalized": "TESTLOCK()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TEXTFILE()", + "normalized": "TEXTFILE()" + }, + { + "original": "TEXTENTRIES()", + "normalized": "TEXTENTRIES()" + }, + { + "original": "TEXTSEARCH()", + "normalized": "TEXTSEARCH()" + }, + { + "original": "DYNHELP()", + "normalized": "DYNHELP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TIME()", + "normalized": "TIME()" + }, + { + "original": "UTCTIME()", + "normalized": "UTCTIME()" + }, + { + "original": "TIME2", + "normalized": "TIME2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TIMECALC()", + "normalized": "TIMECALC()" + }, + { + "original": "SECSCALC()", + "normalized": "SECSCALC()" + }, + { + "original": "TIMECALC2", + "normalized": "TIMECALC2" + }, + { + "original": "TIMEZONES", + "normalized": "TIMEZONES" + }, + { + "original": "@TZ", + "normalized": "@TZ" + }, + { + "original": "TIMEZONES2", + "normalized": "TIMEZONES2" + }, + { + "original": "TIMEZONES3", + "normalized": "TIMEZONES3" + }, + { + "original": "TIMEZONES4", + "normalized": "TIMEZONES4" + }, + { + "original": "TIMEZONES5", + "normalized": "TIMEZONES5" + }, + { + "original": "TIMEZONES6", + "normalized": "TIMEZONES6" + }, + { + "original": "TIMEZONES7", + "normalized": "TIMEZONES7" + }, + { + "original": "TIMEZONES8", + "normalized": "TIMEZONES8" + }, + { + "original": "TIMEZONES9", + "normalized": "TIMEZONES9" + }, + { + "original": "TIMEZONES10", + "normalized": "TIMEZONES10" + }, + { + "original": "TIMEZONES11", + "normalized": "TIMEZONES11" + }, + { + "original": "TIMEZONES12", + "normalized": "TIMEZONES12" + }, + { + "original": "TIMEZONES13", + "normalized": "TIMEZONES13" + }, + { + "original": "ETIME()", + "normalized": "ETIME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ETIMEFMT()", + "normalized": "ETIMEFMT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ETIMEFMT2", + "normalized": "ETIMEFMT2" + }, + { + "original": "ETIMEFMT3", + "normalized": "ETIMEFMT3" + }, + { + "original": "TIMEFMT()", + "normalized": "TIMEFMT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TIMEFMT2", + "normalized": "TIMEFMT2" + }, + { + "original": "TIMESTRING()", + "normalized": "TIMESTRING()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRINGSECS()", + "normalized": "STRINGSECS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TR()", + "normalized": "TR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TRIM()", + "normalized": "TRIM()" + }, + { + "original": "TRIMPENN()", + "normalized": "TRIMPENN()" + }, + { + "original": "TRIMTINY()", + "normalized": "TRIMTINY()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TRUNC()", + "normalized": "TRUNC()" + }, + { + "original": "VAL()", + "normalized": "VAL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TYPE()", + "normalized": "TYPE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PFUN()", + "normalized": "PFUN()" + }, + { + "original": "PFUN2", + "normalized": "PFUN2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PFUN3", + "normalized": "PFUN3" + }, + { + "original": "U()", + "normalized": "U()" + }, + { + "original": "UFUN()", + "normalized": "UFUN()" + }, + { + "original": "ULAMBDA()", + "normalized": "ULAMBDA()" + }, + { + "original": "U2", + "normalized": "U2" + }, + { + "original": "UFUN2", + "normalized": "UFUN2" + }, + { + "original": "U3", + "normalized": "U3" + }, + { + "original": "UFUN3", + "normalized": "UFUN3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UCSTR()", + "normalized": "UCSTR()" + }, + { + "original": "UCSTR2()", + "normalized": "UCSTR2()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UDEFAULT()", + "normalized": "UDEFAULT()" + }, + { + "original": "ULDEFAULT()", + "normalized": "ULDEFAULT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ULOCAL()", + "normalized": "ULOCAL()" + }, + { + "original": "ULOCAL2", + "normalized": "ULOCAL2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UNIQUE()", + "normalized": "UNIQUE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "V()", + "normalized": "V()" + }, + { + "original": "V-FUNCTION", + "normalized": "V-FUNCTION" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VADD()", + "normalized": "VADD()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VALID()", + "normalized": "VALID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "valid2", + "normalized": "VALID2" + }, + { + "original": "VCROSS()", + "normalized": "VCROSS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VDIM()", + "normalized": "VDIM()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VDOT()", + "normalized": "VDOT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VMIN()", + "normalized": "VMIN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VMAX()", + "normalized": "VMAX()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VERSION()", + "normalized": "VERSION()" + }, + { + "original": "NUMVERSION()", + "normalized": "NUMVERSION()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VISIBLE()", + "normalized": "VISIBLE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VMAG()", + "normalized": "VMAG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VMUL()", + "normalized": "VMUL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VSUB()", + "normalized": "VSUB()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VUNIT()", + "normalized": "VUNIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WIDTH()", + "normalized": "WIDTH()" + }, + { + "original": "HEIGHT()", + "normalized": "HEIGHT()" + }, + { + "original": "SCREENWIDTH", + "normalized": "SCREENWIDTH" + }, + { + "original": "SCREENHEIGHT", + "normalized": "SCREENHEIGHT" + }, + { + "original": "WHERE()", + "normalized": "WHERE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WIPE()", + "normalized": "WIPE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WORDPOS()", + "normalized": "WORDPOS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WORDS()", + "normalized": "WORDS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WRAP()", + "normalized": "WRAP()" + }, + { + "original": "XATTR()", + "normalized": "XATTR()" + }, + { + "original": "XATTRP()", + "normalized": "XATTRP()" + }, + { + "original": "REGXATTR()", + "normalized": "REGXATTR()" + }, + { + "original": "REGXATTRP()", + "normalized": "REGXATTRP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XOR()", + "normalized": "XOR()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XVCON()", + "normalized": "XVCON()" + }, + { + "original": "XCON()", + "normalized": "XCON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XVEXITS()", + "normalized": "XVEXITS()" + }, + { + "original": "XEXITS()", + "normalized": "XEXITS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XVPLAYERS()", + "normalized": "XVPLAYERS()" + }, + { + "original": "XPLAYERS()", + "normalized": "XPLAYERS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XVTHINGS()", + "normalized": "XVTHINGS()" + }, + { + "original": "XTHINGS()", + "normalized": "XTHINGS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "XWHO()", + "normalized": "XWHO()" + }, + { + "original": "XWHOID()", + "normalized": "XWHOID()" + }, + { + "original": "XMWHO()", + "normalized": "XMWHO()" + }, + { + "original": "XMWHOID()", + "normalized": "XMWHOID()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZWHO()", + "normalized": "ZWHO()" + }, + { + "original": "ZMWHO()", + "normalized": "ZMWHO()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZEMIT()", + "normalized": "ZEMIT()" + }, + { + "original": "NSZEMIT()", + "normalized": "NSZEMIT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZFUN()", + "normalized": "ZFUN()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZONE()", + "normalized": "ZONE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UPTIME()", + "normalized": "UPTIME()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SUGGEST()", + "normalized": "SUGGEST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONNLOG()", + "normalized": "CONNLOG()" + }, + { + "original": "CONNLOG2", + "normalized": "CONNLOG2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CONNLOG3", + "normalized": "CONNLOG3" + }, + { + "original": "CONNRECORD()", + "normalized": "CONNRECORD()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ADDRLOG()", + "normalized": "ADDRLOG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "URLENCODE()", + "normalized": "URLENCODE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "URLDECODE()", + "normalized": "URLDECODE()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HMAC()", + "normalized": "HMAC()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "pennhttp": [ + { + "original": "HTTP", + "normalized": "HTTP" + }, + { + "original": "http_handler", + "normalized": "HTTP_HANDLER" + }, + { + "original": "http_per_second", + "normalized": "HTTP_PER_SECOND" + }, + { + "original": "@config http_per_second", + "normalized": "@CONFIG HTTP_PER_SECOND" + }, + { + "original": "@config http_handler", + "normalized": "@CONFIG HTTP_HANDLER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HTTP2", + "normalized": "HTTP2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HTTP3", + "normalized": "HTTP3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@RESPOND", + "normalized": "@RESPOND" + }, + { + "original": "@RESPOND/TYPE", + "normalized": "@RESPOND/TYPE" + }, + { + "original": "@RESPOND/HEADER", + "normalized": "@RESPOND/HEADER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@RESPOND2", + "normalized": "@RESPOND2" + }, + { + "original": "@RESPOND3", + "normalized": "@RESPOND3" + }, + { + "original": "FORMDECODE()", + "normalized": "FORMDECODE()" + }, + { + "original": "HTTP EXAMPLES", + "normalized": "HTTP EXAMPLES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HTTP SIMPLE", + "normalized": "HTTP SIMPLE" + }, + { + "original": "HTTP GET", + "normalized": "HTTP GET" + }, + { + "original": "HTTP POST", + "normalized": "HTTP POST" + }, + { + "original": "HTTP SITELOCK", + "normalized": "HTTP SITELOCK" + } + ], + "pennlock": [ + { + "original": "LOCK KEYS", + "normalized": "LOCK KEYS" + }, + { + "original": "LOCK KEYS2", + "normalized": "LOCK KEYS2" + }, + { + "original": "@LOCK-COMPLEX", + "normalized": "@LOCK-COMPLEX" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK-SIMPLE", + "normalized": "@LOCK-SIMPLE" + }, + { + "original": "@LOCK-OBJID", + "normalized": "@LOCK-OBJID" + }, + { + "original": "SIMPLE LOCKS", + "normalized": "SIMPLE LOCKS" + }, + { + "original": "@LOCK-OWNER", + "normalized": "@LOCK-OWNER" + }, + { + "original": "@LOCK-CARRY", + "normalized": "@LOCK-CARRY" + }, + { + "original": "OWNER LOCK", + "normalized": "OWNER LOCK" + }, + { + "original": "CARRY LOCK", + "normalized": "CARRY LOCK" + }, + { + "original": "@LOCK-ATTRIBUTE", + "normalized": "@LOCK-ATTRIBUTE" + }, + { + "original": "ATTRIBUTE LOCKS", + "normalized": "ATTRIBUTE LOCKS" + }, + { + "original": "@LOCK-EVALUATION", + "normalized": "@LOCK-EVALUATION" + }, + { + "original": "EVALUATION LOCK", + "normalized": "EVALUATION LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK-EVAL2", + "normalized": "@LOCK-EVAL2" + }, + { + "original": "@LOCK-EVALUATION2", + "normalized": "@LOCK-EVALUATION2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK-NAME", + "normalized": "@LOCK-NAME" + }, + { + "original": "NAME LOCKS", + "normalized": "NAME LOCKS" + }, + { + "original": "@LOCK-BIT", + "normalized": "@LOCK-BIT" + }, + { + "original": "@LOCK-FLAG", + "normalized": "@LOCK-FLAG" + }, + { + "original": "@LOCK-TYPE", + "normalized": "@LOCK-TYPE" + }, + { + "original": "@LOCK-POWER", + "normalized": "@LOCK-POWER" + }, + { + "original": "@LOCK-CHANNEL", + "normalized": "@LOCK-CHANNEL" + }, + { + "original": "BIT LOCKS", + "normalized": "BIT LOCKS" + }, + { + "original": "@LOCK-DBREFLIST", + "normalized": "@LOCK-DBREFLIST" + }, + { + "original": "@LOCK-LIST", + "normalized": "@LOCK-LIST" + }, + { + "original": "LIST LOCK", + "normalized": "LIST LOCK" + }, + { + "original": "@LOCK-INDIRECT", + "normalized": "@LOCK-INDIRECT" + }, + { + "original": "INDIRECT LOCKS", + "normalized": "INDIRECT LOCKS" + }, + { + "original": "@LOCK-HOST", + "normalized": "@LOCK-HOST" + }, + { + "original": "HOST LOCKS", + "normalized": "HOST LOCKS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCKTYPES", + "normalized": "LOCKTYPES" + }, + { + "original": "LOCKLIST", + "normalized": "LOCKLIST" + }, + { + "original": "LOCK TYPES", + "normalized": "LOCK TYPES" + }, + { + "original": "LOCK LIST", + "normalized": "LOCK LIST" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOCK TYPES2", + "normalized": "LOCK TYPES2" + }, + { + "original": "LOCKTYPES2", + "normalized": "LOCKTYPES2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/BASIC", + "normalized": "@LOCK/BASIC" + }, + { + "original": "@LOCK/ENTER", + "normalized": "@LOCK/ENTER" + }, + { + "original": "@LOCK/LEAVE", + "normalized": "@LOCK/LEAVE" + }, + { + "original": "@LOCK/TELEPORT", + "normalized": "@LOCK/TELEPORT" + }, + { + "original": "Basic Lock", + "normalized": "BASIC LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Enter Lock", + "normalized": "ENTER LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Leave Lock", + "normalized": "LEAVE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Teleport Lock", + "normalized": "TELEPORT LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/FOLLOW", + "normalized": "@LOCK/FOLLOW" + }, + { + "original": "@LOCK/FORWARD", + "normalized": "@LOCK/FORWARD" + }, + { + "original": "@LOCK/DROPTO", + "normalized": "@LOCK/DROPTO" + }, + { + "original": "Follow Lock", + "normalized": "FOLLOW LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Forward Lock", + "normalized": "FORWARD LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Dropto Lock", + "normalized": "DROPTO LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/USE", + "normalized": "@LOCK/USE" + }, + { + "original": "@LOCK/COMMAND", + "normalized": "@LOCK/COMMAND" + }, + { + "original": "@LOCK/LISTEN", + "normalized": "@LOCK/LISTEN" + }, + { + "original": "Use Lock", + "normalized": "USE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Command Lock", + "normalized": "COMMAND LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Listen Lock", + "normalized": "LISTEN LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/PAGE", + "normalized": "@LOCK/PAGE" + }, + { + "original": "@LOCK/SPEECH", + "normalized": "@LOCK/SPEECH" + }, + { + "original": "@LOCK/MAIL", + "normalized": "@LOCK/MAIL" + }, + { + "original": "@LOCK/MAILFORWARD", + "normalized": "@LOCK/MAILFORWARD" + }, + { + "original": "@LOCK/INTERACT", + "normalized": "@LOCK/INTERACT" + }, + { + "original": "Page Lock", + "normalized": "PAGE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Speech Lock", + "normalized": "SPEECH LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Mail Lock", + "normalized": "MAIL LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Mailforward Lock", + "normalized": "MAILFORWARD LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Interact Lock", + "normalized": "INTERACT LOCK" + }, + { + "original": "@LOCK/DROP", + "normalized": "@LOCK/DROP" + }, + { + "original": "@LOCK/DROPIN", + "normalized": "@LOCK/DROPIN" + }, + { + "original": "@LOCK/GIVE", + "normalized": "@LOCK/GIVE" + }, + { + "original": "@LOCK/FROM", + "normalized": "@LOCK/FROM" + }, + { + "original": "@LOCK/PAY", + "normalized": "@LOCK/PAY" + }, + { + "original": "@LOCK/RECEIVE", + "normalized": "@LOCK/RECEIVE" + }, + { + "original": "@LOCK/TAKE", + "normalized": "@LOCK/TAKE" + }, + { + "original": "Drop Lock", + "normalized": "DROP LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Dropin Lock", + "normalized": "DROPIN LOCK" + }, + { + "original": "Give Lock", + "normalized": "GIVE LOCK" + }, + { + "original": "From Lock", + "normalized": "FROM LOCK" + }, + { + "original": "Pay Lock", + "normalized": "PAY LOCK" + }, + { + "original": "Receive Lock", + "normalized": "RECEIVE LOCK" + }, + { + "original": "Take Lock", + "normalized": "TAKE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/FILTER", + "normalized": "@LOCK/FILTER" + }, + { + "original": "@LOCK/INFILTER", + "normalized": "@LOCK/INFILTER" + }, + { + "original": "Filter Lock", + "normalized": "FILTER LOCK" + }, + { + "original": "Infilter Lock", + "normalized": "INFILTER LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/CONTROL", + "normalized": "@LOCK/CONTROL" + }, + { + "original": "@LOCK/DESTROY", + "normalized": "@LOCK/DESTROY" + }, + { + "original": "@LOCK/EXAMINE", + "normalized": "@LOCK/EXAMINE" + }, + { + "original": "Control Lock", + "normalized": "CONTROL LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Destroy Lock", + "normalized": "DESTROY LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Examine Lock", + "normalized": "EXAMINE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/ZONE", + "normalized": "@LOCK/ZONE" + }, + { + "original": "@LOCK/CHZONE", + "normalized": "@LOCK/CHZONE" + }, + { + "original": "@LOCK/CHOWN", + "normalized": "@LOCK/CHOWN" + }, + { + "original": "@LOCK/PARENT", + "normalized": "@LOCK/PARENT" + }, + { + "original": "@LOCK/LINK", + "normalized": "@LOCK/LINK" + }, + { + "original": "@LOCK/OPEN", + "normalized": "@LOCK/OPEN" + }, + { + "original": "Zone Lock", + "normalized": "ZONE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Chzone Lock", + "normalized": "CHZONE LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Chown Lock", + "normalized": "CHOWN LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Parent Lock", + "normalized": "PARENT LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Link Lock", + "normalized": "LINK LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Open Lock", + "normalized": "OPEN LOCK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@LOCK/USER", + "normalized": "@LOCK/USER" + }, + { + "original": "@LOCK/USER:", + "normalized": "@LOCK/USER:" + }, + { + "original": "User-defined Locks", + "normalized": "USER-DEFINED LOCKS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "pennmail": [ + { + "original": "MAIL", + "normalized": "MAIL" + }, + { + "original": "@MAIL", + "normalized": "@MAIL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAIL-READING", + "normalized": "MAIL-READING" + }, + { + "original": "@MAIL/READ", + "normalized": "@MAIL/READ" + }, + { + "original": "@MAIL/LIST", + "normalized": "@MAIL/LIST" + }, + { + "original": "@MAIL/CSTATS", + "normalized": "@MAIL/CSTATS" + }, + { + "original": "MAIL-SENDING", + "normalized": "MAIL-SENDING" + }, + { + "original": "@MAIL/SEND", + "normalized": "@MAIL/SEND" + }, + { + "original": "@MAIL/FWD", + "normalized": "@MAIL/FWD" + }, + { + "original": "MAIL-OTHER", + "normalized": "MAIL-OTHER" + }, + { + "original": "@MAIL/CLEAR", + "normalized": "@MAIL/CLEAR" + }, + { + "original": "@MAIL/UNCLEAR", + "normalized": "@MAIL/UNCLEAR" + }, + { + "original": "@MAIL/PURGE", + "normalized": "@MAIL/PURGE" + }, + { + "original": "@MAIL/TAG", + "normalized": "@MAIL/TAG" + }, + { + "original": "@MAIL/UNTAG", + "normalized": "@MAIL/UNTAG" + }, + { + "original": "@MAIL/UNREAD", + "normalized": "@MAIL/UNREAD" + }, + { + "original": "@MAIL/STATUS", + "normalized": "@MAIL/STATUS" + }, + { + "original": "MAIL-FOLDERS", + "normalized": "MAIL-FOLDERS" + }, + { + "original": "@MAIL/FOLDER", + "normalized": "@MAIL/FOLDER" + }, + { + "original": "@MAIL/UNFOLDER", + "normalized": "@MAIL/UNFOLDER" + }, + { + "original": "@MAIL/FILE", + "normalized": "@MAIL/FILE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAIL-REVIEWING", + "normalized": "MAIL-REVIEWING" + }, + { + "original": "@MAIL/REVIEW", + "normalized": "@MAIL/REVIEW" + }, + { + "original": "@MAIL/RETRACT", + "normalized": "@MAIL/RETRACT" + }, + { + "original": "@MAILQUOTA", + "normalized": "@MAILQUOTA" + }, + { + "original": "@MAILFILTER", + "normalized": "@MAILFILTER" + }, + { + "original": "MAILFILTER", + "normalized": "MAILFILTER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@MAILSIGNATURE", + "normalized": "@MAILSIGNATURE" + }, + { + "original": "MAILSIGNATURE", + "normalized": "MAILSIGNATURE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAIL-ADMIN", + "normalized": "MAIL-ADMIN" + }, + { + "original": "@MALIAS", + "normalized": "@MALIAS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@MALIAS2", + "normalized": "@MALIAS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@MALIAS3", + "normalized": "@MALIAS3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@MALIAS4", + "normalized": "@MALIAS4" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@MALIAS5", + "normalized": "@MALIAS5" + }, + { + "original": "Mail Functions", + "normalized": "MAIL FUNCTIONS" + }, + { + "original": "FOLDERSTATS()", + "normalized": "FOLDERSTATS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAIL()", + "normalized": "MAIL()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAILLIST()", + "normalized": "MAILLIST()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAILFROM()", + "normalized": "MAILFROM()" + }, + { + "original": "MAILTIME()", + "normalized": "MAILTIME()" + }, + { + "original": "MAILSTATUS()", + "normalized": "MAILSTATUS()" + }, + { + "original": "MAILSUBJECT()", + "normalized": "MAILSUBJECT()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAILSTATS()", + "normalized": "MAILSTATS()" + }, + { + "original": "MAILDSTATS()", + "normalized": "MAILDSTATS()" + }, + { + "original": "MAILFSTATS()", + "normalized": "MAILFSTATS()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MAILSEND()", + "normalized": "MAILSEND()" + }, + { + "original": "MALIAS()", + "normalized": "MALIAS()" + } + ], + "pennpueb": [ + { + "original": "PUEBLO", + "normalized": "PUEBLO" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PUEBLO2", + "normalized": "PUEBLO2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HTML", + "normalized": "HTML" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PUEBLO()", + "normalized": "PUEBLO()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "@VRML_URL", + "normalized": "@VRML_URL" + }, + { + "original": "VRML_URL", + "normalized": "VRML_URL" + }, + { + "original": "VRML", + "normalized": "VRML" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HTML FUNCTIONS", + "normalized": "HTML FUNCTIONS" + }, + { + "original": "HTML()", + "normalized": "HTML()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TAG()", + "normalized": "TAG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ENDTAG()", + "normalized": "ENDTAG()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "TAGWRAP()", + "normalized": "TAGWRAP()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WEBSOCKETS", + "normalized": "WEBSOCKETS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WSHTML()", + "normalized": "WSHTML()" + }, + { + "original": "WSJSON()", + "normalized": "WSJSON()" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + } + ], + "penntop": [ + { + "original": "help", + "normalized": "HELP" + }, + { + "original": "help search", + "normalized": "HELP SEARCH" + }, + { + "original": "help/search", + "normalized": "HELP/SEARCH" + }, + { + "original": "helpfile", + "normalized": "HELPFILE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "helpfile2", + "normalized": "HELPFILE2" + }, + { + "original": "help query", + "normalized": "HELP QUERY" + }, + { + "original": "newbie", + "normalized": "NEWBIE" + }, + { + "original": "newbie2", + "normalized": "NEWBIE2" + }, + { + "original": "newbie3", + "normalized": "NEWBIE3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "Getting Started", + "normalized": "GETTING STARTED" + }, + { + "original": "GS", + "normalized": "GS" + }, + { + "original": "Walkthrough", + "normalized": "WALKTHROUGH" + }, + { + "original": "GS MOVING", + "normalized": "GS MOVING" + }, + { + "original": "GS MOVING2", + "normalized": "GS MOVING2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GS TALKING", + "normalized": "GS TALKING" + }, + { + "original": "GS TALKING2", + "normalized": "GS TALKING2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GS CHAT", + "normalized": "GS CHAT" + }, + { + "original": "GS CHANNELS", + "normalized": "GS CHANNELS" + }, + { + "original": "GS CHAT2", + "normalized": "GS CHAT2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GS MAIL", + "normalized": "GS MAIL" + }, + { + "original": "GS MAIL2", + "normalized": "GS MAIL2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "topics", + "normalized": "TOPICS" + }, + { + "original": "topics2", + "normalized": "TOPICS2" + }, + { + "original": "ACTION LISTS", + "normalized": "ACTION LISTS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ACTION2", + "normalized": "ACTION2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANCESTORS", + "normalized": "ANCESTORS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ANONYMOUS ATTRIBUTES", + "normalized": "ANONYMOUS ATTRIBUTES" + }, + { + "original": "LAMBDA", + "normalized": "LAMBDA" + }, + { + "original": "#LAMBDA", + "normalized": "#LAMBDA" + }, + { + "original": "#APPLY", + "normalized": "#APPLY" + }, + { + "original": "ANONYMOUS2", + "normalized": "ANONYMOUS2" + }, + { + "original": "LAMBDA2", + "normalized": "LAMBDA2" + }, + { + "original": "#LAMBDA2", + "normalized": "#LAMBDA2" + }, + { + "original": "ANONYMOUS3", + "normalized": "ANONYMOUS3" + }, + { + "original": "LAMBDA3", + "normalized": "LAMBDA3" + }, + { + "original": "#LAMBDA3", + "normalized": "#LAMBDA3" + }, + { + "original": "ANONYMOUS4", + "normalized": "ANONYMOUS4" + }, + { + "original": "LAMBDA4", + "normalized": "LAMBDA4" + }, + { + "original": "#LAMBDA4", + "normalized": "#LAMBDA4" + }, + { + "original": "LAMBDA FUNCTIONS", + "normalized": "LAMBDA FUNCTIONS" + }, + { + "original": "ATTRIB-OWNERSHIP", + "normalized": "ATTRIB-OWNERSHIP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ATTRIBUTES", + "normalized": "ATTRIBUTES" + }, + { + "original": "ATTRIBUTES LIST", + "normalized": "ATTRIBUTES LIST" + }, + { + "original": "ATTRIBUTE LIST", + "normalized": "ATTRIBUTE LIST" + }, + { + "original": "ATTRIBUTES2", + "normalized": "ATTRIBUTES2" + }, + { + "original": "ATTRIBUTES3", + "normalized": "ATTRIBUTES3" + }, + { + "original": "ATTRIBUTES4", + "normalized": "ATTRIBUTES4" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "BOOLEAN VALUES", + "normalized": "BOOLEAN VALUES" + }, + { + "original": "BOOLEAN2", + "normalized": "BOOLEAN2" + }, + { + "original": "BOOLEAN3", + "normalized": "BOOLEAN3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CLIENTS", + "normalized": "CLIENTS" + }, + { + "original": "CONTROL", + "normalized": "CONTROL" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "COSTS", + "normalized": "COSTS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "CREDITS", + "normalized": "CREDITS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DATABASE", + "normalized": "DATABASE" + }, + { + "original": "DBREFS", + "normalized": "DBREFS" + }, + { + "original": "DBREF NUMBER", + "normalized": "DBREF NUMBER" + }, + { + "original": "DBREF #", + "normalized": "DBREF #" + }, + { + "original": "DBREF2", + "normalized": "DBREF2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "OBJIDS", + "normalized": "OBJIDS" + }, + { + "original": "OBJECT IDS", + "normalized": "OBJECT IDS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DROP-TOS", + "normalized": "DROP-TOS" + }, + { + "original": "DROPTOS", + "normalized": "DROPTOS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "%#", + "normalized": "%#" + }, + { + "original": "%n", + "normalized": "%N" + }, + { + "original": "%k", + "normalized": "%K" + }, + { + "original": "%~", + "normalized": "%~" + }, + { + "original": "%:", + "normalized": "%:" + }, + { + "original": "ENACTOR", + "normalized": "ENACTOR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "%!", + "normalized": "%!" + }, + { + "original": "EXECUTOR", + "normalized": "EXECUTOR" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "%@", + "normalized": "%@" + }, + { + "original": "CALLER", + "normalized": "CALLER" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EVALUATION ORDER", + "normalized": "EVALUATION ORDER" + }, + { + "original": "EVALUATION2", + "normalized": "EVALUATION2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "FAILURE", + "normalized": "FAILURE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "failure2", + "normalized": "FAILURE2" + }, + { + "original": "GENDER", + "normalized": "GENDER" + }, + { + "original": "SEX", + "normalized": "SEX" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GLOBALS", + "normalized": "GLOBALS" + }, + { + "original": "GLOBAL COMMANDS", + "normalized": "GLOBAL COMMANDS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HERE", + "normalized": "HERE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "HOMES", + "normalized": "HOMES" + }, + { + "original": "HOME", + "normalized": "HOME" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "INTERIORS", + "normalized": "INTERIORS" + }, + { + "original": "INTERIORS2", + "normalized": "INTERIORS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LAST", + "normalized": "LAST" + }, + { + "original": "LASTLOGOUT", + "normalized": "LASTLOGOUT" + }, + { + "original": "LAST", + "normalized": "LAST" + }, + { + "original": "LASTLOGOUT", + "normalized": "LASTLOGOUT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LASTSITE", + "normalized": "LASTSITE" + }, + { + "original": "LASTIP", + "normalized": "LASTIP" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LINKING", + "normalized": "LINKING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LISTENING", + "normalized": "LISTENING" + }, + { + "original": "^-LISTENS", + "normalized": "^-LISTENS" + }, + { + "original": "LISTENING2", + "normalized": "LISTENING2" + }, + { + "original": "LISTENING3", + "normalized": "LISTENING3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LISTS", + "normalized": "LISTS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "LOOPING", + "normalized": "LOOPING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MASTER ROOM", + "normalized": "MASTER ROOM" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ME", + "normalized": "ME" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MONEY", + "normalized": "MONEY" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MONIKERS", + "normalized": "MONIKERS" + }, + { + "original": "MONIKERS2", + "normalized": "MONIKERS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MUSHCODE", + "normalized": "MUSHCODE" + }, + { + "original": "SOFTCODE", + "normalized": "SOFTCODE" + }, + { + "original": "MUSHCODE2", + "normalized": "MUSHCODE2" + }, + { + "original": "NON-STANDARD ATTRIBUTES", + "normalized": "NON-STANDARD ATTRIBUTES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PARENT", + "normalized": "PARENT" + }, + { + "original": "PARENTS", + "normalized": "PARENTS" + }, + { + "original": "OBJECT PARENTS", + "normalized": "OBJECT PARENTS" + }, + { + "original": "PARENTS2", + "normalized": "PARENTS2" + }, + { + "original": "PARENTS3", + "normalized": "PARENTS3" + }, + { + "original": "PARENTS4", + "normalized": "PARENTS4" + }, + { + "original": "PARENTS5", + "normalized": "PARENTS5" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PUPPETS", + "normalized": "PUPPETS" + }, + { + "original": "PUPPETS2", + "normalized": "PUPPETS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "QUEUE", + "normalized": "QUEUE" + }, + { + "original": "QUEUE2", + "normalized": "QUEUE2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "QUOTAS", + "normalized": "QUOTAS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "REGEXP", + "normalized": "REGEXP" + }, + { + "original": "REGEXPS", + "normalized": "REGEXPS" + }, + { + "original": "REGEXPS2", + "normalized": "REGEXPS2" + }, + { + "original": "REGEXP SYNTAX", + "normalized": "REGEXP SYNTAX" + }, + { + "original": "regexp syntax2", + "normalized": "REGEXP SYNTAX2" + }, + { + "original": "regexp syntax3", + "normalized": "REGEXP SYNTAX3" + }, + { + "original": "regexp syntax4", + "normalized": "REGEXP SYNTAX4" + }, + { + "original": "regexp syntax5", + "normalized": "REGEXP SYNTAX5" + }, + { + "original": "regexp syntax6", + "normalized": "REGEXP SYNTAX6" + }, + { + "original": "regexp syntax7", + "normalized": "REGEXP SYNTAX7" + }, + { + "original": "regexp syntax8", + "normalized": "REGEXP SYNTAX8" + }, + { + "original": "REGEXP CLASSES", + "normalized": "REGEXP CLASSES" + }, + { + "original": "REGEXP CLASSES2", + "normalized": "REGEXP CLASSES2" + }, + { + "original": "REGEXP EXAMPLES", + "normalized": "REGEXP EXAMPLES" + }, + { + "original": "REGISTERS", + "normalized": "REGISTERS" + }, + { + "original": "REGISTERS2", + "normalized": "REGISTERS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "RQUOTA", + "normalized": "RQUOTA" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SEMAPHORES", + "normalized": "SEMAPHORES" + }, + { + "original": "SEMAPHORES2", + "normalized": "SEMAPHORES2" + }, + { + "original": "SEMAPHORES3", + "normalized": "SEMAPHORES3" + }, + { + "original": "SEMAPHORES4", + "normalized": "SEMAPHORES4" + }, + { + "original": "SEMAPHORES5", + "normalized": "SEMAPHORES5" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SEMAPHORES6", + "normalized": "SEMAPHORES6" + }, + { + "original": "SETTING-ATTRIBUTES", + "normalized": "SETTING-ATTRIBUTES" + }, + { + "original": "SETTING ATTRIBUTES", + "normalized": "SETTING ATTRIBUTES" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SPOOFING", + "normalized": "SPOOFING" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STACK", + "normalized": "STACK" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "STRINGS", + "normalized": "STRINGS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "%b", + "normalized": "%B" + }, + { + "original": "%t", + "normalized": "%T" + }, + { + "original": "%%", + "normalized": "%%" + }, + { + "original": "SUBSTITUTIONS", + "normalized": "SUBSTITUTIONS" + }, + { + "original": "SUBSTITUTIONS2", + "normalized": "SUBSTITUTIONS2" + }, + { + "original": "%2", + "normalized": "%2" + }, + { + "original": "%v", + "normalized": "%V" + }, + { + "original": "%w", + "normalized": "%W" + }, + { + "original": "%x", + "normalized": "%X" + }, + { + "original": "SUBSTITUTIONS3", + "normalized": "SUBSTITUTIONS3" + }, + { + "original": "%3", + "normalized": "%3" + }, + { + "original": "%L", + "normalized": "%L" + }, + { + "original": "%c", + "normalized": "%C" + }, + { + "original": "%u", + "normalized": "%U" + }, + { + "original": "%?", + "normalized": "%?" + }, + { + "original": "%=", + "normalized": "%=" + }, + { + "original": "%+", + "normalized": "%+" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SUBSTITUTIONS4", + "normalized": "SUBSTITUTIONS4" + }, + { + "original": "%4", + "normalized": "%4" + }, + { + "original": "SUCCESS", + "normalized": "SUCCESS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "SWITCHES", + "normalized": "SWITCHES" + }, + { + "original": "TYPES OF OBJECTS", + "normalized": "TYPES OF OBJECTS" + }, + { + "original": "TYPES", + "normalized": "TYPES" + }, + { + "original": "OBJECTS", + "normalized": "OBJECTS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "PLAYERS", + "normalized": "PLAYERS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ROOMS", + "normalized": "ROOMS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "THINGS", + "normalized": "THINGS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "EXITS", + "normalized": "EXITS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "GARBAGE", + "normalized": "GARBAGE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "$-COMMANDS", + "normalized": "$-COMMANDS" + }, + { + "original": "MACROS", + "normalized": "MACROS" + }, + { + "original": "USER-DEFINED COMMANDS", + "normalized": "USER-DEFINED COMMANDS" + }, + { + "original": "$-COMMANDS2", + "normalized": "$-COMMANDS2" + }, + { + "original": "MACROS2", + "normalized": "MACROS2" + }, + { + "original": "USER-DEFINED2", + "normalized": "USER-DEFINED2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "VERBS", + "normalized": "VERBS" + }, + { + "original": "VERBS2", + "normalized": "VERBS2" + }, + { + "original": "NONAME", + "normalized": "NONAME" + }, + { + "original": "NOSPACE", + "normalized": "NOSPACE" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "WARNINGS", + "normalized": "WARNINGS" + }, + { + "original": "WARNINGS LIST", + "normalized": "WARNINGS LIST" + }, + { + "original": "WARNINGS LIST2", + "normalized": "WARNINGS LIST2" + }, + { + "original": "WILDCARDS", + "normalized": "WILDCARDS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZONE MASTER ROOMS", + "normalized": "ZONE MASTER ROOMS" + }, + { + "original": "ZMRs", + "normalized": "ZMRS" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZONE MASTERS", + "normalized": "ZONE MASTERS" + }, + { + "original": "ZMPs", + "normalized": "ZMPS" + }, + { + "original": "SHARED PLAYERS", + "normalized": "SHARED PLAYERS" + }, + { + "original": "SHARED PLAYERS2", + "normalized": "SHARED PLAYERS2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "ZONES", + "normalized": "ZONES" + }, + { + "original": "ZONE OBJECTS", + "normalized": "ZONE OBJECTS" + }, + { + "original": "ZONE MASTER OBJECTS", + "normalized": "ZONE MASTER OBJECTS" + }, + { + "original": "ZONE MASTER THINGS", + "normalized": "ZONE MASTER THINGS" + }, + { + "original": "ZMOs", + "normalized": "ZMOS" + }, + { + "original": "ZMTs", + "normalized": "ZMTS" + }, + { + "original": "ZONES2", + "normalized": "ZONES2" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "MATCHING", + "normalized": "MATCHING" + }, + { + "original": "&HELP", + "normalized": "&HELP" + }, + { + "original": "RESTRICT", + "normalized": "RESTRICT" + }, + { + "original": "RESTRICT2", + "normalized": "RESTRICT2" + }, + { + "original": "RESTRICT3", + "normalized": "RESTRICT3" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "DESCRIPTOR", + "normalized": "DESCRIPTOR" + }, + { + "original": "PORT", + "normalized": "PORT" + }, + { + "original": "See Also", + "normalized": "SEE ALSO" + }, + { + "original": "UNICODE", + "normalized": "UNICODE" + } + ] + } +} \ No newline at end of file diff --git a/scripts/index-headers.js b/scripts/index-headers.js new file mode 100644 index 0000000..b6e4734 --- /dev/null +++ b/scripts/index-headers.js @@ -0,0 +1,149 @@ +#!/usr/bin/env node + +import fs from 'fs/promises'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const SUBMODULE_DOCS_PATH = path.join(__dirname, '..', 'SharpMUSH-submodule', 'SharpMUSH.Documentation', 'Helpfiles', 'SharpMUSH'); +const OUTPUT_MAPPING_PATH = path.join(__dirname, 'doc-mappings.json'); + +async function extractHeaders(filePath) { + const content = await fs.readFile(filePath, 'utf-8'); + const headers = []; + + // Extract all headers (# and ##) + const headerPattern = /^#+\s+(.+)$/gm; + let match; + + while ((match = headerPattern.exec(content)) !== null) { + const headerText = match[1].trim(); + + // Skip very short headers or ones that look like special markers + if (headerText.length > 1 && !headerText.match(/^[\\\`\-\=\+\*]+$/)) { + headers.push(headerText); + } + } + + return headers; +} + +function normalizeHeaderName(header) { + // Convert header to uppercase and normalize common variations + return header + .toUpperCase() + .trim() + // Handle common patterns + .replace(/^@/, '@') // Preserve @ prefix + .replace(/\(\)$/, '()') // Preserve function parentheses + .replace(/\s+/g, ' '); // Normalize whitespace +} + +function getDocumentKey(filename) { + // Convert filename to document key (remove .md extension) + return filename.replace('.md', ''); +} + +async function indexAllHeaders() { + try { + console.log('Indexing headers from documentation files...'); + console.log(`Source: ${SUBMODULE_DOCS_PATH}`); + + // Ensure source directory exists + try { + await fs.access(SUBMODULE_DOCS_PATH); + } catch { + console.error(`Source directory not found: ${SUBMODULE_DOCS_PATH}`); + console.error('Make sure the git submodule is properly initialized.'); + process.exit(1); + } + + // Get list of markdown files + const files = await fs.readdir(SUBMODULE_DOCS_PATH); + const markdownFiles = files.filter(file => file.endsWith('.md')); + + if (markdownFiles.length === 0) { + console.warn('No markdown files found in source directory'); + return; + } + + const docMappings = {}; + const headerIndex = {}; + + for (const file of markdownFiles) { + const filePath = path.join(SUBMODULE_DOCS_PATH, file); + const docKey = getDocumentKey(file); + + console.log(`Processing ${file}...`); + + try { + const headers = await extractHeaders(filePath); + + console.log(` Found ${headers.length} headers`); + + // Add each header to the mapping + for (const header of headers) { + const normalizedHeader = normalizeHeaderName(header); + + // Store the mapping + docMappings[normalizedHeader] = docKey; + + // Also store in index for analysis + if (!headerIndex[docKey]) { + headerIndex[docKey] = []; + } + headerIndex[docKey].push({ + original: header, + normalized: normalizedHeader + }); + } + + } catch (error) { + console.error(` Error processing ${file}:`, error.message); + } + } + + // Generate comprehensive mappings object + const mappingsData = { + _metadata: { + generatedAt: new Date().toISOString(), + sourceFiles: markdownFiles, + totalMappings: Object.keys(docMappings).length + }, + mappings: docMappings, + index: headerIndex + }; + + // Write the mappings file + await fs.writeFile(OUTPUT_MAPPING_PATH, JSON.stringify(mappingsData, null, 2), 'utf-8'); + + console.log(`\nāœ… Successfully indexed ${Object.keys(docMappings).length} headers`); + console.log(`šŸ“ Mappings saved to: ${OUTPUT_MAPPING_PATH}`); + + // Display summary + console.log('\nšŸ“Š Summary by document:'); + for (const [docKey, headers] of Object.entries(headerIndex)) { + console.log(` ${docKey}: ${headers.length} headers`); + } + + // Show some example mappings + console.log('\nšŸ”— Example mappings:'); + const exampleMappings = Object.entries(docMappings).slice(0, 10); + for (const [header, doc] of exampleMappings) { + console.log(` "${header}" → ${doc}`); + } + + if (Object.keys(docMappings).length > 10) { + console.log(` ... and ${Object.keys(docMappings).length - 10} more`); + } + + } catch (error) { + console.error('āŒ Indexing failed:', error.message); + process.exit(1); + } +} + +// Run the indexing +indexAllHeaders(); \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/pennattr.md b/src/content/docs/reference/sharpmush-help/pennattr.md index 358e8c6..a84f8c1 100644 --- a/src/content/docs/reference/sharpmush-help/pennattr.md +++ b/src/content/docs/reference/sharpmush-help/pennattr.md @@ -1,9 +1,9 @@ --- -title: Attribute Help -description: Helpfiles on SharpMUSH Attributes. +title: "Attributes" +description: "SharpMUSH documentation for Attributes" --- -### ATTRIBUTE FLAGS +## ATTRIBUTE FLAGS Attribute flags are set on an object's attributes using `@set`, or applied to attributes globally using `@attribute`. Their names (and, when applicable, the character used in examine as shorthand for the flag) are shown below. @@ -15,13 +15,13 @@ These attribute flags restrict access, and are inherited down attribute trees (i - `mortal_dark (m)` Attribute cannot be seen by mortals. This flag can only be set by royalty and wizards. "hidden" is a synonym. - `wizard (w)` Attribute can only be set by wizards. This flag can only be set by royalty and wizards. - `veiled (V)` Attribute value won't be shown on default examine, but is still otherwise accessible (for spammy attribs). -- `nearby (n)` Even if the attribute is visual, it can only be retrieved if you're near the object (see **'help nearby()'**). +- `nearby (n)` Even if the attribute is visual, it can only be retrieved if you're near the object (see **[nearby()](/reference/sharpmush-help/pennfunc/#nearby)**). - `locked (+)` Attribute is locked with `@atrlock`. - `safe (S)` Attribute can't be modified without unsetting this flag. -See [attribute flags2](#attribute-flags2) +See [attribute flags2](/reference/sharpmush-help/pennattr/#attribute-flags2) -### ATTRIBUTE FLAGS2 +## ATTRIBUTE FLAGS2 These attribute flags grant access. They are not inherited down attribute trees, and must be set on a branch attribute as well as a leaf to take effect (to make FOO\`BAR visual, FOO must be visual too): @@ -32,14 +32,14 @@ These attribute flags alter the way attributes are used in commands and ^-listen - `debug (b)` Start showing debug output while this attr is evaluated. - `no_debug (B)` Stop showing debug output when this attr is evaluated -- `regexp (R)` Match $-commands and ^-listens using regular expressions. See **'help regexps'** +- `regexp (R)` Match $-commands and ^-listens using regular expressions. See **[regexps](/reference/sharpmush-help/penntop/#regexps)** - `case (C)` Match $-commands and ^-listens case sensitively. -- `nospace (s)` Attribute won't add a space after the object name in @o-* messages. See **'help verbs'** +- `nospace (s)` Attribute won't add a space after the object name in @o-* messages. See **[verbs](/reference/sharpmush-help/penntop/#verbs)** - `noname (N)` Attribute won't show name in @o-* messages. -See [attribute flags3](#attribute-flags3) +See [attribute flags3](/reference/sharpmush-help/pennattr/#attribute-flags3) -### ATTRIBUTE FLAGS3 +## ATTRIBUTE FLAGS3 - `aahear (A)` ^-listens on this attribute match like `@aahear` - `amhear (M)` ^-listens on this attribute match like `@amhear` @@ -47,39 +47,45 @@ See [attribute flags3](#attribute-flags3) - `quiet (Q)` When altering the attribute's value or flags, don't show the usual confirmation message These attribute flags are only used internally. They cannot be set, but seen on 'examine' and flags()/lflags(), tested for with hasflag(), etc: -- `branch (\`)` This attribute is a branch. See: [ATTRIBUTE TREES](#ATTRIBUTE TREES) +- `branch (\`)` This attribute is a branch. See: [ATTRIBUTE TREES](/reference/sharpmush-help/pennattr/#attribute-trees) -#### See Also -- [@set](#@set) -- [@attribute](#@attribute) -- [ATTRIBUTE TREES](#ATTRIBUTE-TREES) +### See Also +- [@set](/reference/sharpmush-help/penncmd/#set) +- [@attribute](/reference/sharpmush-help/penncmd/#attribute) +- [ATTRIBUTE TREES](/reference/sharpmush-help/pennattr/#attribute-trees) -### ATTRIBUTE TREES +## ATTRIBUTE TREES +## ATTR TREES +## ATTRIB TREES +## \` Attributes can be arranged in a hierarchical tree; these are called "attribute trees", and a conceptually similar to the way that files and directories/folders are organized on computer filesystems. Attribute trees can be used to reduce spam when examining and to provide organized control over permissions for related attributes. Attribute trees use the backtick (\`) character to separate their components (much as filesystems use / or \\). For example, the following attribute name would be a couple levels down in its tree: ``` -CHAR\`SKILLS\`PHYSICAL +CHAR`SKILLS`PHYSICAL ``` Attribute names may not start or end with the backtick, and may not contain two backticks in a row. All attributes are either branch attributes or leaf attributes. A branch attribute is an attribute that has other branches or leaves beneath it; a leaf attribute is one that does not. Any attribute may act as a branch. If you try to create an unsupported leaf, branch attributes will be created as needed to support it. -See [attribute trees2](#attribute-trees2) for more information and examples. +See [attribute trees2](/reference/sharpmush-help/pennattr/#attribute-trees2) for more information and examples. -### ATTRIBUTE TREES2 +## ATTRIBUTE TREES2 +## ATTR TREES2 +## ATTRIB TREES2 +## \`2 Attribute trees provide two immediate benefits. First, they reduce spam when examining objects. The usual * and ? wildcards for attributes do not match the \` character; the new ** wildcard does. Some examples of using examine: ``` examine obj displays top-level attributes (plus object header) examine obj/* displays top-level attributes -examine obj/BRANCH\` displays only attributes immediately under BRANCH -examine obj/BRANCH\`* displays only attributes immediately under BRANCH -examine obj/BRANCH\`** displays entire tree under BRANCH +examine obj/BRANCH` displays only attributes immediately under BRANCH +examine obj/BRANCH`* displays only attributes immediately under BRANCH +examine obj/BRANCH`** displays entire tree under BRANCH examine obj/** displays all attributes of object ``` @@ -87,12 +93,15 @@ The same principles apply to lattr(). `@decompile obj` is a special case, and di Branch attributes will be displayed with a \` in the attribute flags on examine. -See [attribute trees3](#attribute-trees3) for more information and examples. +See [attribute trees3](/reference/sharpmush-help/pennattr/#attribute-trees3) for more information and examples. -#### See Also -- [WILDCARDS](#WILDCARDS) +### See Also +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) -### ATTRIBUTE TREES3 +## ATTRIBUTE TREES3 +## ATTR TREES3 +## ATTRIB TREES3 +## \`3 The second benefit of attributes trees is convenient access control. Attribute flags that restrict attribute access or execution (no_inherit, no_command, mortal_dark, wizard) propagate down attribute trees, so if a branch is set mortal_dark, mortals can not read any of its leaves or subbranches either. @@ -102,7 +111,7 @@ These properties make attribute trees ideal for data attributes: ``` > &DATA bank = Data for each depositor is stored here, by dbref > @set bank/DATA = no_command -> &DATA\`#30 bank = $2000 savings:$1000 loan @ 5% +> &DATA`#30 bank = $2000 savings:$1000 loan @ 5% ``` etc. @@ -110,13 +119,16 @@ They're also handy for things like character attributes: ``` > @attribute/access CHAR = wizard mortal_dark no_clone no_inherit > &CHAR #30 = Character data -> &CHAR\`SKILLS #30 = coding:3 documentation:1 obfuscation:5 +> &CHAR`SKILLS #30 = coding:3 documentation:1 obfuscation:5 ``` etc. -See [attribute trees4](#attribute-trees4) for information about `@parent` and attribute trees. +See [attribute trees4](/reference/sharpmush-help/pennattr/#attribute-trees4) for information about `@parent` and attribute trees. -### ATTRIBUTE TREES4 +## ATTRIBUTE TREES4 +## ATTR TREES4 +## ATTRIB TREES4 +## \`4 Attribute trees interact with `@parent` in several ways. @@ -124,8 +136,8 @@ As usual, children inherit attributes from their parent unless the child has its ``` > &BRANCH parent = a branch -> &BRANCH\`LEAF parent = a leaf -> &BRANCH\`LEAF child = a new leaf +> &BRANCH`LEAF parent = a leaf +> &BRANCH`LEAF child = a new leaf ``` In this case, a new BRANCH attribute will be created on the child, so '-[get(child/BRANCH)]-' will return '--'. This may not be what you actually want. In these cases, the pfun() function can be useful: diff --git a/src/content/docs/reference/sharpmush-help/pennchat.md b/src/content/docs/reference/sharpmush-help/pennchat.md index 6a4d3fe..80eedda 100644 --- a/src/content/docs/reference/sharpmush-help/pennchat.md +++ b/src/content/docs/reference/sharpmush-help/pennchat.md @@ -1,9 +1,12 @@ --- -title: Chat Help -description: Helpfiles on SharpMUSH Chat. +title: "Chat and Channels" +description: "SharpMUSH documentation for Chat and Channels" --- ## CHAT +## CHAT SYSTEM +## comsys +## CHANNELS SharpMUSH has a built-in chat system which allows you to speak to other players who are on the same channel without needing to be in the same room as them. It supports a large number of channels which can be customized and restricted in various ways. @@ -13,21 +16,22 @@ You can list, join, and configure channels using the `@channel` command. To speak on channels, use the `@chat` command. -There are some aliases in place for players more familiar with the MUX comsys - see [muxcomsys](#muxcomsys) for more details. +There are some aliases in place for players more familiar with the MUX comsys - see [muxcomsys](/reference/sharpmush-help/pennchat/#muxcomsys) for more details. ### See Also -- [@channel](#@channel) -- [@chat](#@chat) -- [@cemit](#@cemit) -- [channel functions](#channel-functions) -- [CHAN_USEFIRSTMATCH](#CHAN_USEFIRSTMATCH) -- [@chatformat](#@chatformat) -- [@clock](#@clock) +- [@channel](/reference/sharpmush-help/pennchat/#channel) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) +- [channel functions](/reference/sharpmush-help/pennchat/#channel-functions) +- [CHAN_USEFIRSTMATCH](/reference/sharpmush-help/pennchat/#chanusefirstmatch) +- [@chatformat](/reference/sharpmush-help/pennchat/#chatformat) +- [@clock](/reference/sharpmush-help/pennchat/#clock) ## @chat +## + -`@chat =` -`+ ` +- `@chat =` +- `+ ` The `@chat` command is used to speak on channels. Everyone on the channel will see your message, and it will be added to the channel's recall buffer, if it has one. If ** begins with a ':' or ';' it will be posed (or semiposed) instead of spoken. You will usually need to join a channel before you can speak on it. @@ -42,8 +46,8 @@ The `@chat` command is used to speak on channels. Everyone on the channel will s ``` ### See Also -- [@channel](#@channel) -- [@cemit](#@cemit) +- [@channel](/reference/sharpmush-help/pennchat/#channel) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) ## @CHATFORMAT @@ -67,11 +71,11 @@ The chatformat attribute is evaluated when an object receives a channel message. If the channel is NO_NAME, and the speaker either has no title or the channel is also set NO_TITLE, then %3 will be "Someone". ### See Also -- [@chat](#@chat) -- [@pageformat](#@pageformat) -- [@message](#@message) -- [speak()](#speak()) -- [mogrify](#mogrify) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [@pageformat](/reference/sharpmush-help/penncmd/#pageformat) +- [@message](/reference/sharpmush-help/penncmd/#message) +- [speak()](/reference/sharpmush-help/pennfunc/#speak) +- [mogrify](/reference/sharpmush-help/pennconf/#mogrify) ## @CHATFORMAT2 @@ -91,7 +95,7 @@ Suppose you want it just like the old version, but anytime somebody says your na @chatformat me=ansi(switch(%2,*[name(%!)]*,r,n),%5) ``` -See [@chatformat3](#@chatformat3) for more examples. +See [@chatformat3](/reference/sharpmush-help/pennchat/#chatformat3) for more examples. ## @CHATFORMAT3 @@ -125,11 +129,14 @@ or Normally, when an object attempts to speak on the channel system with @chat, using an ambiguous channel name produces an error message. With this flag set, it will instead speak on the first channel whose name is a match. Other commands in the chat system are not affected by the flag. ### See Also -- [CHAT](#CHAT) -- [@chat](#@chat) -- [@cemit](#@cemit) +- [CHAT](/reference/sharpmush-help/pennchat/#chat) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) -## @cemit +## @CEMIT +## @NSCEMIT +## CEMIT() +## NSCEMIT() - `@cemit[/noisy|/silent][/noeval] =` - `@nscemit[/noisy|/silent][/noeval] =` @@ -147,25 +154,32 @@ cemit() and nscemit() work the same as @cemit/silent and @nscemit/silent, respec @cemit is intended for use in writing extended chat systems. ### See Also -- [@chat](#@chat) +- [@chat](/reference/sharpmush-help/pennchat/#chat) ## @channel The `@channel` command is used to add, join, list and modify channels in the chat system. It takes many different switches. -Help for `@channel` is split into a number of topics. Please see [@channel](#@channel) for more, where ** is one of the words below. For help on a specific switch to `@channel`, use [@channel](#@channel). +Help for `@channel` is split into a number of topics. Please see [@channel ](/reference/sharpmush-help/penncmd/#channel-topic) for more, where ** is one of the words below. For help on a specific switch to `@channel`, use [@channel/]. - **Joining** - How to find, join, and leave channels - **Other** - Setting channel titles, recalling previous chat messages - **Admin** - Adding, deleting and modifying channels ### See Also -- [CHAT](#CHAT) -- [@chat](#@chat) -- [@cemit](#@cemit) -- [channel functions](#channel-functions) +- [CHAT](/reference/sharpmush-help/pennchat/#chat) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) +- [channel functions](/reference/sharpmush-help/pennchat/#channel-functions) ## @CHANNEL JOINING +## @channel/list +## @channel/what +## @channel/who +## @channel/on +## @channel/join +## @channel/off +## @channel/leave - `@channel/list[/on|/off][/quiet] []` - `@channel/what []` @@ -173,7 +187,7 @@ Help for `@channel` is split into a number of topics. Please see [@channel](#@ch - `@channel/on [=]` - `@channel/off [=]` -`@channel/list` shows a list of all the channels you can see, along with some basic information such as whether you are on the channel, how it's locked, etc. [@channel list](#@channel list) explains the output in detail. If a ** is given, only channels whose names begin with ** are shown. If the /on switch is given, only channels you've joined are shown. If /off is given, channels you are on will not be shown. The /quiet switch shows just a list of channel names, without any extra information. +`@channel/list` shows a list of all the channels you can see, along with some basic information such as whether you are on the channel, how it's locked, etc. [@channel list](/reference/sharpmush-help/pennchat/#channel-list) explains the output in detail. If a ** is given, only channels whose names begin with ** are shown. If the /on switch is given, only channels you've joined are shown. If /off is given, channels you are on will not be shown. The /quiet switch shows just a list of channel names, without any extra information. `@channel/what` shows the name, description, owner, priv flags, mogrifier and buffer size for all channels, or all channels whose names begin with ** if one is given. @@ -182,6 +196,13 @@ Help for `@channel` is split into a number of topics. Please see [@channel](#@ch `@channel/on` and `@channel/off` add or remove you from the given **. You only hear messages for channels you're on, and most channels require you to join them before you can speak on them. /join and /leave are aliases for /on and /off. ## @CHANNEL JOINING2 +## @channel/gag +## @channel/ungag +## @channel/hide +## @channel/unhide +## @channel/mute +## @channel/combine +## @channel/uncombine - `@channel/gag [][=]` - `@channel/mute [][=]` @@ -199,14 +220,17 @@ Connect and disconnect messages across all channels you have marked with `@chann For all four of these commands, you can specify a single channel to affect, or omit ** to affect all channels you're on. To undo the gag/mute/hide, either use `@channel/ []=no` or `@channel/un []`. ### See Also -- [@channel/who](#@channel/who) -- [cstatus()](#cstatus()) -- [cowner()](#cowner()) -- [cflags()](#cflags()) -- [channels()](#channels()) -- [@channel/privs](#@channel/privs) +- [@channel/who] +- [cstatus()](/reference/sharpmush-help/pennchat/#cstatus) +- [cowner()](/reference/sharpmush-help/pennchat/#cowner) +- [cflags()](/reference/sharpmush-help/pennchat/#cflags) +- [channels()](/reference/sharpmush-help/pennchat/#channels) +- [@channel/privs] ## @CHANNEL OTHER +## @channel/recall +## @channel/title +## @channel/buffer - `@channel/recall[/last] [=]` - `@channel/title =` @@ -214,15 +238,24 @@ For all four of these commands, you can specify a single channel to affect, or o `@channel/recall` displays the last *<count>* messages sent on *<channel>*. If *<count>* is not given, it shows the last 10. The /last switch shows messages starting from the *<count>*th most recent message. -`@channel/title` sets your title on *<channel>*. Your title appears in front of your name when you speak on the channel, if the channel is set to show titles. If *\<title\>* is not given, your title is cleared. +`@channel/title` sets your title on *<channel>*. Your title appears in front of your name when you speak on the channel, if the channel is set to show titles. If *<title>* is not given, your title is cleared. `@channel/buffer` sets the recall buffer size for *<channel>* to *<size>*. Only channel admins can do this. A size of 0 disables the recall buffer. ### See Also -- [@channel/who](#@channel/who) -- [@channel/privs](#@channel/privs) +- [@channel/who] +- [@channel/privs] ## @CHANNEL ADMIN +## @channel/add +## @channel/delete +## @channel/mogrifier +## @channel/chown +## @channel/name +## @channel/desc +## @channel/privs +## @channel/wipe +## @channel/clock - `@channel/add <channel>[=<description>]` - `@channel/delete <channel>` @@ -238,7 +271,7 @@ For all four of these commands, you can specify a single channel to affect, or o `@channel/delete` removes a channel. Only channel admins can do this. -`@channel/mogrifier` sets an object to be the channel's mogrifier. Only channel admins can do this. See [mogrifier](#mogrifier) for details. +`@channel/mogrifier` sets an object to be the channel's mogrifier. Only channel admins can do this. See [mogrifier](/reference/sharpmush-help/pennconf/#mogrifier) for details. `@channel/chown` changes the owner of a channel. Only channel admins can do this. @@ -246,16 +279,16 @@ For all four of these commands, you can specify a single channel to affect, or o `@channel/desc` changes a channel's description. Only channel admins can do this. -`@channel/privs` changes a channel's privileges. Only channel admins can do this. See [@channel privs](#@channel privs) for details. +`@channel/privs` changes a channel's privileges. Only channel admins can do this. See [@channel privs](/reference/sharpmush-help/pennchat/#channel-privs) for details. `@channel/wipe` removes all players from a channel. Only channel admins can do this. -`@channel/clock` manages channel locks. Only channel admins can do this. See [@channel clock](#@channel clock) for details. +`@channel/clock` manages channel locks. Only channel admins can do this. See [@channel clock](/reference/sharpmush-help/pennchat/#channel-clock) for details. ### See Also -- [@channel/who](#@channel/who) -- [@channel/privs](#@channel/privs) -- [@clock](#@clock) +- [@channel/who] +- [@channel/privs] +- [@clock](/reference/sharpmush-help/pennchat/#clock) ## @CHANNEL LIST @@ -280,9 +313,9 @@ The Lock column shows: - `(DISABLED)` if the channel is disabled ### See Also -- [@channel/who](#@channel/who) -- [@channel/privs](#@channel/privs) -- [@clock](#@clock) +- [@channel/who] +- [@channel/privs] +- [@clock](/reference/sharpmush-help/pennchat/#clock) ## @CHANNEL PRIVS @@ -305,11 +338,12 @@ Available privileges: ``` ### See Also -- [@channel/who](#@channel/who) -- [@channel clock](#@channel clock) -- [@clock](#@clock) +- [@channel/who] +- [@channel clock](/reference/sharpmush-help/pennchat/#channel-clock) +- [@clock](/reference/sharpmush-help/pennchat/#clock) ## @CHANNEL CLOCK +## @clock `@channel/clock[/switch] <channel>[=<lock>]` @@ -336,18 +370,24 @@ Only channel admins can set locks. Players must pass: ``` ### See Also -- [@lock](#@lock) -- [locks](#locks) -- [@channel privs](#@channel privs) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locks](/reference/sharpmush-help/penncmd/#locks) +- [@channel privs](/reference/sharpmush-help/pennchat/#channel-privs) ## CHANNEL FUNCTIONS - -- `channels([<player>][,<type>])` -- `cowner(<channel>)` -- `cflags(<channel>[,<player>])` -- `cstatus([<player>][,<channel>])` -- `cemit(<channel>,<message>[,<noisy>])` -- `nscemit(<channel>,<message>[,<noisy>])` +## CHANNELS() +## COWNER() +## CFLAGS() +## CSTATUS() +## CEMIT() +## NSCEMIT() + +`channels([<player>][,<type>])` +`cowner(<channel>)` +`cflags(<channel>[,<player>])` +`cstatus([<player>][,<channel>])` +`cemit(<channel>,<message>[,<noisy>])` +`nscemit(<channel>,<message>[,<noisy>])` These functions provide information about channels: @@ -370,14 +410,14 @@ These functions provide information about channels: - With both: Their status on that channel Status is one of: OFF ON GAG HIDE MUTE COMBINE -- **cemit()** and **nscemit()**: Emit *<message>* on *<channel>*. See [@cemit](#@cemit). +- **cemit()** and **nscemit()**: Emit *<message>* on *<channel>*. See [@cemit](/reference/sharpmush-help/pennchat/#cemit). ### Examples ``` > think channels(#123,on) Public Admin > think cowner(Public) -##1 +#1 > think cflags(Public) OPEN > think cflags(Public,#123) @@ -387,9 +427,9 @@ ON COMBINE ``` ### See Also -- [@channel](#@channel) -- [@chat](#@chat) -- [@cemit](#@cemit) +- [@channel](/reference/sharpmush-help/pennchat/#channel) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) ## MUXCOMSYS @@ -406,6 +446,6 @@ SharpMUSH provides some aliases for players more familiar with the MUX comsys: Note that SharpMUSH does not actually support channel aliases - the above commands work by looking up the real channel name. You must use enough of the channel name to uniquely identify it. ### See Also -- [@channel](#@channel) -- [@chat](#@chat) -- [CHAN_USEFIRSTMATCH](#CHAN_USEFIRSTMATCH) \ No newline at end of file +- [@channel](/reference/sharpmush-help/pennchat/#channel) +- [@chat](/reference/sharpmush-help/pennchat/#chat) +- [CHAN_USEFIRSTMATCH](/reference/sharpmush-help/pennchat/#chanusefirstmatch) \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/penncmd.md b/src/content/docs/reference/sharpmush-help/penncmd.md new file mode 100644 index 0000000..3404705 --- /dev/null +++ b/src/content/docs/reference/sharpmush-help/penncmd.md @@ -0,0 +1,5066 @@ +--- +title: "Commands" +description: "SharpMUSH documentation for Commands" +--- + +## COMMANDS +Help is available for the following MUSH commands: + +- ahelp +- anews +- brief +- DOING +- drop +- examine +- enter +- events +- follow +- get +- give +- go +- index +- leave +- LOGOUT +- look +- move +- news +- page +- pose +- QUIT +- read +- rules +- say +- score +- teach +- think +- unfollow +- use +- whisper +- WHO +- with +- " +- : +- ; +- + +- ] + +In addition to these, there are several types of '@' commands. @-commands are usually commands which have permanent effects on the MUSH (such as creating a new object). Here are the help topics on @-commands: + +- @-ATTRIBUTES +- @-BUILDING +- @-GENERAL +- @-WIZARD + +Commands that can only be used by connected players are listed in HELP SOCKET COMMANDS. +## @-ATTRIBUTES +These '@' commands set standard message/action sets on objects. Each comes in 3 versions: `@<whatever>`, `@o<whatever>`, and `@a<whatever>`. Only the `@<whatever>` version is listed below, but help is available for each: + +- @describe +- @drop +- @efail +- @enter +- @failure +- @follow +- @give +- @idescribe +- @leave +- @lfail +- @move +- @payment +- @receive +- @success +- @tport +- @ufail +- @unfollow +- @use +- @zenter +- @zleave + +These '@' command set other standard attributes on objects that don't follow the pattern above: + +- @aahear +- @aclone +- @aconnect +- @adisconnect +- @amail +- @amhear +- @away +- @charges +- @conformat +- @cost +- @descformat +- @ealias +- @exitformat +- @filter +- @forwardlist +- @haven +- @idescformat +- @idle +- @infilter +- @inprefix +- @lalias +- @listen +- @nameformat +- @oxenter +- @oxleave +- @oxmove +- @oxtport +- @prefix +- @runout +- @sex +- @startup + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) + +## @-BUILDING +These '@' commands are building-related (they create or modify objects): + +- @atrlock +- @atrchown +- @chown +- @chzone +- @clone +- @cpattr +- @create +- @destroy +- @dig +- @elock +- @eunlock +- @firstexit +- @link +- @lock +- @moniker +- @mvattr +- @name +- @nuke +- @open +- @parent +- @recycle +- @set +- @undestroy +- @ulock +- @unlink +- @unlock +- @uunlock +- @wipe + +## @-GENERAL +These '@' commands are general utility and programming commands: + +- @@ +- @alias +- @break +- @channel +- @chat +- @cemit +- @command +- @config +- @decompile +- @doing +- @dolist +- @drain +- @edit +- @emit +- @entrances +- @find +- @force +- @function +- @gedit +- @grep +- @halt +- @if +- @lemit +- @listmotd +- @mail +- @notify +- @nsemit +- @nslemit +- @nsoemit +- @nspemit +- @nsprompt +- @nsremit +- @nszemit +- @oemit +- @password +- @pemit +- @prompt +- @ps +- @remit +- @restart +- @scan +- @search +- @select +- @stats +- @sweep +- @switch +- @teleport +- @trigger +- @verb +- @version +- @wait +- @whereis +- @zemit + +## @-WIZARD +These '@' commands are only usable by wizards or privileged players: + +- @allhalt +- @allquota +- @boot +- @chownall +- @chzoneall +- @comment +- @dbck +- @disable +- @dump +- @enable +- @flag +- @hide +- @hook +- @http +- @kick +- @log +- @motd +- @newpassword +- @pcreate +- @poll +- @poor +- @power +- @purge +- @quota +- @readcache +- @respond +- @rejectmotd +- @shutdown +- @sitelock +- @sql +- @squota +- @suggest +- @uptime +- @wall +- @wizmotd +- @wizwall +- cd +- ch +- cv + +## ] +"]" is a special prefix which can be used before any command. It instructs the MUSH that it shouldn't evaluate the arguments to the command (similar to the "/noeval" switch available on some commands). For example: + +``` +> say [add(1,1)] +You say, "2" +``` + +``` +> say \[add(1,1)\] +You say, "[add(1,1)]" +``` + +``` +> ]say [add(1,1)] +You say, "[add(1,1)]" +``` + +``` +> ]"[add(1,1)] +You say, "[add(1,1)]" +``` + +This can be used to pass unevaluated MUSHcode to softcoded commands without having to escape every special character, or to help objects set attributes to contain unevaluated code. + +See []2] for more examples. + + +### See Also +- [lit()](/reference/sharpmush-help/pennfunc/#lit) +- [decompose()](/reference/sharpmush-help/pennfunc/#decompose) +- [escape()](/reference/sharpmush-help/pennfunc/#escape) +- [@command](/reference/sharpmush-help/penncmd/#command) +- [}] +## ]2 +Using ']' with $-commands: + +``` +> &test Tester=$test *: @pemit %#=I got: %0 +``` + +Normal evaluation: +``` +> test My name is %n. +I got: My name is Wiggles. +``` + +Preventing the user input from being evaluated: +``` +> ]test My name is %n. +I got: My name is %n. +``` + +Preventing evaluation of code inside the $-command: +``` +> &test Tester=$test *: ]@pemit %#=I got: %0 +> test My name is %n. +I got: %0 +``` + +In the last example, '%0' would evaluate to 'My name is Wiggles.' (because the string entered by the user was evaluated), but the @pemit has been told not to evaluate its arguments. +## } +"}" is a special prefix which can be used before any command. It causes the MUSH to show debug information when evaluating that command (the same as if you had the DEBUG flag set), and for any $-commands which are triggered by the command. + +In order for debug to be shown for triggered $-commands, you must either control the object(s) the matching $-commands are on, or be in the object's DEBUGFORWARDLIST attribute. + + +### See Also +- [DEBUG](/reference/sharpmush-help/pennflag/#debug) +- [] +## @@ +`@@ [<text>]` + +The "@@" command does nothing; it does not evaluate its input or show any messages to the executor. It can be used for commenting code. + +Example: +``` +> @va me=$testing: @emit Test ; @@ Just a test ; @vb me=Testing +``` + + +### See Also +- [@@()] +- [null()](/reference/sharpmush-help/pennfunc/#null) +## @aclone +`@aclone <object>=<action list>` + +Sets the actions to be taken by `<object>` whenever it's @cloned. This command can be useful for notifying the owner of a vending machine or parent object when someone uses the machine. + +Please note that there are no @clone or @oclone attributes. + + +### See Also +- [@clone](/reference/sharpmush-help/penncmd/#clone) +- [@create](/reference/sharpmush-help/penncmd/#create) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +## @aconnect +`@aconnect <object>=<action list>` + +Sets the actions to be taken by `<object>` when a player connects to the game. @aconnects are triggered on connecting players, their locations (if the room_connects @config option is true), their zone object/objects in their zone master room, and objects in the Master Room. + +Note that long and spammy @aconnect messages, whether in your room or on a channel, are frequently found annoying by other players. + +One argument is passed to @aconnect: +%1 = number of player connections (1 if this is an initial connect) + +Example: +``` +> @aconnect me=+who ; +bbscan +``` + + +### See Also +- [@adisconnect](/reference/sharpmush-help/penncmd/#adisconnect) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [EVENTS](/reference/sharpmush-help/pennevents/#events) +## @amail +`@amail <object>=<action list>` + +Sets the actions to be taken by `<object>` whenever it receives @mail. Admin-only, and is only triggered if enabled via the amail configuration option. + + +### See Also +- [@mail](/reference/sharpmush-help/pennmail/#mail) +## @adescribe +## @odescribe +`@odescribe <object>[=<message>]` +`@adescribe <object>[=<action list>]` + +These attributes contain the message shown to others in the enactor's location when he looks at `<object>`, and the actions to be taken by `<object>` when someone looks at it. (See [@describe](/reference/sharpmush-help/penncmd/#describe) for the attribute shown to the enactor when he looks at `<object>`.) When the enactor is inside `<object>`, the @oidescribe and @aidescribe attributes will be used instead, if set. Please note that using these attributes to show long messages is often found annoying. + +Examples: +``` +> @odescribe Walker=glances at Walker and sniggers. +> @adescribe me=think %n just looked at you. +``` + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@describe](/reference/sharpmush-help/penncmd/#describe) +- [@idescribe](/reference/sharpmush-help/penncmd/#idescribe) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +## @adestroy +`@adestroy <object>[=<action list>]` + +The adestroy attribute is triggered when `<object>` is @destroyed. It can only be set by wizards. Because the attribute is triggered when `<object>` is @destroyed, not when the object is actually purged from the database, it's possible for `<object>` to be @undestroyed after the adestroy has run. + +Please note that there are no destroy or odestroy attributes. + + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) +- [@undestroy](/reference/sharpmush-help/penncmd/#undestroy) +- [EVENTS](/reference/sharpmush-help/pennevents/#events) +## @adisconnect +`@adisconnect <object>[=<action list>]` + +Sets the actions to be taken by `<object>` when a player disconnects from the game. @adisconnects are triggered on disconnecting players, their locations (if the room_connects @config option is true), their zone object/objects in their zone master room, and objects in the Master Room. + +Several arguments are passed to @adisconnect: +%1 = number of remaining connections (0 if a full disconnect) +%2 = bytes received by the disconnecting descriptor +%3 = bytes sent by the disconnecting descriptor +%4 = commands issued by the disconnecting descriptor +%5 = 1 if the descriptor was hidden on disconnect, 0 otherwise + +Example: +``` +> @adisconnect me = home +``` + + +### See Also +- [@aconnect](/reference/sharpmush-help/penncmd/#aconnect) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [recv()](/reference/sharpmush-help/pennfunc/#recv) +- [sent()](/reference/sharpmush-help/pennfunc/#sent) +- [cmds()](/reference/sharpmush-help/pennfunc/#cmds) +- [EVENTS](/reference/sharpmush-help/pennevents/#events) +## @adrop +## @odrop +## @drop +`@drop <object>[=<message>]` +`@odrop <object>[=<message>]` +`@adrop <object>[=<action list>]` + +When `<object>` is a player or thing, the @drop attribute is shown to whoever drops `<object>`, and @odrop to others in the location `<object>` is dropped in. The @adrop attribute is triggered when `<object>` is dropped. + +When `<object>` is an exit, @drop is shown to objects going through `<object>`, and @odrop is shown to objects in the exit's destination. @adrop is triggered when someone passes through the exit. + +Example: +``` +> @drop Box=You put the box down gently. +> @odrop Box=puts the box down gently. +``` + +``` +> @odrop South=arrives from the North. +``` + + +### See Also +- [drop](/reference/sharpmush-help/penncmd/#drop) +- [empty](/reference/sharpmush-help/penncmd/#empty) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [@success](/reference/sharpmush-help/penncmd/#success) +## @aefail +## @oefail +## @efail +`@efail <object>[=<message>]` +`@oefail <object>[=<message>]` +`@aefail <object>[=<action list>]` + +These attributes contain the message shown to someone who fails to enter `<object>`, the message shown to others when someone fails to enter `<object>`, and the actions to be taken when someone fails to enter it, respectively. + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [@enter](/reference/sharpmush-help/penncmd/#enter) +- [FAILURE](/reference/sharpmush-help/penntop/#failure) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @aufail +## @oufail +## @ufail +`@ufail <object>=[<message>]` +`@oufail <object>=[<message>]` +`@aufail <object>=[<action list>]` + +Sets the message shown to a player who fails to use an object via the 'use' command (because they don't pass the @lock/use), the message shown to others in the room when a player fails to use `<object>`, and the actions to be taken by `<object>` when someone fails to use it, respectively. + +Note that these attributes are @ufail, NOT @ufailure, for TinyMUSH compatibility. + +Although the Use @lock also restricts who can trigger $-commands or ^-listens on an object, these attributes will not be triggered for those failures. Instead, the COMMAND_LOCK`* and LISTEN_LOCK`* attributes are triggered. See [failure](/reference/sharpmush-help/penntop/#failure) for more information. + + +### See Also +- [use](/reference/sharpmush-help/penncmd/#use) +- [@use](/reference/sharpmush-help/penncmd/#use) +- [FAILURE](/reference/sharpmush-help/penntop/#failure) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @afailure +## @ofailure +## @failure +`@failure <object>[=<message>]` +`@ofailure <object>[=<message>]` +`@afailure <object>[=<action list>]` + +@failure contains the message shown to someone who fails to pass `<object>`'s Basic @lock. @ofailure contains the message shown to others, and @afailure contains the actions to be taken by `<object>`. + +For players and things, this means failure to get/take. For exits, it means failure to go through the exit. For rooms the lock is checked when objects "look" inside the room, though failure to pass the lock does not prevent the object from looking. + + +### See Also +- [get](/reference/sharpmush-help/penncmd/#get) +- [move](/reference/sharpmush-help/penncmd/#move) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [@success](/reference/sharpmush-help/penncmd/#success) +## @follow +## @ofollow +## @afollow +`@follow <object>[=<message>]` +`@ofollow <object>[=<message>]` +`@afollow <object>[=<action list>]` + +Sets the message shown to someone who begins following `<object>`, the message shown to others in the room, and the actions to be taken by `<object>` when someone begins following it, respectively. The name of the person following `<object>` is automatically prepended to the @ofollow message. + + +### See Also +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [@unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @unfollow +## @ounfollow +## @aunfollow +`@unfollow <object>[=<message>]` +`@ounfollow <object>[=<message>]` +`@aunfollow <object>[=<action list>]` + +Sets the message shown to someone who stops following `<object>`, the message shown to others in the room, and the actions to be taken by `<object>` when someone stops following it, respectively. The name of the person stopping following `<object>` is automatically prepended to the @ounfollow message. + + +### See Also +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [@follow](/reference/sharpmush-help/penncmd/#follow) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @ahear +## @amhear +## @aahear +`@ahear <object>[=<action list>]` +`@amhear <object>[=<action list>]` +`@aahear <object>[=<action list>]` + +Sets the actions to be taken after the object's @listen is matched. @ahear will only be triggered by sound made by other objects, and @amhear is only triggered by sound made by `<object>` itself. @aahear will be triggered by all matching sound, regardless of the source. + + +### See Also +- [@listen](/reference/sharpmush-help/penncmd/#listen) +- [LISTENING](/reference/sharpmush-help/penntop/#listening) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +## @leave +## @oleave +## @oxleave +## @aleave +`@leave <object>[=<message>]` +`@oleave <object>[=<message>]` +`@oxleave <object>[=<message>]` +`@aleave <object>[=<action list>]` + +These attributes contain the message shown to anyone leaving `<object>`, the message shown to others inside `<object>` when someone leaves it, the message shown to others in `<object>`'s location when someone leaves it, and the actions to be taken by `<object>` when someone leaves it, respectively. + +The leaver's new location is passed in %0, if `<object>` has permission to see it there. + + +### See Also +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [@oxleave](/reference/sharpmush-help/penncmd/#oxleave) +- [@lfail](/reference/sharpmush-help/penncmd/#lfail) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @lfail +## @olfail +## @alfail +`@lfail <object>[=<message>]` +`@olfail <object>[=<message>]` +`@alfail <object>[=<action list>]` + +These attributes contain the message shown to objects who try to leave `<object>` and fail, the message shown to others inside `<object>` when someone fails to leave, and the actions to be taken by `<object>` when someone attempts to leave it and fails. + +Such a failure usually occurs because `<object>` is set NO_LEAVE, or because the person trying to leave does not pass `<object>`'s @lock/leave. + + +### See Also +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [@leave](/reference/sharpmush-help/penncmd/#leave) +- [NO_LEAVE](/reference/sharpmush-help/pennconf/#noleave) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @alias +`@alias <player>[=<name1>[;<name2>[;...;<nameN>]]]` +`@alias <object>[=<string>]` + +For players and exits, the ALIAS attribute has special meaning: it contains a list of aliases (separated by semicolons) which can be used instead of its name to refer to the player or exit. + +Players can only have a limited number of aliases; the number is controlled by the 'max_aliases' @config option. The same rules which apply to player names also apply to aliases, and you cannot use another player's name as your alias (though you can include your own name in your aliases, and can change your name to one of your aliases). + +If the 'page_aliases' @config option is on, the first alias in the list is shown along with the player's name when they page others. + +Exit aliases used to be a part of their name, though all newly created exits use @alias instead. + +For other types of object, @alias has no special meaning. + + +### See Also +- [@name](/reference/sharpmush-help/penncmd/#name) +- [alias()](/reference/sharpmush-help/pennfunc/#alias) +- [fullalias()](/reference/sharpmush-help/pennfunc/#fullalias) +## @move +## @omove +## @oxmove +## @amove +`@move <object>[=<message>]` +`@omove <object>[=<message>]` +`@oxmove <object>[=<message>]` +`@amove <object>[=<action list>]` + +These attributes contain the message shown to `<object>` immediately after it moves, the message shown to others in the room `<object>` moves into, the message shown to objects in the location `<object>` leaves, and the actions to be taken when `<object>` moves, respectively. Please note that long @omoves are frequently found annoying. + +The `<object>`'s new location is in %0 and the old location it moved from in %1. + +Example: +``` +> @move me=You moved! You are now in the room: [name(here)]. +> @omove me=stalks into the room wearing a malevolent expression. +> @oxmove me=stalks away, glaring. +``` + + +### See Also +- [goto](/reference/sharpmush-help/penncmd/#goto) +- [@oxmove](/reference/sharpmush-help/penncmd/#oxmove) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @aenter +## @enter +## @oenter +## @oxenter +`@enter <object>[=<message>]` +`@oenter <object>[=<message>]` +`@oxenter <object>[=<message>]` +`@aenter <object>[=<action list>]` + +These attributes contain the messages shown to someone who enters `<object>`, the message shown to others inside `<object>` when someone enters it, the message shown to those in `<object>`'s location when someone enters it, and the actions to be taken by `<object>` when someone enters it, respectively. + +The old location of the entering object is passed in %0, if `<object>` had permission to see it there. + +Example: +``` +> @enter Sofa=You sit on the comfy sofa. +> @oenter Sofa=sits with you on the sofa. +> @oxenter Sofa=sits down on the sofa. It looks comfy. +> @aenter Sofa=@pemit/silent owner(me)=%n sat down on [name(me)]! +``` + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [@ealias](/reference/sharpmush-help/penncmd/#ealias) +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @apayment +## @payment +## @opayment +`@payment <object>[=<message>]` +`@opayment <object>[=<message>]` +`@apayment <object>[=<action list>]` + +These attributes contain the messages shown to someone who pays `<object>` pennies with the "give" command, the message shown to others when someone pays `<object>`, and the actions to be taken by `<object>` when it's paid. Each attribute is passed the number of pennies paid as %0. + +Example: +``` +> @payment Collecting Tin=Thank you for your donation! +> @opayment Collecting Tin=makes a donation to charity. +> @apayment Collecting Tin=&%# me=%0 at [time()] +``` + + +### See Also +- [give](/reference/sharpmush-help/penncmd/#give) +- [@cost](/reference/sharpmush-help/penncmd/#cost) +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @atport +## @tport +## @otport +## @oxtport +`@tport <object>[=<message>]` +`@otport <object>[=<message>]` +`@oxtport <object> [=<message>]` +`@atport <object>[=<action list>]` + +These attributes contain the message shown to `<object>` when it is teleported, the message shown to others in the room `<object>` is teleported to, the message shown to others in the room `<object>` is teleported from, and the actions to be taken by `<object>` when it disappears, respectively. + +In all of these attributes, %0 is the object which teleported `<object>`, and %1 is `<object>`'s old location. + +Example: +``` +> @tport me=name(%0) has teleported you from [name(%1)] to [name(here)]. +> @otport me=appears in a puff of smoke. +> @oxtport me=disappears in a puff of smoke. +``` + + +### See Also +- [@teleport](/reference/sharpmush-help/penncmd/#teleport) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @atrchown +## @attrchown +`@atrchown <object>/<attribute>=<new owner>` + +This command changes the ownership of the attribute `<attribute>` on `<object>` to `<new owner>`. You can only @atrchown attributes which you can set. Wizards can @atrchown to any player, while mortals can only @atrchown attributes to themselves. Only players can own attributes; if `<new owner>` is not a player, `<new owner>`'s owner is used instead. + + +### See Also +- [@atrlock](/reference/sharpmush-help/penncmd/#atrlock) +- [@chown](/reference/sharpmush-help/penncmd/#chown) +- [owner()](/reference/sharpmush-help/pennfunc/#owner) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +## @atrlock +## @attrlock +`@atrlock <object>/<attribute>` +`@atrlock <object>/<attribute=[on|off]` + +The first form of this command tells you whether or not the given attribute is locked (whether it has the "locked" attribute flag set). + +The second form attempts to lock (for 'on') or unlock (for 'off') the given attribute. You automatically gain ownership of the attribute (as per @atrchown) when you lock it. Locked attributes cannot be altered by anyone but Wizards and the attribute's owner (though the owner may be unable to alter the attribute for other reasons, such as not controlling `<object>`). You must be able to set an attribute in order to lock it. + +If you wish to lock an attribute without gaining ownership, you can set it "locked" with `@set <obj>/<attr>=locked` - be aware that you'll be unable to make any changes to the attribute after this, including unlocking it! + + +### See Also +- [atrlock()](/reference/sharpmush-help/pennfunc/#atrlock) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +## @asuccess +## @success +## @osuccess +`@success <object>[=<message>]` +`@osuccess <object>[=<message>]` +`@asuccess <object>[=<action list>]` + +For players and things, these attributes contain the message shown to someone who picks up `<object>` with the "get" command, the message shown to others when someone gets `<object>`, and the actions to be taken by `<object>` when someone gets it, respectively. + +For exits, they contain the message shown to an object passing through the exit `<object>`, the message shown in the exit's source when someone passes through it, and the actions to be taken by the exit when someone passes through it, respectively. + +In all cases, %0 is the dbref of the moving object's original location. + +Example: +``` +> @success Door=You open the door and step inside. +> @osuccess Door=opens the door and steps inside. +``` + +``` +> @success Box=You pick up the box. +> @osuccess Box=picks up the box. +``` + + +### See Also +- [get](/reference/sharpmush-help/penncmd/#get) +- [goto](/reference/sharpmush-help/penncmd/#goto) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [SUCCESS](/reference/sharpmush-help/penntop/#success) +- [FAILURE](/reference/sharpmush-help/penntop/#failure) +- [@odrop](/reference/sharpmush-help/penncmd/#odrop) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @attribute +`@attribute <attrib>` + +The @attribute command displays and modifies the MUSH's standard attributes (see "@list/attribs" for a list of them). + +Since 1.8.5p1, changes to the attribute table are saved across reboots and shutdowns, and don't need to be placed in an @startup. + +The first form of the command displays the full name of the attribute `<attrib>`, along with the its attribute flags, and the dbref of the object which added it to the attribute table. + +See [@attribute2](/reference/sharpmush-help/penncmd/#attribute2). +## @attribute2 +`@attribute/access[/retroactive] <attrib>=<flag list>` +`@attribute/delete <attrib>` +`@attribute/rename <attrib>=<new name>` +`@attribute/decompile[/retroactive] [<pattern>]` + +`@attribute/access` adds `<attrib>` as a new standard attribute, with the default attribute flags `<flag list>`. If `<attrib>` is already a standard attribute, this command modifies its default attribute flags. Use "none" for `<flag list>` if you don't want any default attribute flags. + +If the `/retroactive` switch is given with `/access`, all existing copies of the attribute will be @atrchown'd to the player running the command, and will have its flags changed to `<flag list>`. + +`@attribute/delete` removes a standard attribute from the table. +`@attribute/rename` renames a standard attribute. + +Only Wizards can modify the attribute table. + +`@attribute/decompile` prints out a list of @attribute/access commands needed to recreate the attribute table on another MUSH. If `/retroactive` is given, that switch will be included in the output. If `<pattern>` is given, only attributes matching `<pattern>` are decompiled. + +See [@attribute3](/reference/sharpmush-help/penncmd/#attribute3). +## @attribute3 +`@attribute/limit <attrib>=<regexp pattern>` +`@attribute/enum [<delim>] <attrib>=<list of choices>` + +`@attribute/limit` lets you restrict all _new_ values for an attribute to those that match a regexp pattern. Case insensitive. (Use (?-i) to make your regexp case-sensitive.) + +`@attribute/enum` lets you restrict all _new_ values for an attribute to match an item in a list. It will also perform partial matching on the list, much like a grab. Delimiter is optional, and defaults to a space. + +Examples: +``` +@attribute/enum sex=male female <-- requires 'male' or 'female' as @sex +@attribute/enum | race=Wookie|Indy 500 <- Your race can be 'wookie' or 'Indy 500' +@attribute/limit score=^\\d+$ <-- @score can only contain digits. (Remember, Penn's parser eats a \) +``` + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +- [@atrlock](/reference/sharpmush-help/penncmd/#atrlock) +- [@list](/reference/sharpmush-help/penncmd/#list) +## @ause +## @use +## @ouse +`@use <object>[=<message>]` +`@ouse <object>[=<message>]` +`@ause <object>[=<action list>]` + +These attributes contain the message shown to someone who successfully uses `<object>`, the message shown to others when someone uses `<object>`, and the actions to be taken by `<object>` when it is used, respectively. + +Note that, if `<object>` has a CHARGES attribute set and it does not contain a number greater than 0, the RUNOUT attribute is triggered instead of the AUSE attribute. See [@charges](/reference/sharpmush-help/penncmd/#charges) for more information. + +Example: +``` +> @use Jack-In-The-Box=You wind the handle. +> @ouse Jack-In-The-Box=winds the handle. +> @ause Jack-In-The-Box=@wait 3=POSE pops up with a bang! +> use Jack-In-The-Box +``` + + +### See Also +- [use](/reference/sharpmush-help/penncmd/#use) +- [@charges](/reference/sharpmush-help/penncmd/#charges) +- [@runout](/reference/sharpmush-help/penncmd/#runout) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @away +`@away <player>[=<message>]` + +If `<message>` evaluates to something non-null, it will be shown to anyone who pages `<player>` when she is not connected. + +Example: +``` +> @away me=I'm not here, please send me @mail instead. +``` + + +### See Also +- [@idle](/reference/sharpmush-help/penncmd/#idle) +- [@haven](/reference/sharpmush-help/penncmd/#haven) +## @boot +`@boot[/silent] <player>` +`@boot/port[/silent] <descriptor number>` +`@boot/me` + +The first form of this command disconnects all of `<player>`'s connections from the game. + +The `/port` switch disconnects a particular descriptor (as shown under "Des" in the Wizard WHO, returned by lports() and ports(), etc). + +If the `/silent` switch is given, the message telling `<player>` he was booted is suppressed. + +The `/me` switch boots all descriptors for the player using the command which have been idle for over 1 minute. Players can use this command to terminate hung connections. + +Only admin and those with the "boot" power can @boot other players. + + +### See Also +- [QUIT](/reference/sharpmush-help/penncmd/#quit) +- [LOGOUT](/reference/sharpmush-help/penncmd/#logout) +## @break +## @assert +`@break[/queued] <boolean>[=<action list>]` +`@assert[/queued] <boolean>[=<action list>]` + +`@break` stops the execution of further commands in the current action list if `<boolean>` is a true value. It doesn't affect new queue entries made by previous commands in the action list. It can be useful for doing error checking without having to nest @switches. + +If `<action list>` is given, it is executed instead of the rest of the commands in the current action list. By default, `<action list>` is run immediately, replacing the rest of the action list @break was called in. If the `/queued` switch is given, `<action list>` will instead be queued to be run later. @break also accepts an /inline switch, for Rhost compatability; this switch does nothing on PennMUSH. + +`@assert` does the inverse: it stops execution if `<boolean>` evaluates to false. + +See [@break2](/reference/sharpmush-help/penncmd/#break2) for examples. + +### See Also +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [QUEUE](/reference/sharpmush-help/penntop/#queue) +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [@switch](/reference/sharpmush-help/penncmd/#switch) +- [@if](/reference/sharpmush-help/penncmd/#if) +## @break2 +## @assert2 +Examples: +``` +> @va obj=$testme *: @pemit %#=You try a test ; @break lt(%0,10)=@pemit %#=But you're too low! ; @pemit %#=And you succeed! +> testme 0 +You try a test +But you're too low! +``` + +``` +> testme 10 +You try a test +And you succeed! +``` + +``` +> @force me={@switch 1=1, think Third; think First; @break 1; think Second} +First +Third +(The @switch is run, which queues 'think Third', think First is run, displaying 'First', command execution is broken (so we never think Second), and then the queued 'think Third' is run, displaying Third. If you figured that out, you have a very good understanding of the PennMUSH queue. :) +``` +## @charges +## @runout +`@charges <object>[=<integer>]` +`@runout <object>[=<action list>]` + +These attributes can limit how many times an object can be successfully "use"d. When you "use" an object with a CHARGES attribute set, the object's AUSE attribute is only triggered if CHARGES is a positive integer. When CHARGES is less than 1 (or not a number), the object's RUNOUT attribute is triggered instead. + +When the CHARGES attribute is present and AUSE is triggered, the value of the CHARGES attribute is automatically decreased by 1. When no CHARGES attribute is set, AUSE is always triggered. + +See [charges2](/reference/sharpmush-help/penncmd/#charges2) for an example. + + +### See Also +- [use](/reference/sharpmush-help/penncmd/#use) +- [@ause](/reference/sharpmush-help/penncmd/#ause) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +## charges2 +## runout2 +Example: +``` +> @create Revolver +> @use Revolver=You pull the trigger. +> @ouse Revolver=pulls the trigger. +> @charges Revolver=6 +> @ause Revolver=POSE fires into the air. +> @runout Revolver=POSE clicks, but is out of bullets. +``` + +``` +> use revolver +You pull the trigger. +Revolver fires into the air. +> ex revolver/charges +CHARGES [#6$]: 5 +``` + +The next 5 "use revolver"s work the same way, decrementing CHARGES each time. + +``` +> ex revolver/charges +CHARGES [#6$]: 0 +> use revolver +You pull the trigger. +Revolver clicks, but is out of bullets. +> ex revolver/charges +CHARGES [#6$]: 0 +``` +## @chown +`@chown[/preserve] <object>=<player>` +`@chown <object>/<attribute>=<player>` + +Changes the ownership of `<object>` to `<player>`. You can chown things, rooms or exits. Players can't be @chown'd - they always own themselves. To chown a thing, you have to be carrying it. If you do not own an object, you can only chown it if it has the CHOWN_OK flag and you pass its @lock/chown. If you're not a Wizard, you can only @chown objects to yourself or a Zone Master whose zone-lock you pass. + +Normally, @chown'ing an object clears privileged flags and powers, and sets the object halt. Wizards can use `@chown/preserve` to avoid this. Doing this to an active object with queued commands is not recommended, and may have strange and insecure effects. + +If `/<attribute>` is specified, it acts as an alias for @atrchown; see [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) for details. + +Examples: +``` +> @chown here=me (for a room) +> @chown box=Soundwave (for a thing) +``` + + +### See Also +- [CHOWN_OK](/reference/sharpmush-help/pennflag/#chownok) +- [Zone Masters](/reference/sharpmush-help/penntop/#zone-masters) +- [@chownall](/reference/sharpmush-help/penncmd/#chownall) +- [owner()](/reference/sharpmush-help/pennfunc/#owner) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +## @chownall +`@chownall[/preserve][/<types>] <player>[=<new owner>]` + +This command @chowns all objects currently owned by `<player>` to the player `<new owner>`, or to the person running the command if no `<new owner>` is given. All the objects will have privileged flags and powers cleared, and be set halt, unless the `/preserve` switch is given. + +If one or more of `/things`, `/rooms` or `/exits` are provided, only objects of the given types are chowned. Otherwise, all objects are chowned. + +This command can only be used by Wizards. + + +### See Also +- [@chown](/reference/sharpmush-help/penncmd/#chown) +## @chzone +`@chzone[/preserve] <object>=<zone>` +`@chzone <object>=none` + +The first form of this command changes the zone of `<object>` to `<zone>`. This puts the object on that zone and may (if the zone_control_zmp_only @config option is off) allow anyone who passes the Zone @lock of `<zone>` to control `<object>`. Any kind of object can be @chzoned, and any kind of object can be used as a zone. + +The second form of this command removes `<object>` from its current zone, leaving it unzoned. + +If a player is @chzoned, any objects he creates from that point on will automatically be on the same zone. Objects the player already owns are not affected. + +You must control `<object>`, and either control `<zone>` or pass its @lock/chzone. + +See [@chzone2](/reference/sharpmush-help/penncmd/#chzone2). +## @chzone2 +To see the Zone of an object, you can use either 'brief' or 'examine' to examine it. The Zone is listed on the same line as the Owner of the object. + +If `<zone>` does not have a Zone @lock when something is @chzoned to it, the lock is automatically set to `_`<zone>` (see [@lock](/reference/sharpmush-help/penncmd/#lock) for more info). + +Whenever an object besides a player is @chzoned to a zone object, the WIZARD, ROYALTY, and TRUST flags will be reset, as will all @power's (for security purposes). For similar reasons, it is strongly recommended that you do not @chzone admin- or wizard-owned objects to any zone that less privileged players have access to. Wizards can use the `/preserve` switch to prevent this reset. + + +### See Also +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [@chzoneall](/reference/sharpmush-help/penncmd/#chzoneall) +- [zone()](/reference/sharpmush-help/pennfunc/#zone) +## @chzoneall +`@chzoneall[/preserve] <player>=<zone object>` + +Changes the zone of all objects owned by `<player>` to `<zone object>`. If `<zone object>` is "none", the zone is reset to NOTHING. Only wizards may use this command. + + +### See Also +- [@chzone](/reference/sharpmush-help/penncmd/#chzone) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +## @clone +`@clone <object>[=<new name>[, <dbref>]]` +`@clone/preserve <object>[=<new name>[, <dbref>]]` + +This command creates a copy of `<object>`. The clone will have the same name as the original unless a `<new name>` is given for it. You can only clone things, rooms and exits, not players. You must control `<object>`. The new object will be owned by the player who performs the @clone, not the owner of the original `<object>`. + +When cloning things and exits, the clone will be placed in your current location, not the location of `<object>`. When cloning rooms, the exits and contents in the room are not cloned as well. + +The cloned object will have the same modification time as the original object, to make tracking revisions easier, but will have a different creation time. + +Normally, the Wizard and Royalty flags, @powers and @warnings are stripped from the cloned object, but Wizards may use the `/preserve` flag to prevent this. + +The clone will normally be created with the first available dbref, but Wizards and objects with the pick_dbref power may specify the `<dbref>` of a garbage object to use that instead. + +To clone a room and all its exits, use code like: +``` +> @teleport setq(0,%L)[clone(here)] +> @dolist lexits(%q0)=@clone ## +``` + +Note: If @create is restricted or disabled, it will also restrict or disable this command. + + +### See Also +- [@create](/reference/sharpmush-help/penncmd/#create) +- [clone()](/reference/sharpmush-help/pennfunc/#clone) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [@cpattr](/reference/sharpmush-help/penncmd/#cpattr) +## @command +`@command <command>` +`@command/<switch> <command>` +`@command/alias <command>=<alias>` +`@command/clone <command>=<clone>` +`@command/restrict <command>=<restriction> [" <error message>]` + +@command can be used for adding new built-in commands, altering the way a built-in command works, and displaying information about how commands currently work. + +With no switches, @command shows all sorts of interesting information about how a command is parsed. Any player can use @command with no switch, while the switches are Wizard-only. + +The `/alias` switch creates an alias for `<command>`, allowing players to type `<alias>` to run `<command>`. The `/clone` switch creates a separate copy of `<command>`, which works the same initially but can be restricted, @hooked, etc, separately. + +`@command/restrict` can be used to restrict who can use `<command>`. See [restrict](/reference/sharpmush-help/penntop/#restrict) for more information. + +Switches include: +- /add : Add a new command that does nothing, but can be @hook'd. +- /delete : Delete a command added with @command/add or /alias. God only. +- /disable : Disable a command added in the hardcode. +- /enable : Re-enable a command disabled with @command/disable. + +The `/quiet` switch can be used to suppress output from @command. + +See [@command2](/reference/sharpmush-help/penncmd/#command2). +## @command2 +`@command/add` is a powerful tool that lets you create new commands which are matched before normal $-commands, and which can be set not to parse their arguments, but (via @hook) can still execute softcode like an $-command. + +You can use these additional switches, along with `@command/add`, to control how the new command parses its arguments: + +- /noparse : The command does not evaluate the leftside arg(s). +- /eqsplit : The parser parses leftside and rightside around = +- /lsargs : Comma-separated arguments on the left side are parsed. +- /rsargs : When used with /eqsplit, the right-side arguments are comma-separated and are parsed individually +- /rsnoparse : The command does not evaluate the rightside arg(s). + +Any command added with neither `/noparse` or `/rsnoparse` is provided with a `/noeval` switch automatically, so if you `@command/add` foo, then foo's arguments are parsed by default, but you can call foo/noeval. Note: when you @hook/override foo, its $-command pattern must be able to match "foo/noeval" as well for the switch to actually be used. + +Commands added with `@command/add`, like other standard commands, are always case-insensitive. Commands can also be added in the alias.cnf file. + +See [@command3](/reference/sharpmush-help/penncmd/#command3) for examples. + +### See Also +- [@hook](/reference/sharpmush-help/penncmd/#hook) +- [RESTRICT](/reference/sharpmush-help/penntop/#restrict) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +## @command3 +Examples: +``` +> @create Dining Machine +> &eat dining=$eat *:@remit %L=%n takes a bite of %0. +> @command/add/noparse eat +> @hook/override eat=dining machine,eat +> eat meat loaf +Walker takes a bite of meat loaf. +> eat randword(apple tomato pear) +Walker takes a bite of randword(apple tomato pear) +``` + +``` +> &drink dining=$^drink(/noeval)? (.*)$:@remit %L=%n drinks %2. +> @set dining/drink=regexp +> @command/add drink +> @hook/override drink=dining machine,drink +> drink reverse(tea) +Walker drinks aet. +> drink/noeval reverse(tea) +Walker drinks reverse(tea). +``` +## @comment +`@comment <object>[=<comment>]` + +This is a wizard-only command which sets a COMMENT attribute on `<object>`. The attribute can only be seen by those with the See_All power. + + +### See Also +- [@@](/reference/sharpmush-help/penncmd/) +- [@@()] +## @config +`@config` +`@config [<category>|<option>]` +`@config/set <option>=<value>` +`@config/save <option>=<value>` + +With no arguments, @config lists the categories of configuration options for the MUSH. With an argument, @config lists the options in the given `<category>`, or shows the current value of the given `<option>`. + +The wizard-only `/set` switch changes the value of `<option>` to `<value>`. This change does not last across reboots. God can also use the `/save` switch, which attempts to save the new `<value>` in the mush.cnf configuration file, as well as changing it in-game. + +For information about parameters, see [@config parameters](/reference/sharpmush-help/pennconf/#config-parameters) +## @conformat +`@conformat <object>[=<format>]` + +When set, the CONFORMAT attribute is evaluated when `<object>` is looked at, and the result is displayed instead of the usual "Contents:" (for rooms) or "Carrying:" (for players and things) list of contents. + +The dbrefs of the objects which would appear in the normal contents list are passed to the attribute as %0 (you can use lcon(me) for a full contents list). A list of the names of these objects as they would appear in the default contents list is passed as %1, |-delimited. + +Q-registers (set via setq() and similar functions) are inherited from the @descformat, and passed on to the @exitformat. + +Examples: +Show the normal contents list, but in upper-case: +``` +> @conformat here=edit(ucstr(%1), |, %r) +``` + +Show just the object names (with no ansi) in a table: +``` +> @conformat here=table(iter(%0, name(%i0), %b, |), 20, width(%#), |) +``` + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@exitformat](/reference/sharpmush-help/penncmd/#exitformat) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +- [@invformat](/reference/sharpmush-help/penncmd/#invformat) +- [@idescformat](/reference/sharpmush-help/penncmd/#idescformat) +## @include +`@include[/<switches>] <object>/<attribute>[=<arg1>,<arg2>,...]` + +@include inserts the contents of the attribute provided into the action list in-place, without adding a new queue entry. It is useful to avoid having to copy the same code into multiple commands. The attribute to be included must be visible to the enactor. + +Example: +``` +&CHECKS me=@assert [orflags(%#,Wr)]; @break [gt(words(lwho()),%0)] +&CMD1 me=$cmd *: @include me/CHECKS; @pemit %#=You passed. +&CMD2 me=$othercmd *: @include me/CHECKS; @@ Do something else... +``` + +When including attribute contents, @include ignores any ^...: or $...: at the start, so the CHECKS attribute above could also be written like this, to allow for "unit testing": +``` +&CHECKS me=$testchk *: @assert [orflags(%#,Wr)]; @break [gt(words(lwho()),%0)] +``` + +The including environment (%0-%9) is available to the included actions. If arguments are provided to @include, they are substituted for the environment's %0, %1, etc. while the included action list is running. The environment is then restored after the @include. + +See [@include2](/reference/sharpmush-help/penncmd/#include2). +## @include2 +@include takes the following switches to alter its behaviour: +- /nobreak: Prevents an @break/@assert in the included attribute from breaking the including action list. +- /localize: Saves all q-registers before including the attribute, and restores them after including the attribute. +- /clearregs: Clears all q-registers before including the attribute. + + +### See Also +- [@trigger](/reference/sharpmush-help/penncmd/#trigger) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [@break](/reference/sharpmush-help/penncmd/#break) +## @invformat +`@invformat <object>[=<format>]` + +When set, this attribute is evaluated and displayed instead of the usual "You are carrying:" list of objects when `<object>` uses the "inventory" command. The list of objects that would normally appear in the inventory is passed as %0, and a list of the names as they would appear in the default display, |-delimited, is passed as %1. + +Example: +``` +> @invformat me=You're holding: [itemize(iter(%0, name(%i0), %b, |), |)] +> inventory +You're holding: Red Ball, Pickle, and Piano +``` + + +### See Also +- [inventory](/reference/sharpmush-help/penncmd/#inventory) +- [@conformat](/reference/sharpmush-help/penncmd/#conformat) +- [@exitformat](/reference/sharpmush-help/penncmd/#exitformat) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +- [@idescformat](/reference/sharpmush-help/penncmd/#idescformat) +## @descformat +`@descformat <object>[=<format>]` + +When set, this attribute is evaluated and displayed instead of `<object>`'s @describe, when someone looks at `<object>`. The evaluated @describe, which would be shown if no @descformat were set, is passed to the @descformt as %0; use v(describe) to get the unevaluted description. + +This is primarily useful for room parents, to enforce a consistent look for all rooms without having to apply formatting to ever @describe. Note that this object is only used with @describe - to format the @idescribe, use @idescformat. + +Q-registers (set via setq() and similar functions) are inherited from the @nameformat, and passed on to the @conformat. + +Example: +``` +> @descformat Room Parent=repeat(=, width(%#))%r%0[repeat(=, width(%#))] +``` + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@exitformat](/reference/sharpmush-help/penncmd/#exitformat) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@conformat](/reference/sharpmush-help/penncmd/#conformat) +- [@idescformat](/reference/sharpmush-help/penncmd/#idescformat) +- [@invformat](/reference/sharpmush-help/penncmd/#invformat) +## @idescformat +`@idescformat <object>[=<format>]` + +When set, this attribute is evaluated and displayed instead of `<object>`'s @idescribe, when someone looks at `<object>` while inside it. The evaluated @idescribe, which would be shown if no @idescformat were set, is passed to the @idescformt as %0; use v(idescribe) to get the unevaluted description. + +Note that this attribute is only used when an @idescribe is set. When no @idescribe is set, the @descformat (and @describe) attributes are used, even when someone "look"s inside `<object>`. + +This is useful for things like object parents that enforce a consistent "look" for each object's @idescribe, without having to place formatting into every @idescribe. + +Q-registers (set via setq() and similar functions) are inherited from the @nameformat, and passed on to the @conformat. + +Example: +``` +> @idescribe Vehicle Parent=repeat(*, width(%#))%r%0 +``` + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@exitformat](/reference/sharpmush-help/penncmd/#exitformat) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@conformat](/reference/sharpmush-help/penncmd/#conformat) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +- [@invformat](/reference/sharpmush-help/penncmd/#invformat) +## @nameaccent +`@nameaccent <object>[=<accent template>]` + +When this attribute holds an accent template that is the same length as `<object>`'s @name, it is used to change the object's name in some situations (how it shows up in speech, look, and a few other commands). This allows for accented names without having to use the accented characters directly in a name, which can make it harder for people to type. + +The `<accent template>` is explained in [accents](/reference/sharpmush-help/pennfunc/#accents). + +If a container has both a @nameaccent and a @nameformat, the @nameformat is used. + + +### See Also +- [accent()](/reference/sharpmush-help/pennfunc/#accent) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +- [stripaccents()](/reference/sharpmush-help/pennfunc/#stripaccents) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +## @nameformat +`@nameformat <object>[=<format>]` + +When set, this attribute is evaluated and displayed in place of `<object>`'s name, when objects inside `<object>` "look". The room's dbref is passed as %0, and the default-formatted name (as it would be displayed with no @nameformat set) is passed as %1. + +@nameformat is not used when people who are outside the object look at it. + +Q-registers (set via setq() and similar functions) are passed on from the nameformat to the other @*format attributes used for formatting "look" output. Use localize() if you don't want this behaviour. + +Example: +Show the room's zone after its name. +``` +> @nameformat here = %1 [if(zone(%0),<[name(zone(%0))]>)] +``` + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@exitformat](/reference/sharpmush-help/penncmd/#exitformat) +- [@conformat](/reference/sharpmush-help/penncmd/#conformat) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +- [@nameaccent](/reference/sharpmush-help/penncmd/#nameaccent) +- [@invformat](/reference/sharpmush-help/penncmd/#invformat) +- [@idescformat](/reference/sharpmush-help/penncmd/#idescformat) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +## @cost +`@cost <object>[=<amount>]` + +The COST attribute contains the number of pennies that must be given to `<object>` to trigger its @pay/@opay/@apay attributes. If less than this amount is given, the money will be refused, and if more is given, the difference is refunded. + +This attribute is evaluated, with the amount being given passed as %0. If the attribute returns a number less than 0, the money will be refused. Non-players must have this attribute set in order to receive pennies. Players who don't have a COST always accept the amount of pennies given. + +Example: +``` +> @cost Exit Machine=10 +> @apay Exit Machine=@open %n-exit +> @pay Exit Machine=Your exit has been created. +``` + +``` +> give Exit Machine=10 +Your exit has been created. +(The exit will also have been opened by the machine.) +``` + +``` +> @cost charity=%0 +> @pay charity=Thanks for your donation of %0 [money(%0)]. +``` + + +### See Also +- [give](/reference/sharpmush-help/penncmd/#give) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [@pay](/reference/sharpmush-help/penncmd/#pay) +- [money()](/reference/sharpmush-help/pennfunc/#money) +- [buy](/reference/sharpmush-help/penncmd/#buy) +## @cpattr +## @mvattr +`@cpattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]` +`@mvattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]` + +@cpattr copies the `<attr>` attribute from `<obj>` to `<obj1>` (and any other objects given). By default, the new attributes will have the same name as the original, but you can specify a different name to be used on each object if you wish. + +@mvattr works the same, but also attempts to remove the original attribute after copying it. + +Attribute flags are copied as well, unless the `/noflagcopy` switch is given. This is recommended when copying from a non-standard attribute to a standard one. + +Example: +``` +> @cpattr box/test=box/test1, cube/random, tribble/describe +``` +would check the object "box" for an attribute named TEST and then copy it to the attributes TEST1 on "box", RANDOM on the object named "cube", and DESCRIBE on the object named "tribble". +``` +> @cpattr box/test=cube +``` +would copy the TEST attribute from "box" to TEST on "cube". + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +- [@set](/reference/sharpmush-help/penncmd/#set) +## @create +`@create <name>[=<cost>[,<dbref>]]` + +This command creates a new thing called `<name>`. Creating an object costs a certain number of pennies (see '@config object_cost'); you can specify a higher cost if you wish. This cost is refunded to you when the object is destroyed. + +Some MUSHes choose to limit the number of objects you can create by setting a quota. + +Wizards and objects with the pick_dbref power can also specify the `<dbref>` of a garbage object to use when creating the object. Otherwise, the object is given the next available dbref. + + +### See Also +- [give](/reference/sharpmush-help/penncmd/#give) +- [@quota](/reference/sharpmush-help/penncmd/#quota) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [@clone](/reference/sharpmush-help/penncmd/#clone) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@pcreate](/reference/sharpmush-help/penncmd/#pcreate) +## @dbck +`@dbck` + +This is a wizard only command. It forces the database to perform a series of internal cleanup and consistency checks that normally run approximately every 10 minutes: + +1. For every object, make sure its location, home, next, contents, parent, and zone fields are valid objects. +2. Check for disconnected rooms that aren't set FLOATING +3. For every exit, player, or thing, make sure there is exactly one way to reach it from a room by following the contents fields of non-exits, the next fields of non-rooms, and the exits fields of rooms. +4. For every thing or player, make sure that it is in the contents list of its location. Make sure every exit is in the exits list of its location. +5. Check that objects being used as zones have a @lock/zone. + +@dbck no longer performs an @purge. The results of @dbck are written to the game's error log, and not reported to the Wizard. +## @decompile +`@decompile[/<switches>] <object>[=<prefix>]` +`@decompile[/<switches>] <object>/<attribute patterns>[=<prefix>]` + +@decompile outputs a list of the commands that you would have to enter in order to recreate `<object>`. Useful for either copying objects from one MUSH to another, or for making logs of important objects to protect against an accidental @nuke or a crash. + +All output lines are prefixed with `<prefix>`, if one is given. This is useful for creating client-side scripts for editing code. + +You can either @decompile an entire object, or just certain parts of it. To @decompile just a few attributes, for example, you could type: +``` +@decompile <object>/<attribute pattern> [ ... <attribute patternN>] +``` +including each attribute. Attribute patterns can be wildcards. + +See [@decompile2](/reference/sharpmush-help/penncmd/#decompile2). +## @decompile2 +@decompile takes the following switches, which can be combined: + +`@decompile/name` +This switch causes @decompile to use the object's name, instead of its dbref. This is the default. +`@decompile/db` +This switch makes @decompile use the object's dbref instead of its name, which is useful for editing code off-MUSH. +`@decompile/flags` +Only the code to @create the object and set flags/powers/locks is printed. When an `<attribute pattern>` is given, this switch is ignored, and @decompile only prints the matching attributes. +`@decompile/attribs` +Only the code to set the object's attributes is printed. Same as `@decompile <object>/**` +`@decompile/skipdefaults` +Don't output commands to set attribute flags if those flags are the defaults for that attribute on that MUSH. +`@decompile/tf` +Explained in [@decompile3](/reference/sharpmush-help/penncmd/#decompile3). + +See [@decompile3](/reference/sharpmush-help/penncmd/#decompile3). +## @decompile3 +`@decompile/tf <object>[/<attribute>]` + +The /tf works the same as if you'd typed: +`@decompile/db <obj>[/<attrs>]=[default(me/TFPREFIX, FugueEdit >%b)]` + +with the exception that `@decompile/tf` does not include commands for setting attribute flags. If you have a TFPREFIX attribute set, the (unevaluated) contents of that attribute is used as the prefix. Otherwise, the string "FugueEdit > " is used. It's useful for automatically copying @decompile output into your client to alter. It is highly recommended that you set a TFPREFIX attribute, to prevent others from maliciously placing code in your client's command line. + +To set up `@decompile/tf`: + +In TinyFugue: +``` +/def -ag -mglob -p100 -t"FugueEdit > *" fe = /grab %-2 +``` + +In SimpleMU: +``` +Set your Options -> Grab Password +@set me=tfprefix:<grabpassword>FugueEdit >%b +``` + + +### See Also +- [CLIENTS](/reference/sharpmush-help/penntop/#clients) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +- [MUSHCODE](/reference/sharpmush-help/penntop/#mushcode) +## @describe +## @desc +`@describe <object>[=<description>]` + +This command sets the description of the object, which will be seen whenever something looks at the object with the 'look' command. Every object should have a description, even if just a short one describing its purpose. When looking at a thing, player or exit which has no description, you will see the message "You see nothing special.". A room with no desc set shows nothing. + +The description can be formatted using the @descformat attribute. This is particularly useful for @parents and ancestors. + +When inside a thing or player, you will see its @idescribe instead, if one is set. + +@describe can be abbreviated as @desc. + + +### See Also +- [look](/reference/sharpmush-help/penncmd/#look) +- [@adescribe](/reference/sharpmush-help/penncmd/#adescribe) +- [@idescribe](/reference/sharpmush-help/penncmd/#idescribe) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +## @destroy +## @recycle +## @nuke +`@destroy[/override] <object>` or `@recyle[/override] <object>` +`@nuke <object>` + +The @destroy command marks `<object>` for destruction, or destroys `<object>` instantly if it was already marked for destruction. You must either control `<object>`, control its source or destination room (for exits), or it must be set DESTROY_OK and you must pass its @lock/destroy. + +To destroy objects set SAFE, you must use `@destroy/override` or @nuke. If the really_safe @config option is on, even @nuke can't destroy SAFE objects, and you must clear the SAFE flag first. + +@recycle is an alias for @destroy. Some MUSHes disable @destroy and only use @recycle, to avoid players mistyping. @nuke is an alias for `@destroy/override`. + +See [@destroy2](/reference/sharpmush-help/penncmd/#destroy2) for a description of the destruction process. + +### See Also +- [@undestroy](/reference/sharpmush-help/penncmd/#undestroy) +- [@create](/reference/sharpmush-help/penncmd/#create) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [DESTROY_OK](/reference/sharpmush-help/pennflag/#destroyok) +- [SAFE](/reference/sharpmush-help/pennflag/#safe) +## @destroy2 +## DESTRUCTION +When an object is marked for destruction, the GOING flag is set on it and its @adestroy attribute is triggered (if the 'adestroy' @config option is true). If `<object>` is a room, all the exits in the room are marked for destruction as well. If `<object>` is a player, and the @config option destroy_possessions is on, everything he owns is marked for destruction as well. (If really_safe is also on, his SAFE objects are spared.) + +The MUSH checks for GOING objects every ten minutes or so (see '@config purge_interval'); each one is set with the GOING_TWICE flag, and will be destroyed totally on the next cycle. You can save it from destruction during this period using the @undestroy command, or @destroy it again to destroy it instantly. The GOING and GOING_TWICE flags cannot be set or removed manually. + +When an object is destroyed, any commands, @waits and semaphores it has queued are drained, and the object's owner has the quota for the object, and the initial cost of creating it, refunded. The OBJECT`DESTROY event is also queued. + +Players can only be @destroyed when they are not connected, and even then can only be destroyed by a Wizard player. If the destroy_possessions @config option is on, anything the player owns is @destroyed. If the really_safe option is also on, his SAFE possessions are spared. Any objects he owns which aren't destroyed are @chown'd to the Probate player (as per '@config probate_judge'), as are any @channels the player owned. + + +### See Also +- [SAFE](/reference/sharpmush-help/pennflag/#safe) +- [EVENTS](/reference/sharpmush-help/pennevents/#events) +## @undestroy +## @unrecycle +`@undestroy <object>` + +When an object has been marked for destruction using @destroy, this command spares it from destruction, removing the GOING and GOING_TWICE flags. You must control `<object>`. `<object>`'s @startup is triggered when it is spared. + +If `<object>`'s owner is marked for destruction, they will also be spared. + +If `<object>` is a player and the 'destroy_possessions' @config option is on, all objects he owns will also be undestroyed. If `<object>` is a room, all exits in the room will also be undestroyed. If `<object>` is an exit and its source room is marked for destruction, it will be undestroyed. + +@unrecycle is an alias for @undestroy. + + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) +- [GOING](/reference/sharpmush-help/pennflag/#going) +- [@startup](/reference/sharpmush-help/penncmd/#startup) +## @dig +`@dig[/teleport] <room name>[=<exit to>, <exit from>, <room dbref>, <to dbref>, <from dbref>]` + +This command creates a new room named `<room name>`. Creating a room costs some pennies (see '@config room_cost' for exactly how many). If the `/teleport` switch is given, you will be teleported to the room after it's created, as per the @teleport command. + +If `<exit to>` is given, the MUSH will automatically open an exit from your current location to the new room named `<exit to>`, if you have permission. You can also specify `<exit from>`, to create an exit from the new room back to your current location. Opening exists also costs pennies; see '@config exit_cost'. The exit names may contain multiple aliases, separated with semicolons, as per [@name](/reference/sharpmush-help/penncmd/#name). + +Wizards and objects with the pick_dbref power can also specify the dbrefs of garbage objects to use when creating the room and the to and from exits. + +See [@dig2](/reference/sharpmush-help/penncmd/#dig2) for examples. +## @dig2 +Examples: +``` +> @dig Kitchen +``` +This command will create a new room named 'Kitchen'. You will be informed what the dbref of this room is. +``` +> @dig Kitchen=Kitchen <N>;n;north;kitchen;k +``` +This will create the room as above, and also open an exit leading to it named "Kitchen <N>" with the aliases n, north, kitchen and k. It will NOT create an exit coming back from the Kitchen room. +``` +> @dig Kitchen=Kitchen <N>;n;north;kitchen;k, Out <S>;s;south;out;o +``` +This will do just the same as the above, except it will also create an exit named "Out <S>" with the aliases s, south, out and o coming back from the kitchen to whatever room you are currently in. + + +### See Also +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [@create](/reference/sharpmush-help/penncmd/#create) +- [DBREF](/reference/sharpmush-help/pennconf/#dbref) +- [dig()](/reference/sharpmush-help/pennfunc/#dig) +## @doing +`@doing <object>[=<message>]` + +With a `<message>` argument, this command sets `<object>`'s DOING attribute to `<message>`. The DOING attribute is only meaningful for players; the evaluated result is shown on the output of the normal MUSH WHO command, and on the login screen WHO. + +With no `<message>` the attribute is cleared. + +To change the message shown above player @doings in WHO, use @poll. + + +### See Also +- [@poll](/reference/sharpmush-help/penncmd/#poll) +- [WHO](/reference/sharpmush-help/penncmd/#who) +- [doing()](/reference/sharpmush-help/pennfunc/#doing) +## @dolist +`@dolist[/<switches>][/notify][/delimit <delim>] <list>=<action list>` + +@dolist queues the `<action list>` for execution once for each element in `<list>`. `<list>` is space-separated, unless the `/delimit` switch is given, in which case it is a `<delim>`-separated list. + +The %i0 substitution, or the function itext(0), can be used in the `<action list>` to get the current element of the `<list>`, and the inum(0) function returns the position of the current element. ilev() returns the nesting depth of @dolists. The %iL substitution returns the itext() for the outermost @dolist, and is equivilent to itext(ilev()). + +For backwards compatability, the string "##" is also replaced with the current element of the list, and "#@" the current position. However, these replacements occur BEFORE evaluation, which means that they always return the values for the outermost @dolist, and are thus unsuitable for nesting. It also makes them unsafe for use on user-input or strings which may contain special characters; using the %i* sub or itext() instead is very strongly recommended. + +See [@dolist2](/reference/sharpmush-help/penncmd/#dolist2). +## @dolist2 +If the `/notify` switch is given, the command "@notify me" is queued after all copies of `<action list>` have been queued. This is useful for object synchronization with semaphores. + +If the `/inline` switch is given, @dolist will run the new action lists instantly, instead of queueing them to be run later. + +When using `@dolist/inline`, an @break in an `<action list>` will stop the calling action list (and any further `<action list>`s) from running. Each `<action list>` will also be able to see/alter the q-registers for the calling action list. The following switches can be used with `/inline` to alter this behaviour: +- /nobreak: @breaks in `<action list>` do not effect to the calling action list +- /localize: q-registers are saved before each `<action>` is run, and restored after it completes +- /clearreg: q-registers are all reset before each `<action>` is run. Most useful when used in combination with /localize. + +`@dolist/inplace` is an alias for `@dolist/inline/nobreak/localize`. + +See [@dolist3](/reference/sharpmush-help/penncmd/#dolist3) for examples. + +### See Also +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [itext()](/reference/sharpmush-help/pennfunc/#itext) +- [map()](/reference/sharpmush-help/pennfunc/#map) +- [@notify](/reference/sharpmush-help/penncmd/#notify) +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +## @dolist3 +Examples: +``` +> @dolist a b c=say %i0 is number [inum(0)] +You say, "a is number 1" +You say, "b is number 2" +You say, "c is number 3" +``` + +``` +> &test me=$test: say Starting ; @wait me={say Done} ; + @dolist/notify a b c=say %i0 is [inum(0)] +> test +You say, "Starting" +You say, "a is 1" +You say, "b is 2" +You say, "c is 3" +Notified. +You say, "Done" +``` + +``` +> @dolist a b c=@dolist 1 2 3=say %iL/%i0 +You say, "a/1" +You say, "a/2" +You say, "a/3" +You say, "b/1" +You say, "b/2" +You say, "b/3" +You say, "c/1" +You say, "c/2" +You say, "c/3" +``` +## @drain +`@drain[/any][/all] <object>[/<attribute>][=<number>]` + +This command discards commands waiting on a semaphore without executing them. (For non-semaphore queues, use @halt or @halt/pid.) + +If the `/any` switch is given, then all semaphores associated with `<object>` are @drained. Otherwise, only the specified semaphore attribute (or SEMAPHORE if no `<attribute>` is specified) is @drained. + +If the `/all` switch is given, then all queue entries associated with the selected semaphore(s) are discarded, and the semaphore attribute(s) are cleared. Otherwise, only the indicated `<number>` of queue entries are discarded. If no `<number>` is given, then the `/all` switch is assumed. + +You may not specify both the `/any` switch and a specific attribute. Similarly, you may not specify both the `/all` switch and a number. + + +### See Also +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [@notify](/reference/sharpmush-help/penncmd/#notify) +- [@halt](/reference/sharpmush-help/penncmd/#halt) +## @dump +`@dump` +`@dump[/paranoid|/debug|/nofork] [<check interval>]` + +This is a wizard-only command which saves a copy of the database from memory into the outdb file on disk. The MUSH saves the game automatically at a regular interval, controlled by the "dump_interval" @config option. + +If the `/paranoid` switch is given, the game performs additional consistency checking which corrects possible data corruption in the copy of the db written to disk. If a check interval is specified, the game writes confirmation of the dump to the checkpoint log file every `<interval>` objects. If no interval is specified, it is taken to be the size of the database, divided by 5. + +`@dump/debug` is the same as `@dump/paranoid`, but also attempts to fix any errors found in the running (in-memory) copy of the database. In order to do this safely, the dump will be a non-forking dump, even if the MUSH is configured to do forking dumps (see "@config forking_dump"). + +`@dump/nofork` does a normal, always non-forking dump. + +These switches should ONLY be used if a normal @dump is not being done correctly. They should generally only be done by wizards with access to the account on which the MUSH is running, since others will not have access to the checkpoint log file. + + +### See Also +- [@shutdown](/reference/sharpmush-help/penncmd/#shutdown) +## @ealias +## @lalias +`@ealias <object>[=<enter alias1>[; ... ; <enter aliasN>]]` +`@lalias <object>[=<leave alias1>[; ... ; <leave aliasN>]]` + +These attributes contain lists of "enter aliases" and "leave aliases" for `<object>` - any of the aliases can be used in place of "enter `<object>`" and "leave `<object>`" to enter/leave the object. + +These attributes only have meaning for players and things (as rooms/exits cannot be "enter"ed) - the aliases for exits are stored in @alias. + +Example: +``` +> @ealias Chair=Sit down;sit +> @lalias Chair=Stand up;stand +``` + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [goto](/reference/sharpmush-help/penncmd/#goto) +- [ENTER_OK](/reference/sharpmush-help/pennflag/#enterok) +## @edit +## @gedit +`@edit[/first][/check][/quiet] <object>/<attributes>=<search>, <replace>` +`@edit[/check][/quiet] <object>/<attributes>=$, <string to append>` +`@edit[/check][/quiet] <object>/<attributes>=^, <string to prepend>` + +This command allows you to edit the contents of attributes, without having to retype the entire attribute. + +All the attributes on `<object>` whose names match the wildcard pattern `<attributes>` will be searched for the string `<search>`, and each occurrence of it will be replaced with the string `<replace>`. + +If `<search>` is "$", then `<replace>` will be added to the end of the attributes. When `<search>` is "^", `<replace>` will be added to the beginning of the attributes. (If you need to replace a single $ or ^, consider using @edit/regexp (see help @edit2) or the edit() function.) + +If the `/first` switch is given, only the first occurrence of `<search>` in each attribute is replaced. If the `/check` switch is given, the attributes are not altered, you'll just be shown what would be changed (with the changes ansi-highlighted). + +If the `/quiet` switch is given, you won't be shown the modified text, you'll just be told how many of the matching attributes were/weren't edited. Useful when edited a lot of large/spammy attributes. + +`<search>` and `<replace>` are not evaluated, so you don't need to escape special characters. If either contains commas, however, you may need to wrap the string in {curly braces}. + +See [@edit2](/reference/sharpmush-help/penncmd/#edit2). +## @edit2 +`@edit/regexp[/all][/nocase][/check][/quiet] <object>/<attributes>=<regexp>,<replace>` + +When the `/regexp` switch is given, @edit performs a regular expression replacement, similar to the regedit() function. Normally, only the first match per attribute will be replaced; if the `/all` switch is given, all possible matches in each attribute are replaced (as per regeditall()). + +Regexp matches are case-sensitive by default, but the `/nocase` switch can be given to make them case-insensitive (as per regediti()/regeditalli()). + +The `/check` and `/quiet` switches work the same as for non-regexp @edits. + +Note that, unlike normal @edits, the `<replace>` for an `@edit/regexp` WILL be evaluated, once for each replacement made, with the $0 token being replaced with the overall matching text, $1 with the first subexpression, and so on. Named subexpressions are also possible via `$<name>`. + +Example: +``` +> &foo me=Block of text/Wed Feb 22 22:54:02 2012/#10010 +> @edit/regexp me/foo=^(.+)/([^/]+)/(#[0-9]+(?::[0-9]+)?)$, ucstr($1) -- [convtime($2)] -- [name($3)] +FOO - Set: BLOCK OF TEXT -- 1329951242 -- Minion +``` +Replace a literal '^' with 'v' +``` +> @edit/regexp me/bar=\^, v +``` + + +### See Also +- [edit()](/reference/sharpmush-help/pennfunc/#edit) +- [regedit()](/reference/sharpmush-help/pennfunc/#regedit) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## @elock +## @eunlock +`@elock <object>[=<key>]` +`@eunlock <object>` + +@elock sets the Enter @lock for `<object>` to `<key>`, or clears the the lock if no `<key>`. is given. @eunlock removes the Enter @lock for `<object>`. + +@elock and @eunlock are deprecated and uses of them should be replaced by +`@lock/enter <object>[=<key>]` +and +`@lock/enter <object>` + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [ENTER_OK](/reference/sharpmush-help/pennflag/#enterok) +## @emit +## \ +`@emit[/<switch>] <message>` +`\<message>` + +This sends `<message>` to everyone in your location. Nothing is added to the message, not even your name. If you have a SPEECHMOD attribute set, it will be evaluated with `<message>` as %0, and | as %1, and the result will be shown instead of `<message>` as long as it evaluates to a non-empty string. + +The `/noeval` switch prevents the MUSH from evaluating `<message>`. The `/spoof` switch causes nospoof notifications to show the enactor's dbref instead of the executor's dbref, and requires control over the enactor or the Can_spoof power. + +@emit can be abbreviated as `\` + + +### See Also +- [@nsemit](/reference/sharpmush-help/penncmd/#nsemit) +- [emit()](/reference/sharpmush-help/pennfunc/#emit) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [@lemit](/reference/sharpmush-help/penncmd/#lemit) +- [@zemit](/reference/sharpmush-help/penncmd/#zemit) +- [@cemit](/reference/sharpmush-help/pennchat/#cemit) +- [@speechmod](/reference/sharpmush-help/penncmd/#speechmod) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [SPOOFING](/reference/sharpmush-help/penntop/#spoofing).] +## @enable +## @disable +`@enable <option>` +`@disable <option>` + +These wizard-only commands allow for any boolean @config options to be changed (see [@config paramaters](/reference/sharpmush-help/penncmd/#config-paramaters) for a list). + +`@enable <option>` is the same thing as `@config/set <option>=yes` +`@disable <option>` is the same thing as `@config/set <option>=no` + + +### See Also +- [@config](/reference/sharpmush-help/penncmd/#config) +## @zenter +## @ozenter +## @azenter +`@zenter <object>[=<message>]` +`@ozenter <object>[=<message>]` +`@azenter <object>[=<action list>]` + +These attributes set the message shown to a player when he enters the zone `<object>`, the message shown to others in the room the player enters when he enters the zone, and the action to be taken by the zone `<object>` when the player moves into an area zoned to it. + +Entry into a new zone is said to occur when a player goes from a room not in the zone to a room in the zone. "Room" in this context means the player's absolute room (outermost container), so entering and leaving unzoned objects within a zoned room doesn't trigger these. + +Zone entry is assumed to occur before room entry, so these are triggered before the room's @[oa]enter. + + +### See Also +- [@zleave](/reference/sharpmush-help/penncmd/#zleave) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [@zemit](/reference/sharpmush-help/penncmd/#zemit) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @zleave +## @ozleave +## @azleave +`@zleave <object>[=<message>]` +`@ozleave <object>[=<message>]` +`@azleave <object>[=<action list>]` + +These attributes set the message shown to a player when he leaves the zone `<object>`, the message shown to others in the room he left when leaving the zone, and the actions to be taken by `<object>` with a player leaves an area zoned to it. + +Leaving a zone is said to occur when a player goes from a room in the zone to a room not in the zone. "Room" in this context means the player's absolute room (outermost container), so entering and leaving unzoned objects within a zoned room doesn't trigger these. + +Zone leaving is assumed to occur after room leaving, so these are triggered after the room's @[oa]leave. + + +### See Also +- [@zenter](/reference/sharpmush-help/penncmd/#zenter) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [@zemit](/reference/sharpmush-help/penncmd/#zemit) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @entrances +`@entrances[/<switch>] [<object>][=<begin>[, <end>]]` + +This command will show you all objects linked to `<object>`. If you don't specify an `<object>`, your current location is used. You can limit the range of the dbrefs searched by specifying `<begin>` and `<end>`. + +You can use any combination of switches to limit the types of objects: +- /exits show only exits linked to `<object>` +- /things show only things which have their homes in `<object>` +- /players show only players who have their homes in `<object>` +- /rooms show only rooms which have a drop-to of `<object>` + +If you control `<object>`, or have the Search or See_All powers, all objects linked to `<object>` are listed. Otherwise, only objects which you can examine will be shown. + + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [@search](/reference/sharpmush-help/penncmd/#search) +- [entrances()](/reference/sharpmush-help/pennfunc/#entrances) +## @exitformat +`@exitformat <object>[=<format>]` + +When set, the exitformat attribute is evaluated and shown in place of the "Obvious exits" list for a room. (It has no meaning when set on other types of object.) The dbrefs of the exits which would appear in the default "Obvious exits" list is passed to the attribute as %0 as a space-separated list; you can use lexits(me) to get all the exits in the room. + +Q-registers (set via setq() and similar functions) are inherited from the @conformat. + +Example: +``` +> @exitformat here=Exits: [itemize(iter(%0, name(%i0)))] +``` + + +### See Also +- [TRANSPARENT](/reference/sharpmush-help/pennflag/#transparent) +- [@conformat](/reference/sharpmush-help/penncmd/#conformat) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@descformat](/reference/sharpmush-help/penncmd/#descformat) +## @HTTP +`@http <obj>/<attr>=<URL>` +`@http/delete <obj>/<att>=<URL>[,<data>]` +`@http/post <obj>/<att>=<URL>[,<data>]` +`@http/put <obj>/<att>=<URL>[,<data>]` + +Attempts to retrieve URL with a HTTP GET request, and upon doing so, queues the action list in `<obj>/<attr>`. The body of the reply from the remote web server is passed as %0, with the HTTP status in %q`<status>` and the Content-Type header in %q`<content-type>`. Any commas in the URL need to be escaped. + +The POST switch makes it do a HTTP POST request instead of the default GET, (And PUT and DELETE do the obvious). With these, the 'content-type' q-register controls the type of data; it defaults to 'application/x-www-form-urlencoded'.` If it contains the string "charset=utf-8", `<data>` will be converted to UTF-8, otherwise it is assumed to be Latin-1. + +If the q-register 'userpass' is set when running @http, it should hold a string of the form user:password and will be used if needed for HTTP authentication. + +Restricted to objects set Wizard or with the Can_HTTP @Power. + +Note: The response body has the same 8k limit as other MUSH strings. Anything longer is truncated; this command is best used with APIs that provide short responses. + + +### See Also +- [urlencode()](/reference/sharpmush-help/pennfunc/#urlencode) +- [urldecode()](/reference/sharpmush-help/pennfunc/#urldecode) +## @firstexit +`@firstexit <exit1>[, ... , <exitN>]` + +Normally, exits appear in a room's Obvious exits list in the order they were created, most recent first. You can use this command to rearrange them. @firstexit moves each exit, in the order given, to the top of the Obvious exits list for its source room. You must control the room. + +Example: +``` +> @dig/teleport Test Room +> @open Two ; @open Three ; @open One +> look +Test Room(#3Rn) +Obvious exits: +One, Three, and Two +> @firstexit two, one +> look +Test Room(#3Rn) +Obvious exits: +One, Two, and Three +``` + + +### See Also +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@link](/reference/sharpmush-help/penncmd/#link) +## @filter +`@filter <object>[=<pattern1>[, <pattern2>[, ..., <patternN>]]` + +The filter attribute is used in conjunction with the AUDIBLE flag. When set, sound which matches any of the comma-separated list of wildcard patterns in this attribute is not propagated through the audible object. + +@filter uses the type of matching described in HELP SWITCH WILDCARDS. + +If you need to use a comma in one of the patterns, put a \ before it, do not use {} curly braces. + +You can set the regexp flag on the filter attribute to use regular expressions instead of wildcard patterns, and can set the case flag to make the patterns case-sensitive. + +Sounds are only forwarded if the speaker also passes `<object>`'s @lock/filter, which receives the sound heard as %0. + +See [@filter2](/reference/sharpmush-help/penncmd/#filter2) for an example. + + +### See Also +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) +- [@infilter](/reference/sharpmush-help/penncmd/#infilter) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) +- [LISTENING](/reference/sharpmush-help/penntop/#listening) +- [@forwardlist](/reference/sharpmush-help/penncmd/#forwardlist) +- [@prefix](/reference/sharpmush-help/penncmd/#prefix) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## @filter2 +Example: +An audible exit leads from the room where Wizard is standing to another room where the puppet "Wiztoy" is standing. +``` +> @prefix exit=From inside, +> :tests. +Wizard tests. +Wiztoy> From inside, Wizard tests. +``` + +``` +> @filter exit=* jumps.,* tests. +> :jumps. +Wizard jumps. +> :tests. +Wizard tests. +``` + +``` +> :tests again. +Wizard tests again. +Wiztoy> From inside, Wizard tests again. +``` +## @find +`@find [<name>][=<begin>, <end>]` + +Displays the name and dbref of every room, thing, or player you control whose name matches `<name>`. If `<begin>` and `<end>` are given, @find will start at the `<begin>`th object in the database, and will not search past the `<end>`th object. + +You may wish to use the @search command instead, which can filter the results more complexly. + + +### See Also +- [@search](/reference/sharpmush-help/penncmd/#search) +- [lsearch()](/reference/sharpmush-help/pennfunc/#lsearch) +- [@entrances](/reference/sharpmush-help/penncmd/#entrances) +## @forwardlist +## forwardlist +`@forwardlist <object>[=<list of dbrefs>]` + +If `<object>` is set AUDIBLE, any sound it hears which passes its @filter and @lock/filter will be forwarded (prefixed with its @prefix) to each of the dbrefs given in its @forwardlist attribute, in much the same way as puppets forward sound to their owners. + +In order to forward to an object, you must either control it, have the pemit_all power, or pass its @lock/forward. (If you want to allow all objects you own to forward to you, regardless of whether or not they control you, use `@lock/forward me=$me`) + + +### See Also +- [@filter](/reference/sharpmush-help/penncmd/#filter) +- [@prefix](/reference/sharpmush-help/penncmd/#prefix) +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) +- [PUPPET](/reference/sharpmush-help/pennflag/#puppet) +- [@debugforwardlist](/reference/sharpmush-help/penncmd/#debugforwardlist) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +## @debugforwardlist +## debugforwardlist +`@debugforwardlist <object>[=<list of dbrefs>]` + +When `<object>` has an @debugforwardlist attribute set, any debug output it produces (either because it has the DEBUG flag set, or because an attribute with the DEBUG attribute flag is evaluated) is forwarded to all the dbrefs listed in the debugforwardlist. + +The @debugforwardlist must be a space-seperated list of dbrefs. In order to forward to an object, you must either control it, have the pemit_all power, or pass its @lock/forward. + + +### See Also +- [DEBUG](/reference/sharpmush-help/pennflag/#debug) +- [@forwardlist](/reference/sharpmush-help/penncmd/#forwardlist) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +## @force +`@force[/noeval][/inline] <object>=<action list>` + +This command forces `<object>` to queue the given action list, as if the object had entered the action list itself. You must control `<object>` to @force it. @force is useful for manipulating puppets. + +If `/inline` is given, `<object>` will run `<action list>` _now_, instead of being queued for execution later. By default, `<action list>` will be able to see/alter q-registers in the calling action list, and any @breaks in `<action list>` will also stop the calling action list. The following switches alter that behaviour: +- /nobreak: @breaks in `<action list>` will not stop the calling action list. +- /localize: q-registers will be saved before `<action list>` is run, and restored after. +- /clearregs: q-registers will all be reset before `<action list>` is run. You'll usually want to use /localize as well with this. + +`@force/inplace` is an alias for `@force/inline/nobreak/localize`. + +@force can be abbreviated as +`<dbref> <action list>` + +See [@force2](/reference/sharpmush-help/penncmd/#force2). +## @force2 +Normally, the action list is evaluated twice - once when @force is run, and again when `<object>` runs the action list. If the `/noeval` switch is given, `<action list>` is not evaluated until it is run by `<object>`. + +Examples: +``` +> @create Lackey +Created: Object #103 +> @force Lackey=go east +Lackey goes east. +Lackey has left. +> @force #103=page Cyclonus=Hi there! +Lackey pages: Hi there! +> #103 page Cyclonus=Whee +Lackey pages: Whee +``` + +See [@force3](/reference/sharpmush-help/penncmd/#force3). +## @force3 +Normally, @force creates a new queue entry. `@force/inline` does not. + +Examples: +``` +> @create Lackey +Created: Object #103 +> &order me=$order *:say Lackey, %0 ; @force Lackey=%0 ; say Done? +> order pose salutes! +You say, "Lackey, pose salutes!" +You say, "Done?" +Lackey salutes! +``` + +``` +> &order me=$order *:say Lackey, %0 ; @force/inline Lackey=%0 ; say Done? +> order pose salutes! +You say, "Lackey, pose salutes!" +Lackey salutes! +You say, "Done?" +``` + + +### See Also +- [PUPPET](/reference/sharpmush-help/pennflag/#puppet) +- [DBREF](/reference/sharpmush-help/pennconf/#dbref) +- [objeval()](/reference/sharpmush-help/pennfunc/#objeval) +## @flag +`@flag <flag name>` +`@flag/list [<flag name pattern>]` +`@flag/add <flag name>=[<letter>], [<type(s)>], [<setperms>], [<unsetperms>]` +`@flag/delete <flag name>` +`@flag/alias <flag name>=<alias>` +`@flag/letter <flag name>[=<letter>]` +`@flag/restrict <flag name>=[<setperms>], [<unsetperms>]` +`@flag/type <flag name>=<type(s)>` +`@flag/enable <flag name>` +`@flag/disable <flagname>` +`@flag/decompile [<pattern>]` + +This command manipulates the list of flags in the database. With no switches, the command displays information about the given flag, including aliases and permissions. `@flag/list` lists names of enabled flags, and may be given a wildcarded pattern to restrict which names it will show. + +All other switches to this command are restricted to God: +- /disable disables a flag, making it invisible and unusable +- /enable re-enables a disabled flag +- /alias adds a new alias for an existing flag; use !`<alias>` to delete one. +- /letter changes or removes a single-letter alias for an existing flag. +- /restrict changes flag permissions (see help @flag2) +- /type changes flag type(s) (see help @flag2) +- /delete deletes a flag completely, removing it from all objects in the database and then removing it permanently from the flag table. It requires the exact flag name or alias to be used. Be very very careful with this. +- /decompile prints out a list of @flag/add commands needed to recreate the flag table on another MUSH. If `<pattern>` is given, only flags whose names match that wildcard pattern are shown. + +See [@flag2](/reference/sharpmush-help/penncmd/#flag2) for information on `@flag/add`. + + +### See Also +- [FLAGS](/reference/sharpmush-help/pennflag/#flags) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [@power](/reference/sharpmush-help/penncmd/#power) +- [flag permissions](/reference/sharpmush-help/penncmd/#flag-permissions) +## @flag2 +`@flag/add` is used to add a new flag with the given name. Arguments other than the flag name are optional: + +`<letter>` gives the flag's one-letter abbreviation, which must not conflict with the one-letter abbreviation of another flag that could be applied to the same object type(s). It defaults to none, which means it won't appear in a list of flag characters but can still be tested for with hasflag(), andlflags(), and orlflags(). +`<type>` specifies the space-separated list of types to which the flag applies, and may be 'any' (the default) or one or more of 'room', 'thing', 'player', or 'exit'. +`<setperms>` specifies the space-separated list of permissions for who can set and/or see the flag. See [flag permissions](/reference/sharpmush-help/penncmd/#flag-permissions) for details. It defaults to 'any' +`<unsetperms>` specifies the space-separated list of permissions for who can clear the flag on an object they control. It defaults to whatever `<setperms>` is given, or 'any'. + +Flags added with `@flag/add` are saved with the database when it is dumped, and do not need to be re-added at startup. They are treated exactly as any other flag in the server. +## flag permissions +The following permissions can be used when specifying whether `<actor>` may set or clear a flag on an `<object>` they control: + +- trusted `<actor>` must pass a TRUST check (see help TRUST) +- royalty `<actor>` must be ROYALTY or WIZARD +- wizard `<actor>` must be WIZARD +- god `<actor>` must be God (#1) + +The following permissions can be used to specify whether `<looker>` can see the flag on an `<object>`, and are given along with the `<setperms>` in `@flag/add`. By default, anyone can see the flag: + +- dark `<actor>` must be Only God (#1) to see the flag on objects +- mdark `<actor>` must be WIZARD or ROYALTY +- odark `<actor>` must own the `<object>` (or be WIZARD or ROYALTY) + +The following permissions control other behavior related to the flag: + +log Log when the flag is set or cleared. Only meaningful in `<setperms>`. +event Trigger the OBJECT`FLAG event when this flag is set or cleared. Only meaningful in `<setperms>`. See [events](/reference/sharpmush-help/pennevents/#events) for more information. +## @function +`@function [<function name>]` +`@function[/preserve] <name>=<obj>, <attrib>[, <min args>, <max args>[, <restrictions>]]` +`@function <function name>=<object>/<attribute>` +`@function/<switch> <function name>` +`@function/restrict[/builtin] <function name>=<restrictions>` +`@function/alias <function name>=<alias>` +`@function/clone <function name>=<clone>` + +When used without any arguments, this command lists all global user-defined functions. For wizards and others with the Functions power, it also lists the dbref number and attribute corresponding to the listed functions. + +When used with a function name, it displays some information about how that function is parsed, and how many arguments it takes. + +`<switch>` can be one of: +- /disable, to disable a function. +- /enable, to re-enable it. +- /delete, to remove a user-defined or cloned function, or allow a built-in function to be overriden by a user-defined one. +- /restrict, to change the restriction flags on an existing function. + +`@function/alias` creates an alias for the built-in function `<function name>` so that it can also be called as `<alias>`. `@function/clone` creates a new copy of `<function name>` named `<clone>`, which works the same initially but can be restricted separately. You cannot alias or clone @functions, or alias cloned functions. + +Otherwise, this command defines a global function with the name `<function name>`, which evaluates to `<attribute>` on `<object>`. + +See [@function2](/reference/sharpmush-help/penncmd/#function2). +## @function2 +`<object>` can be anything that the player using the @function command controls (if safer_ufun is enabled) or can examine (if not). `<function name>` must be 30 characters or less. + +A function defined using @function works just like any of the normal MUSH functions, from the user's perspective. The functions are executed by the object, with its powers. + +Functions defined via @function should follow the format used by UFUN() - %0 is the first argument passed, %1 is the second argument passed, and so forth. Optional third and fourth arguments to @function can be used to set a parser-enforced number of arguments for the function. If the maximum arguments is negative, any additional arguments are treated as part of the text of the last argument. Note that this behaviour is deprecated, and will be removed in the near future. + +An optional fifth argument will set restriction flags. + +The `/preserve` switch, for MUX compability, does the same thing as the 'localize' restriction - treats the attribute that's evaluated as if it were called with ulocal() instead of u(). + +Example: +``` +> &WORD_CONCAT #10=%0 %1 +> say u(#10/word_concat, foo, bar) +You say, "foo bar" +``` + +``` +> @function word_concat=#10, word_concat +> say word_concat(foo,bar) +You say, "foo bar" +``` + +See [@function3](/reference/sharpmush-help/penncmd/#function3). +## @function3 +Global user-defined functions are not automatically loaded when the game is restarted. In order to avoid objects which attempt to use functions that have not been loaded, a @startup containing @function commands should be set on a wizard object with as low a dbref number as possible; God (#1) is suggested for this use. You can also create functions from the alias.cnf file. + +For example, if you have one object that stores all your global functions, you could set the following command (the object is #100 in the example): +``` +@startup #1=@dolist lattr(#100)=@function ##=#100,## +``` + +And then store each function as an attribute of the same name on object #100. + +See [@function4](/reference/sharpmush-help/penncmd/#function4). +## @function4 +Normally, built in functions cannot be overriden by @functions. However, if a built-in function is deleted with `@function/delete`, you can then make a @function with the same name. "Deleted" built-ins can still be called through the FN() function, and can have restrictions applied with `@function/restrict/builtin`. `@function/restore` will delete the @function and turn the built in version back on. + +Using @function on an already-added @function will delete the old one and install a new function with none of the settings of the old one kept. + +Example: +``` +> @function/delete ansi +> &ansi_fun #1234=%1 +> @function ansi=#1234, ansi_fun, 2, -2, noguest +``` + +This creates a new version of ansi() that doesn't do any colorization, and that needs two arguments, like the built-in version. It will be restricted to non-guest players. + + +### See Also +- [RESTRICT](/reference/sharpmush-help/penntop/#restrict) +- [FUNCTIONS](/reference/sharpmush-help/pennfunc/#functions) +- [@startup](/reference/sharpmush-help/penncmd/#startup) +- [fn()](/reference/sharpmush-help/pennfunc/#fn) +- [valid()](/reference/sharpmush-help/pennfunc/#valid) +## @grep +`@grep[/<switches>] <object>[/<attrs>]=<pattern>` + +@grep returns a list of all attributes on `<object>` which match `<pattern>`. If `<attrs>` is specified, only attributes which match the wildcard pattern `<attrs>` are checked; it defaults to "*". Use "**" for all attributes. + +By default, attributes which contain the string `<pattern>` are returned. However, if the `/wild` switch is given, `<pattern>` is treated as a wildcard pattern, and attributes which match the pattern are returned. If the `/regexp` switch is given, `<pattern>` is treated as a regular expression, and attributes matching the regexp are returned. Please note that `<pattern>` will NOT be evaluated, so you can easily grep for code strings. + +All matches are case-sensitive, unless the `/nocase` switch is given. + +@grep only shows a list of matching attributes. However, you can specify the `/print` switch, in which case attribute values are also shown, with the matching substrings ansi-highlighted if appropriate. + +If the `/parent` switch is given, attributes `<object>` inherits from its parent(s) will be checked as well. + +For backwards compatability, the `/list` switch provides the default behaviour of listing attributes without printing the values, and `/ilist` and `/iprint` are aliases for `/list/nocase` and `/print/nocase`. + + +### See Also +- [grep()](/reference/sharpmush-help/pennfunc/#grep) +- [wildgrep()](/reference/sharpmush-help/pennfunc/#wildgrep) +- [regrep()](/reference/sharpmush-help/pennfunc/#regrep) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## @halt +## @allhalt +`@halt[/noeval] <object>[=<action list>]` +`@halt/pid <pid>` +`@halt/all` +`@allhalt` + +The @halt command removes all queued actions for `<object>`. If given, `<action list>` is placed in the queue for the object instead. If no action list is specified, the object is set HALT. + +If `<object>` is a player, it clears the queue for the player and all of his objects. You can use "@halt me" to clear your own queue without setting yourself HALT. + +Only wizards and objects with the halt @power can @halt other player's objects. Note that halting an object does NOT affect any objects waiting on it as a semaphore. + +`@halt/pid` will cancel a single queue entry with the given pid (the number in parenthesis before it in @ps). You must control the object that queued the command or have the halt power to do this. + +`@halt/all` is a synonym for @allhalt, and is a wizard-only command which halts all objects in the game in an effort to free up the queue. + + +### See Also +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +- [@drain](/reference/sharpmush-help/penncmd/#drain) +- [@notify](/reference/sharpmush-help/penncmd/#notify) +## @haven +`@haven <player>[=<message>]` + +When someone attempts to page `<player>` and is unable to, either because `<player>` is set HAVEN or because of his page lock, they will be shown `<message>`, if it evaluates to something non-null. + +Example: +``` +> @set me=HAVEN +> @haven me=I'm AFK and can't answer pages. Please @mail instead. +``` + + +### See Also +- [HAVEN](/reference/sharpmush-help/pennflag/#haven) +- [page](/reference/sharpmush-help/penncmd/#page) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@away](/reference/sharpmush-help/penncmd/#away) +- [@idle](/reference/sharpmush-help/penncmd/#idle) +## @hide +`@hide[/<switch>] <descriptor>` +`@hide[/<switch>] [<player>]` + +This command allows players to hide their online status. Hidden connections don't show up on WHO, in lwho(), etc, when used by players without see_all. + +The first form of this command affects the single connection specified by `<descriptor>` (as returned by ports(), or shown on the admin WHO). The second affects all connections for the given `<player>`, or the enactor if no `<player>` is given. You must be a Wizard, Royalty, or have the Hide @power to affect your own connections; only Wizards can affect other players' connections. + +The `/on` and `/yes` switches hide connections, while `/off` and `/no` unhide connections. If no switch is given, the command acts as a toggle: for a single descriptor, the hide status is reversed. For a player, if all his connections are hidden, they will be unhidden. If any are unhidden, they will all be hidden. + + +### See Also +- [hidden()](/reference/sharpmush-help/pennfunc/#hidden) +- [WHO](/reference/sharpmush-help/penncmd/#who) +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +- [ports()](/reference/sharpmush-help/pennfunc/#ports) +## @idescribe +## @oidescribe +## @aidescribe +`@idescribe <object>[=<description>]` +`@oidescribe <object>[=<message>]` +`@aidescribe <object>[=<action list>]` + +@idescribe command sets the internal description for an object, which is shown to anyone who enters or looks while inside the object. It's only used for players and things; rooms and exits always use @describe. + +The @oidescribe attribute is shown to others inside `<object>` when someone looks at the @idescribe, and the @aidescribe is triggered when someone lookst at the @idescribe. + +If there is no IDESCRIBE set for an object, those who enter or look inside it will see its @describe. In this case, others in the object will see nothing, and the @aidescribe will not be triggered. If you want to use @aidescribe without @idescribe, set @idescribe to a blank string, or to u(describe) to show the description. + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [@enter](/reference/sharpmush-help/penncmd/#enter) +- [ENTER_OK](/reference/sharpmush-help/pennflag/#enterok) +- [@describe](/reference/sharpmush-help/penncmd/#describe) +- [look](/reference/sharpmush-help/penncmd/#look) +- [@idescformat](/reference/sharpmush-help/penncmd/#idescformat) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @hook +`@hook/<switch> <command>[=<object>[, <attribute>]]` +`@hook/list [<command>]` + +@hook makes the command parser evaluate given attributes at certain points in command evaluation. The possible points, indicated by the proper switch: + +- @hook/ignore: The attribute is evaluated before the built-in command is run. If it returns a false value, the command is skipped (the input is still matched against softcoded commands) +- @hook/override: The object/attribute is matched for a $-command, and if it matches, it is run instead of the built-in command, but with the precedence of the built-in command (thus overriding not only the built-in command but any local $-commands that might match). If the match fails, normal built-in command processing continues. Note that all locks and flags on the object (HALT, etc.) still apply. +- @hook/override/inline: Same as `@hook/override`, but the resulting matches are run immediately - not queued for later execution! +- @hook/before: The attribute is evaluated before the built-in command is run. +- @hook/after: The attribute is evaluated after the built-in command is run. +- @hook/extend: If an invalid switch is given to the command, attempt to run a matching $-command in `<object>[/<attribute>]` instead of giving an error. Allows extending built-in commands in softcode without having to rewrite the core functionality. +- @hook/extend/inline: As above, but the $-command won't be queued. + +See [@hook2](/reference/sharpmush-help/penncmd/#hook2). +## @hook2 +In all cases, %# is the dbref of the object doing the command, and all hooks share the same set of q-registers. With `/before` and `/after`, the results of the evaluated attribute is thrown away like it was wrapped in a call of null(). Also, in cases where a command and function do the same thing (e.g., @pemit and pemit()), only the command gets the hooks. + +A number of named registers are available in @hooks, accessible via `r(<name>, args)`, containing the arguments passed to the command. The exact registers available depend on the command type and the arguments passed; see [@hook7](/reference/sharpmush-help/penncmd/#hook7) for a description of all possible registers. + +Hooks can also be set in the alias.cnf file. + +Leaving out the object and attribute clears an existing hook. Wizards can see existing hooks with @command or `@hook/list`. + +See [@hook3](/reference/sharpmush-help/penncmd/#hook3) for more information about `@hook/override/inline`, [@hook4](/reference/sharpmush-help/penncmd/#hook4) for information on `@hook/extend`, [@hook5](/reference/sharpmush-help/penncmd/#hook5) for examples, and 'help @hook7' for an list of available named registers. +## @hook3 +`@hook/override/inline` and `@hook/extend/inline` allow you to write softcoded commands which act exactly like built-in commands - because they're run immediately, instead of being queued, output from the command appears in the right order relative to other commands in the action list. By default, commands hooked with `/inline` have access to the q-registers of the calling action list, and @breaks in the hooked command propagate to the calling action list, allowing you to write your own control structures. + +For example, this adds a new command, @qbreak, which works like @break but stops command execution when %q0 contains a true value: +``` +> &qbreak #123=$@qbreak: @break %q0=@pemit/silent %#=Stopping. +> @command/add @qbreak +> @hook/override/inline @qbreak=#123, qbreak +``` + +This behaviour can be altered by adding the following switches to `@hook/inline`: +- /nobreak: @breaks in the hooked command do not stop the calling action list from running +- /localize: q-registers are saved before the hooked command is run, and restored after it completes +- /clearregs: All q-registers are reset before the hooked command is run. Most useful when used with /localize. + +`@hook/inplace` is an alias for `@hook/inline/localize/clearregs/nobreak`. + +See [@hook6](/reference/sharpmush-help/penncmd/#hook6) for some examples of using `@hook/override/inline`. +## @hook4 +`@hook/extend` can be used to add new features to a built-in command, via additional switches, without forcing you to also rewrite the existing functionality like `@hook/override` would. For example: +``` +> &who`active #123=$who/active*: @nspemit %#=ufun(fun_who, lwho(%#), switch(%0, ?*, stringsecs(%0))) +> &who`staff #123=$who/staff: @nspemit %#=ufun(fun_who, setunion(lwho(%#), lsearch(all, elock, type^player&(flag^wizard|flag^royalty))) +> @hook/extend WHO=#123 +``` + +This leaves the built-in WHO command working as normal, but adds two new switches for filtering the output in different ways. + +`@hook/igswitch` is an alias for `@hook/extend`, for Rhost compatability. +## @hook5 +An example of @hook: +``` +> &top_line #3=pemit(%#, What follows is the results of a look) +> &bottom_line #3=pemit(%#, You're done looking.) +> @hook/before look=#3, top_line +> @hook/after look=#3, bottom_line +> look +What follows is the results of a look +Room Zero +You are in Room Zero. It's very dark here. +You're done looking. +``` + +``` +> &cmd.say #3=$say *: @remit %L=if(hasflag(%#,OOC),<OOC>%b)%n says, "%0" +> @hook/override say=#3, cmd.say +> @set me=OOC +> "test +<OOC> Robert says, "test" +``` + +See [@hook6](/reference/sharpmush-help/penncmd/#hook6) for /inplace examples. +## @hook6 +``` +> &dance me=$dance:pose sticks his right foot in ; say Do the hokey pokey ; pose sticks his right foot out +> dance +Walker sticks his right foot in +You say, "Do the hokey pokey" +Walker sticks his right foot out +``` + +``` +> &cmd.say #3=$say *:@remit %l=%n declares, "%0" +> @hook/override say=#3,cmd.say +> dance +Walker sticks his right foot in +Walker sticks his right foot out +Walker declares, "Do the hokey pokey" +``` + +``` +> @hook/override/inplace say=#3,cmd.say +> dance +Walker sticks his right foot in +Walker declares, "Do the hokey pokey" +Walker sticks his right foot out +``` +## @hook7 +The following named registers may be available (via `r(<name>,args)`) in your @hook, depending on the command hooked and the arguments given when run; use `registers(,args)` to get the available registers. `/before`, `/after` and `/ignore` hooks can also use the %u substitution to access the entire command string entered. + +| Register | Description | +| --- | --- | +| **Always available:** | | +| ARGS | The entire argument string, before evaluation. Always available. | +| LS | If the command doesn't have multiple left-side args, LS is set to the entire left-side arg (before the = for EQSPLIT commands) | +| LSAC | For commands with multiple left-side-args, the number of left-side args given | +| LSAx | The xth left-side-arg, where x is between 1 and LSAC | +| **Available for EQSPLIT commands:** | | +| EQUALS | If the = was given, this is set to "=" | +| RS | For commands without multiple right-side args, this is the entire right-side arg (after the =) | +| RSAC | For commands with multiple right-side-args, the number of right-side args given | +| RSAx | The xth right-side-arg, where x is between 1 and RSAC | +| **Available for SWITCHES commands (such as @lock):** | | +| SWITCHES | The switch string given. (Note: Currently, switches given to normal commands are not available here, but can be accessed via the %u substitution.) | +## HUH_COMMAND +This internal command is run whenever someone attempts to run a command which doesn't match any built-in or softcoded commands. The huh_command command cannot be run directly, but it can be @hook'd to perform custom actions when an invalid command is entered. + +Examples: +``` +> &cmd.huh #0=$huh_command: @pemit/sil %#=Whu? +> @hook/override huh_command=#0, cmd.huh +> dsfsdf +Whu? +``` + +``` +> &cmd.huh #0=$huh_command *: @pemit/sil %#=Whu? What is '%0'? +> sdfsdf ert +Whu? What is 'sdfsdf ert'? +``` + +``` +> &cmd.huh #0=$huh_command *: &typos %#=add(default(%#/typos,0),1) ; @pemit/sil %#=Huh? %b(Type "help" for help.) ; @break mod(get(%#/typos),10) ; @wall %n wins %p [ordinal(div(get(%#/typos),10))] typo trophy! +> asfdsf (10 times) +Huh? (Type "help" for help.) (10 times) +Announcement: Room Zero shouts, "Dunce wins his first typo trophy!" +``` + + +### See Also +- [@hook](/reference/sharpmush-help/penncmd/#hook) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +- [warn_on_missing](/reference/sharpmush-help/penncmd/#warnonmissing) +- [unimplemented_command](/reference/sharpmush-help/penncmd/#unimplementedcommand) +## @idle +`@idle <player>[=<message>]` + +This message is sent in return to every page which successfully reaches you if it evaluates non-null. It is useful if you are idle for long periods of time and wish to inform people where you are, or if you are in a meeting and cannot quickly return pages. + +Example: +``` +> @idle me=switch(idle(me),>120,I'm idle. Use @mail) +``` + +Players paging me will only see the "I'm idle" message if I've been idle for over 2 minutes (120 seconds). + + +### See Also +- [@away](/reference/sharpmush-help/penncmd/#away) +- [@haven](/reference/sharpmush-help/penncmd/#haven) +## @if +## @ifelse +## @skip +`@if <boolean>=<true>[, <false>]` +`@skip <boolean>=<false>` + +If `<boolean>` is true, the action list `<true>` is run, otherwise the action list `<false>` is run. The action list is not queued, it is run immediately, in the same action list as @if. + +For RhostMUSH compatability, @skip runs the action list `<false>` when `<boolean>` is false, and does nothing for true values. + +@ifelse and `@skip/ifelse` are aliases for @if. + +See [@if2](/reference/sharpmush-help/penncmd/#if2) for examples. + +### See Also +- [@break](/reference/sharpmush-help/penncmd/#break) +- [@switch](/reference/sharpmush-help/penncmd/#switch) +- [if()](/reference/sharpmush-help/pennfunc/#if) +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +## @if2 +Examples: +``` +> @if 1=say Yes, say No +You say, "Yes" +``` + +``` +> @if 0=say Yes, say No +You say, "No" +``` + +``` +> &foo me=$foo *: say Checking... ; @if %0=say Yes, {say No ; say Sorry!} +``` + +``` +> foo 1 +You say, "Checking..." +You say, "Yes" +``` + +``` +> foo 0 +You say, "Checking..." +You say, "No" +You say, "Sorry!" +``` +## @infilter +`@infilter <object>[=<pattern 1>[, <pattern 2>[, ..., <pattern N>]]]` + +@infilter is meant to be used on objects that have an @listen of "*" (ie, objects that listen to everything, which is commonly used for things like chairs so that someone inside the object can hear everything said/done outside it). @infilter filters out any messages that match one of the patterns and prevents those inside the object from hearing them. It does not stop the @ahear of the listening object from being triggered by things that match the @listen. + +Sounds are only forwarded if the speaker also passes `<object>`'s @lock/infilter, which receives the sound heard as %0. + +For an explanation of infilter patterns, see the help for "@filter". + + +### See Also +- [@filter](/reference/sharpmush-help/penncmd/#filter) +- [@listen](/reference/sharpmush-help/penncmd/#listen) +- [@inprefix](/reference/sharpmush-help/penncmd/#inprefix) +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) +- [LISTENING](/reference/sharpmush-help/penntop/#listening) +## @inprefix +`@inprefix <object>[=<message>]` + +When an object has an @listen, any string it hears which is propagated to its contents will be prefixed with `<message>`. Useful for vehicles, etc, which have an @listen of "*". + +Example: +``` +> @create Vehicle +Created: Object #103. +> @create Test +Created: Object #104. +> @inprefix Vehicle=From outside, +> @listen Vehicle=* +> enter Vehicle +> @force #104=:bounces. +From outside, Test bounces. +``` + + +### See Also +- [@prefix](/reference/sharpmush-help/penncmd/#prefix) +- [@listen](/reference/sharpmush-help/penncmd/#listen) +- [@infilter](/reference/sharpmush-help/penncmd/#infilter) +## @kick +`@kick <number>` + +This wizard-only command forces the immediate execution of `<number>` items from the queue. Rarely useful. If your MUSH is lagging badly, chances are high that it stems from network problems. Check the queue before using this command. + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [QUEUE](/reference/sharpmush-help/penntop/#queue) +## @lemit +`@lemit[/<switch>] <message>` + +Emits a message to the outermost container object. For example, if you are carrying a bird, and are inside a vehicle which is in room #10, and you force the bird to @lemit "Cheep", everyone in room #10 will hear "Cheep". This command is the same as "@emit/room". + +With the `/silent` switch, no confirmation message is shown. With `/noisy`, it is. If neither is given, the silent_pemit option determines if it is shown. +The `/noeval` switch prevents `<message>` from being evaluated. +The `/spoof` switch causes nospoof notifications to show the enactor's dbref instead of the executor's dbref, and requires control over the enactor or the Can_spoof power. + + +### See Also +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [@nslemit](/reference/sharpmush-help/penncmd/#nslemit) +## @list +`@list/<switch>` +`@list[/lowercase] <switch>` + +The @list command lists useful MUSH information. + +Switches include: +- motd : Alias for @listmotd, shows current messages of the day. +- functions : Lists all built-in functions and @functions. +- commands : Lists all built-in commands and @commands. +- attribs : Lists all standard attributes. +- locks : Lists the built-in lock types. +- flags : Alias for @flag/list, shows all flags. +- powers : Alias for @powers/list, shows all powers. +- allocations : Information about memory allocations. Admin-only. + +By default, information is shown in upper-case. Add the `/lowercase` switch to show output in lowercase instead. + +"commands" and "functions" show built-in and local commands/functions by default. The `/builtin` or `/local` switches can be given to limit this. + + +### See Also +- [list()](/reference/sharpmush-help/pennfunc/#list) +- [@config](/reference/sharpmush-help/penncmd/#config) +- [config()](/reference/sharpmush-help/pennfunc/#config) +- [functions()](/reference/sharpmush-help/pennfunc/#functions) +- [@stats](/reference/sharpmush-help/penncmd/#stats) +- [@command](/reference/sharpmush-help/penncmd/#command) +- [@function](/reference/sharpmush-help/penncmd/#function) +- [@flag](/reference/sharpmush-help/penncmd/#flag) +- [@power](/reference/sharpmush-help/penncmd/#power) +- [@attribute](/reference/sharpmush-help/penncmd/#attribute) +- [@listmotd](/reference/sharpmush-help/penncmd/#listmotd) +- [@motd](/reference/sharpmush-help/penncmd/#motd) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +## @link +`@link[/preserve] <object>=[<dbref> | here | home | variable]` + +Links `<object>` to either a room or a thing. If a thing or player is linked, that sets the object's HOME. If a room is linked, that sets the object's drop-to room, which is where objects that are dropped in the room will be sent to. + +Most often, @link is used to link or relink an exit to a destination room. In order to link an exit to a room, you must either own or control the room, OR the room must be set LINK_OK. If the exit is currently unlinked, and you pass its @lock/link, you may link it even if you do not own it. In this case, the exit will be @chowned to you (and set HALT). Linking an exit may have a cost (usually 1 penny.) The Wizard-only `/preserve` switch can be used to link without @chowning and HALTing the exit. + +If the destination of an exit is "variable", its destination is determined at the time of travel by the attribute DESTINATION on the exit, which is evaluated like a U()-function. You must have permission to link to whatever the DESTINATION evaluates to in order for the exit to work. If there's no DESTINATION attribute, the EXITTO attribute is also tried. + +If the destination is "home", those who travel through the exit will be sent to their homes. + +LINK_OK objects can also be used as semaphores, and any object can be @parented to them. + + +### See Also +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [DROP-TO](/reference/sharpmush-help/pennconf/#drop-to) +- [HOME](/reference/sharpmush-help/penntop/#home) +## @destination +## @exitto +## Variable Exits +`@destination <exit>[=<destination>]` +`@exitto <exit>[=<destination>]` + +The DESTINATION attribute is used by variable exits. To make a variable exit, you create it in the usual way (with @open), then @link it to "variable" instead of a dbref. When someone attempts to pass through the exit, the DESTINATION attribute will be evaluated, and should return a dbref; the dbref will be used as the location for the person to go to. The exit name or alias the moving player used is passed to the attribute as %0. + +The exit must be able to @link itself to the dbref returned by the attribute. This means the exit must control the destination, the destination must be set LINK_OK, or the exit must have the Link_Anywhere @power. + +If no DESTINATION attribute is set on a variable exit, the MUSH will also check for an EXITTO attribute, for cross-platform compatability. It works exactly the same as the DESTINATION attribute. + +Note that, unlike most attributes, @destination cannot be abbreviated and must be typed in full. + +Example: +``` +> @open Random Exit;re +> @link re=variable +> @power re=link_anywhere +> @destination re=pickrand(#5 #123 #999 [home(%#)] %L) +``` + + +### See Also +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) +- [Link_Anywhere Power](/reference/sharpmush-help/pennconf/#linkanywhere-power) +## @listen +`@listen <object>[=<pattern>]` + +Sets the object's listen pattern to `<pattern>`, which can have wildcards. Whenever something the object hears matches the pattern, the object's ahear/amhear/aahear attribute will be triggered. In addition, anything inside the object will hear it as well, if the speaker passes @lock/infilter. + +Rather than using @listen, it's recommended you use ^-listening patterns, which can be set in any attribute similar to $-commands. This allows for descriptive attribute names, and also allows multiple patterns per object. See [^] for more information. + +For example: +``` +> @listen Chair=* +``` +Since the wildcard (*) matches anything, anyone inside the object will hear anything said outside it. +``` +> @listen Butler=* has arrived. +> @ahear Butler=:walks over to the new arrival and takes %p coat. +``` +In this case, the listen pattern is met whenever someone 'arrives' in the room, and then the object does whatever is inside its @ahear attribute. +``` +Cyclonus has arrived. +Butler walks over to the new arrival and takes his coat. +``` + +See [@listen2](/reference/sharpmush-help/penncmd/#listen2). +## @listen2 +An object "hears" anything that another player standing in the same room would hear. For example, if you type in a command, the object does NOT hear it. If the command has a result that people in the room hear, the object will hear it. + +For example: +``` +> @listen Recorder=@emit * +> @ahear Recorder=:records %0 +> @emit Whee! +Whee! +``` +In this example, the Recorder's listen-pattern is NOT matched, because it doesn't hear the '@emit Whee!', it only hears the 'Whee!' part, which doesn't match. +``` +> @listen Recorder=Cyclonus says, "*" +> say Whee! +Cyclonus says, "Whee!" +Recorder records: Whee! +``` + + +### See Also +- [LISTENING](/reference/sharpmush-help/penntop/#listening) +- [@ahear](/reference/sharpmush-help/penncmd/#ahear) +- [@amhear](/reference/sharpmush-help/penncmd/#amhear) +- [@aahear](/reference/sharpmush-help/penncmd/#aahear) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## LOCKING +## LOCKS +## @lock +`@lock[/<switch>] <object>=<key>` + +This command "locks" the object, specifying a key which determines who or what can do certain things with the object. There are many different types of locks, all of which are described in [locktypes](/reference/sharpmush-help/pennlock/#locktypes) and which are designated by the switch. The "basic" lock determines, for players and things, who can pick them up. For exits, it determines who can go through the exit. All other locks can be set the same way as the basic lock. + +Whenever you "pass" the basic lock, you succeed in doing something with the object. This triggers the @success/@osuccess/@asuccess messages and actions. If you fail to pass the basic lock, you trigger the @failure/@ofailure/@afailure messages and actions. Other locktypes may also have such success/failure messages: see [failure](/reference/sharpmush-help/penntop/#failure) for info. + +Just like attributes, locks can be inherited from parents. By default, locks are set no_inherit, but this flag can be cleared using @lset. More details and a list of flags can be found in [@lset](/reference/sharpmush-help/penncmd/#lset). + +A listing of lock types, such as pagelocks, look at [locktypes](/reference/sharpmush-help/pennlock/#locktypes). For the available key types, such as how to check an attribute on an object trying to pass a lock, see [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys). + + +### See Also +- [@lock-simple](/reference/sharpmush-help/pennlock/#lock-simple) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys) +- [@clock](/reference/sharpmush-help/pennchat/#clock) +- [failure](/reference/sharpmush-help/penntop/#failure) +- [success](/reference/sharpmush-help/penntop/#success) +- [elock()](/reference/sharpmush-help/pennfunc/#elock) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [@lset](/reference/sharpmush-help/penncmd/#lset) +- [@clock](/reference/sharpmush-help/pennchat/#clock) +- [testlock()](/reference/sharpmush-help/pennfunc/#testlock) +- [locks()](/reference/sharpmush-help/pennfunc/#locks) +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +- [clock()](/reference/sharpmush-help/pennfunc/#clock) +- [llocks()](/reference/sharpmush-help/pennfunc/#llocks) +## @lset +`@lset <object>/<lock type>=[!]<flag>` + +This commands sets or clears flags on locks. +Valid flags include: + +- visual (v) This lock can be seen even if the object it's on isn't visual. +- no_inherit (i) This lock isn't inherited off of parents. All locks are set no_inherit by default. +- no_clone (c) This lock isn't copied by @clone. +- wizard (w) This lock can only be set by wizards. +- locked (+) This lock can only be set by the owner of the lock. + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +## @log +`@log[/<switch>] <message>` +`@log/recall/<switch> [<number>]` + +This wizard-only command puts `<message>` in a log file, tagged with the time and object executing the command. The available switches are /check, /cmd, /conn, /err, /trace, and /wiz, specifying which file to log to. /cmd is default. + +Adding the `/recall` switch will display the last `<number>` lines written to that log file, or the entire log buffer (Which is the last 1 kilobyte or so of data written to the log) if omitted. + + +### See Also +- [@logwipe](/reference/sharpmush-help/penncmd/#logwipe) +## @logwipe +`@logwipe/<log>[/<switch>] <password>` + +This God-only command erases one of the MUSH logs. + +`<log>` specifies which log file to erase, and must be one of: +/check, /cmd, /conn, /err (Default), /trace, and /wiz. + +The default policy of erasing a log can be changed by giving one of the following switches: + +- /rotate : copies the log to a backup file and then erases it. +- /trim : deletes all but the most recent lines in the file. +- /wipe : erases the file (Default) + +God must give the log wipe password from the MUSH's configuration file to use this command. + + +### See Also +- [@log](/reference/sharpmush-help/penncmd/#log) +## @message +`@message[/<switches>] <recipients>=<defmsg>,[<obj>/]<attr>[,<arg0>[, ... , <arg29>]]]` + +@message is designed for the use of *format messages, such as @pageformat or @chatformat. It is intended for use with @hooking page, @chat, or say/pose/emit, or for coding language systems. + +For each of the given `<recipients>`, `<obj>/<attr>` is evaluated (with up to 30 arguments, as if it was ufun()'d), and the object is shown the result via @pemit. If the attribute does not exist, or you do not have permission to evaluate it, they are shown `<defmsg>` instead. + +If `<obj>` is not given, or is given as "#-2", the attribute will be checked on the recipient. + +If one of the arguments matches "##", it will be replaced with the dbref of the recipient. + +Switches: +- /noeval -- none of @message's arguments will be evaluated +- /spoof -- the message will appear to be from the enactor, not the executor. Requires the Can_Spoof @power +- /remit -- works like @remit, treating `<recipients>` as a list of rooms to send the message to +- /oemit -- works like @oemit, with `<recipients>` as a list of objects not to emit to. See [@oemit](/reference/sharpmush-help/penncmd/#oemit) for more info +- /nospoof -- don't show nospoof info, as per @nspemit/@nsremit/@nsoemit +- /silent -- don't show a confirmation message +- /noisy -- show a confirmation message; default depends on the silent_pemit @config option + +See [@message2](/reference/sharpmush-help/penncmd/#message2) for examples. + +### See Also +- [message()](/reference/sharpmush-help/pennfunc/#message) +- [@chatformat](/reference/sharpmush-help/pennchat/#chatformat) +- [@pageformat](/reference/sharpmush-help/penncmd/#pageformat) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [speak()](/reference/sharpmush-help/pennfunc/#speak) +## @message2 +Example: +``` +> &sayformat *Mike=%n sez, '%0' +> &sayformat *Walker=From %n: %0 +> &cmd.fsay me=$fsay *: @message/spoof *Mike *Walker *Javelin=%n says\, "%0", SAYFORMAT, %0 +> fsay This is a test +``` + +Mike sees: +``` +Player sez, 'This is a test' +``` +Walker sees: +``` +From Player: This is a test +``` +Javelin sees: +``` +Player says, "This is a test" +``` + +A rough implementation of @chatformat: +``` +> &cmd.chat Globals=$^@chat (.+?)=([\:;]?)(.+?)$: @message/spoof cwho(%1)=setr(0,<%1> [speak(&[squish(ctitle(%1, %#) %n)], %2%3)]), CHATFORMAT, firstof(%2, "), %1, %3, %n, ctitle(%1, %#), %q0 +> @set Globals/cmd.chat=regexp +``` + +See [@message3](/reference/sharpmush-help/penncmd/#message3) for more examples. +## @message3 +A (very) basic language system: +``` +> &skill`spanish Juan=2 +> &skill`spanish Bob=1 +> &cmd.spanish Globals=$+spanish *: @nspemit %#=You say (Spanish), "%0"; @message/oemit/spoof %#=setr(0,%n says (Spanish)\, "%0"), %!/TRANSLATE, ##, SPANISH, %q0 +> &translate Globals=switch(default(%0/skill`%1, 2), 2, %2, speak(%#, |%2,, %!/translate`some)) +> &translate`some Globals="[iter(%0,if(rand(2),%i0,...))]" +> +spanish The rain in Spain falls mainly on the plain +``` + +You see: +``` +You say (Spanish), "The rain in Spain falls mainly on the plain" +``` +Bob sees (something like): +``` +Mike says (Spanish), "The rain ... ... falls ... ... ... ..." +``` +Juan sees: +``` +Mike says (Spanish), "The rain in Spain falls mainly on the plain" +``` +## @moniker +`@moniker <object>[=<moniker>]` + +This command sets or clears the "moniker" for `<object>`. A moniker is an ansi template, to show the object's name in color. Exactly where this color is displayed depends on the "monikers" @config option; see [monikers](/reference/sharpmush-help/penntop/#monikers) for more information. + +`<moniker>` can contain any text - it will be ignored, and only the ansi colors will be taken into account. If `<object>`'s name is longer than `<moniker>`, the last color will be used for the remaining letters. + +Examples: +Display your name in highligted red +``` +> @moniker me=ansi(hr,-) +``` + +Show the first letter in orange, and the rest with no color +``` +> @moniker me=ansi(+orange,-)[ansi(n,-)] +``` + + +### See Also +- [MONIKERS](/reference/sharpmush-help/penntop/#monikers) +- [moniker()](/reference/sharpmush-help/pennfunc/#moniker) +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@nameaccent](/reference/sharpmush-help/penncmd/#nameaccent) +- [MONIKER](/reference/sharpmush-help/pennconf/#moniker) +## @motd +## @listmotd +## @wizmotd +## @rejectmotd +`@motd[/<type>] <message>` +`@motd/clear[/<type>]` +`@motd/list` + +This command is used for manipulating the various Messages of the Day, or MotD. The first form of this command sets the `<type>` MotD to `<message>`, the second form clears the `<type>` MotD, and the third form lists the current value of each MotD. If no switch is given, `<type>` defaults to /connect. + +These messages are intended for temporary announcements; the given `<message>` is shown in addition to the standard MotDs defined in the mush.cnf options. MotDs set via this command are cleared when the MUSH restarts. + +| Valid `<type>` | shown with.. | and is seen by... | +| --- | --- | --- | +| /connect | motd_file | all players on connect | +| /wizard | wizmotd_file | connecting Wizards and Royalty | +| /full | full_file | players failing to connect because all available connections are in use | +| /down | down_file | mortals failing to connect when logins are disabled | + +You must have the Announce @power to change the Connect MotD; only wizards and royalty can see or alter the others. + +For historical reasons, @listmotd, @wizmotd and @rejectmotd are aliases for `@motd/list`, `@motd/wizard` and `@motd/full`, respectively. +## @name +`@name <object>=<new name>` +`@name <player|exit>=<new name>[;<alias1>[;<aliasN>]]` + +Changes the name of `<object>` to `<new name>`. + +Players can change their name to anything valid which is not currently in use by another player, as a name or alias. (They can change their name to something from their own @alias.) + +You can change the alias for a player or exit while renaming it, by giving the alias(es) after the new name, each separated by a semicolon. If the name is followed by a semicolon with no aliases, the existing alias will be cleared instead. + +When `<object>`'s name is changed, its ONAME and ANAME verb attributes will be triggered. See [@oname](/reference/sharpmush-help/penncmd/#oname) for details. + +Examples: +``` +> @name here=My Room +Name set. +> @name me=Mike;Michael;m +Alias set. +Name set. +> @name me=Obi Wan; +Alias removed. +Name set. +``` + + +### See Also +- [@alias](/reference/sharpmush-help/penncmd/#alias) +- [@oname](/reference/sharpmush-help/penncmd/#oname) +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [fullname()](/reference/sharpmush-help/pennfunc/#fullname) +Config options: player_name_spaces, player_name_len, only_ascii_in_names +## @ONAME +## @ANAME +`@oname <object>[=<message>]` +`@aname <object>[=<action list>]` + +Whenever `<object>`'s name is changed (via @name), others in the same location will see the contents of `<object>`'s ONAME attribute, prepended with `<object>`'s new name. At the same time, `<object>`'s ANAME attribute will be triggered. Both attributes receive the old name as %0, and the new name as %1. + +Example: +``` +> @oname me=has regenerated from %0! +> @aname me=think >> Renamed from %0 to %1 at [time()] by %n(%#). +``` + + +### See Also +- [@name](/reference/sharpmush-help/penncmd/#name) +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @newpassword +`@newpassword <player>=<password>` +`@newpassword/generate <player>` + +This wizard-only command changes `<player>`'s password. If `<player>` is connected, she will be informed that the password was changed and who by, but not what it was changed to. + +The `<player>` argument is evaluated, but the `<password>` argument is not when the command is entered directly from a client. + +If the `/generate` switch is given, a new, random password is generated automatically, and shown to the enactor (but not to `<player>`). +The `<password>` must not contain whitespace, unprintable characters, or '='. + + +### See Also +- [@password](/reference/sharpmush-help/penncmd/#password) +- [checkpass()](/reference/sharpmush-help/pennfunc/#checkpass) +## @notify +`@notify[/any][/all] <object>[/<attribute>][=<number>]` +`@notify/setq <object>[/<attribute>]=<qreg1>,<qval1>[,...]` + +This command notifies a semaphore, allowing commands queued for that semaphore to be executed. + +If the `/any` switch is given, then all semaphores associated with `<object>` are @notified. Otherwise, only the specified semaphore `<attribute>` (or SEMAPHORE if no attribute is specified) is @notified. + +If the `/all` switch is given, then all queue entries associated with the selected semaphore(s) are executed. Otherwise, only the first `<number>` of queue entries are run. If no `<number>` is given, then only one queue entry is run. + +If the `/all` switch was not used, and there were not enough queue entries waiting to satisfy the requested `<number>`, then the semaphore becomes negative, and subsequent @waits will not block until it reaches 0 again. + +You may not specify both the `/any` switch and a specific attribute. Similarly, you may not specify both the `/all` switch and a number. + +See [@notify2](/reference/sharpmush-help/penncmd/#notify2). +## @notify2 +`@notify/setq` is a special form of @notify: It requires that a queue entry exists and is waiting on `<object>[/<attr>]`. When this is the case, then `@notify/setq` will modify the Q-registers of the extant queue entry. + +`/setq` supercedes all other switches: You cannot `@notify/all/setq` or `@notify/any/setq` - it deals with just one queue entry. + +Example: +``` +> @wait me=think Hello, %q0! +> @notify/setq me=0,Walker +Hello, Walker! +``` + + +### See Also +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +- [@drain](/reference/sharpmush-help/penncmd/#drain) +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [@halt](/reference/sharpmush-help/penncmd/#halt) +## @nspemit +## @nsemit +## @nslemit +## @nsremit +## @nszemit +## @nsoemit +## @nsprompt +`@nsemit[/<switch>] [<message>]` +`@nslemit[/<switch>] <message>` +`@nspemit[/switches] <object>=<message>` +`@nsprompt[/switches] <object>=<message>` +`@nsremit[/switches] <object>=<message>` +`@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>` +`@nszemit <zone>=<message>` + +These commands work like @emit, @lemit, @pemit, @prompt, @remit, @oemit, and @zemit, respectively, but will not include nospoof information if used by Wizards or someone with the Can_spoof @power. They are meant to be used by commands in the master room where the nospoof information is just useless noise. They take the same switches as their respective commands, with a few exceptions (`/spoof`, and for @nspemit, `/contents` and the admin-only `/port`). + + +### See Also +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@lemit](/reference/sharpmush-help/penncmd/#lemit) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@prompt](/reference/sharpmush-help/penncmd/#prompt) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [@zemit](/reference/sharpmush-help/penncmd/#zemit) +- [nsemit()](/reference/sharpmush-help/pennfunc/#nsemit) +- [nslemit()](/reference/sharpmush-help/pennfunc/#nslemit) +- [nspemit()](/reference/sharpmush-help/pennfunc/#nspemit) +- [nsprompt()](/reference/sharpmush-help/pennfunc/#nsprompt) +- [nsremit()](/reference/sharpmush-help/pennfunc/#nsremit) +- [nsoemit()](/reference/sharpmush-help/pennfunc/#nsoemit) +- [nszemit()](/reference/sharpmush-help/pennfunc/#nszemit) +- [PROMPT_NEWLINES](/reference/sharpmush-help/penncmd/#promptnewlines) +## @oemit +`@oemit[/<switch>] [<room>/]<object> [... <object>]=<message>` + +This command shows `<message>` to everyone in the location of `<object>` EXCEPT `<object>`. A list of objects can be given, in which case the message is shown in the locations of each, to everyone but those objects. If `<object>` contains a space, it should be enclosed in double-quotes. + +If `<room>` is specified (usually as a dbref), this command shows `<message>` to everyone in `<room>` except for the given `<object>`s. In this case, each `<object>` is matched relative to `<room>`. If no matching `<object>`s are found in `<room>`, this is the equivilent of `@remit <room>=<message>`. + +The `/noeval` switch prevents the MUSH from evaluating `<message>`. +The `/spoof` switch causes nospoof notifications to show the enactor's dbref instead of the executor's dbref, and requires control over the enactor or the Can_spoof power. + +See [@oemit2](/reference/sharpmush-help/penncmd/#oemit2) for examples. + +### See Also +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@nsoemit](/reference/sharpmush-help/penncmd/#nsoemit) +- [oemit()](/reference/sharpmush-help/pennfunc/#oemit) +- [nsoemit()](/reference/sharpmush-help/pennfunc/#nsoemit) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [SPOOFING](/reference/sharpmush-help/penntop/#spoofing) +## @oemit2 +Examples: +Show a message in the locations of players Bob and Fred, to everyone except those two players: +``` +> @oemit *Bob *Fred=Bob throws a paper aeroplane at Fred. +``` + +Show a message in #50 to everyone except the object 'Spy'. +``` +> @oemit #50/Spy=Sssh! +``` + +Show a message to everyone in your current location, except the 2nd object called 'foo'. +``` +> @oemit %L/"2nd foo"=bar +``` +## @open +`@open <exit name>[=<destination>,<return exit name>,<source room>,<dbref>,<return dbref>]` + +This command opens an exit, named `<exit name>`, in your current location, or in `<source room>` if one is given. Exits can only be opened from rooms. If a `<destination>` is given, the exit will be linked (as per @link) to that object. If you don't have permission to link to `<destination>`, the exit will be created but unlinked. + +If `<return exit name>` is given, the MUSH will attempt to open an exit back from `<destination>` and link it to `<exit name>`'s source. + +Both `<exit name>` and `<return exit name>` can include any number of aliases for the exits, separated by semicolons. See [@name](/reference/sharpmush-help/penncmd/#name) for details. + +Wizards and objects with the pick_dbref power can specify garbage dbrefs to use for the exit and return exit. + +To open an exit in a room, you must control the room, have the Open_Anywhere @power, or the room must be set OPEN_OK and you must pass its @lock/open. + +Example: +``` +> @open Up <U>;up;u;climb=#255, Down <D>;down;d;fall +``` + + +### See Also +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [open()](/reference/sharpmush-help/pennfunc/#open) +## @parent +`@parent <object>[=<parent>]` + +This command sets the parent of `<object>` to `<parent>`. If no `<parent>` is given, or `<parent>` is "none", `<object>`'s parent is cleared. You must control `<object>`, and must either control `<parent>` or it must be set LINK_OK and you must pass its @lock/parent. + + +### See Also +- [PARENTS](/reference/sharpmush-help/penntop/#parents) +- [parent()](/reference/sharpmush-help/pennfunc/#parent) +- [lparent()](/reference/sharpmush-help/pennfunc/#lparent) +- [ANCESTORS](/reference/sharpmush-help/penntop/#ancestors) +## @password +`@password <old password>=<new password>` + +This changes your password. Please note that passwords ARE case-sensitive. The arguments are not evaluated. +The `<new password>` must not contain whitespace, unprintable characters, or '='. + + +### See Also +- [@newpassword](/reference/sharpmush-help/penncmd/#newpassword) +- [checkpass()](/reference/sharpmush-help/pennfunc/#checkpass) +## @pageformat +## @outpageformat +`@outpageformat <object>[=<message>]` +`@pageformat <object>[=<message>]` + +`@pageformat` changes the message seen by `<object>` when it receives a page. +`@outpageformat` sets the message seen by `<object>` when it sends a page. + +%0 will be set to the page message (not including :, ; or "). +%1 will be set to ':' ';' or '"' for pose, semipose and normal page, respectively. +%2 will be set to the alias of the pager, if any. +%3 will be a space-separated list of recipient dbrefs. +%4 will be set to the default message. + +See [@pageformat2](/reference/sharpmush-help/penncmd/#pageformat2) for examples. + + +### See Also +- [page](/reference/sharpmush-help/penncmd/#page) +- [speak()](/reference/sharpmush-help/pennfunc/#speak) +- [@chatformat](/reference/sharpmush-help/pennchat/#chatformat) +- [@speechmod](/reference/sharpmush-help/penncmd/#speechmod) +- [@message](/reference/sharpmush-help/penncmd/#message) +## @pageformat2 +## @outpageformat2 +For simple page timestamps: +``` +> @pageformat me=\[[time()]\] %4 +> @outpageformat me=\[[time()]\] %4 +``` + +To obtain 'page_aliases' behavior: +``` +> @pageformat me=[setq(0,%n[if(%2,%b(%2))],1,switch(%3,%!,,itemize(iter(%3, name(##),%b,|),|)))][switch(%1,",%q0 pages[if(%q1,%b%q1)]: %0,:,From afar[if(%q1,%b(to %q1))]\, %q0 %0,From afar[if(%q1,%b(to %q1))]\, %q0%0)] +``` + +To obtain no 'page_aliases' behavior: +``` +> @pageformat me=[setq(1,switch(%3,%!,,itemize(iter(%3,name(##),%b,|),|)))][switch(%1,",%n pages[if(%q1,%b%q1)]: %0,:,From afar[if(%q1,%b(to %q1))]\, %n %0,From afar[if(%q1,%b(to %q1))]\, %n%0)] +``` +## @receive +## @oreceive +## @areceive +`@receive <recipient>[=<message>]` +`@oreceive <recipient>[=<message>]` +`@areceive <recipient>[=<action list>]` + +These attributes contain the message shown `<recipient>` when he receives an object (via 'get' or 'give'), the message shown to others in `<recipient>`'s location when he receives an object, and the actions to be taken by `<recipient>` when he receives an object, respectively. + +In all cases, %0 is the dbref of the object received. If the object was 'give'n, %1 will be the dbref of the giver. + + +### See Also +- [give](/reference/sharpmush-help/penncmd/#give) +- [get](/reference/sharpmush-help/penncmd/#get) +- [@give](/reference/sharpmush-help/penncmd/#give) +- [@success](/reference/sharpmush-help/penncmd/#success) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @give +## @ogive +## @agive +`@give <giver>[=<message>]` +`@ogive <giver>[=<message>]` +`@agive <giver>[=<action list>]` + +These attributes contain the message shown to `<giver>` when he gives an object, the message shown to others in `<giver>`'s location when he gives an object, and the actions to be taken by `<giver>` when he gives an object, respectively. + +In all cases, %0 is the dbref of the object being given, and %1 is the dbref of the recipient. + + +### See Also +- [give](/reference/sharpmush-help/penncmd/#give) +- [@receive](/reference/sharpmush-help/penncmd/#receive) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @pcreate +`@pcreate <name>=<password>[, <dbref>]` + +This wizard-only command creates a player with the given name and password. If specified, `<dbref>` is the dbref of a garbage object to be used for the new player. + + +### See Also +- [pcreate()](/reference/sharpmush-help/pennfunc/#pcreate) +## @prompt +`@prompt[/<switch>] <dbref list>[=<message>]` + +A variation of `@pemit/list` that adds a telnet GOAHEAD control code to the end of messages sent to players. Players with clients that handle GOAHEAD may get the message as a prompt in their client's input area. + +If `<message>` is omitted, an empty prompt is sent. + +@prompt supports the following @pemit switches: `/silent`, `/noisy`, `/spoof`, `/noeval` + + +### See Also +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@nsprompt](/reference/sharpmush-help/penncmd/#nsprompt) +- [prompt()](/reference/sharpmush-help/pennfunc/#prompt) +- [nsprompt()](/reference/sharpmush-help/pennfunc/#nsprompt) +- [PROMPT_NEWLINES](/reference/sharpmush-help/penncmd/#promptnewlines) +## PROMPT_NEWLINES +`PROMPT_NEWLINES [1|0]` + +This socket-level command is used to indicate whether a newline should be sent after the telnet GOAHEAD code issued by @prompt/prompt() to telnet-capable clients. By default, in order to maximize portability, newlines are sent. + +Some clients, like TinyFugue, are smart enough to interpret GOAHEAD and treat prompts specially by putting them into their input window. These clients do not require the newline, and sending the newline results in a blank line in their output window. The 'PROMPT_NEWLINES 0' command can be used to disable the newline and is recommended for users with these clients. + + +### See Also +- [@prompt](/reference/sharpmush-help/penncmd/#prompt) +- [prompt()](/reference/sharpmush-help/pennfunc/#prompt) +- [terminfo()](/reference/sharpmush-help/pennfunc/#terminfo) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) +## @pemit +`@pemit[/<switches>] <object>=<message>` +`@pemit/list[/<switches>] <object list>=<message>` +`@pemit/port[/list][/silent] <descriptor(s)>=<message>` + +The basic form of this command sends `<message>` to `<object>` directly. It is very similar in its effects to @emit except only one object will see the message. + +`@pemit/list` sends the message to multiple objects. You will not get a confirmation message when using this switch. + +`@pemit/port` can only be used by Wizards/Royalty, and sends `<message>` to one or more connections. It can be used to send messages to connections which are still at the login screen, or to send a message to just one of a player's connections when he's logged in multiple times. + +See [@pemit2](/reference/sharpmush-help/penncmd/#pemit2) for more. +## @pemit2 +The @pemit command can take the following additional switches: +- /contents -- equivalent to @remit. +- /silent -- does not tell the @pemit'ing object a confirmation message. +- /noisy -- tells the @pemit'ing object a confirmation message. +- /noeval -- `<message>` will not be evaluated for substitutions +- /spoof -- the enactor's dbref will be used for nospoof notifications instead of the executor's dbref. Requires control over enactor or Can_spoof power. + +You cannot @pemit to objects set HAVEN, or objects whose @lock/page you do not pass, unless you are set WIZARD or have the pemit_all @power. + + +### See Also +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@nspemit](/reference/sharpmush-help/penncmd/#nspemit) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [SPOOFING](/reference/sharpmush-help/penntop/#spoofing) +- [page](/reference/sharpmush-help/penncmd/#page) +## @poll +`@poll` +`@poll <message>` +`@poll/clear` + +This command manipulate the message at the top of WHO/DOING. By itself, it displays the current poll. Wizards and those with the poll @power can set or clear the message. + + +### See Also +- [@doing](/reference/sharpmush-help/penncmd/#doing) +- [WHO](/reference/sharpmush-help/penncmd/#who) +- [DOING](/reference/sharpmush-help/penncmd/#doing) +## @poor +`@poor <value>` + +This command sets the pennies of every player on the MUSH to `<value>`. It can only be used by God. + + +### See Also +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [give](/reference/sharpmush-help/penncmd/#give) +## @power +`@power/list [<power name pattern>]` +`@power <power>` +`@power <object>=[!]<power>` + +`@power/list` lists the defined powers (see [powers](/reference/sharpmush-help/pennconf/#powers)). A list of standard powers with explanations is given in [powers list](/reference/sharpmush-help/pennconf/#powers-list). When given a power name as an argument, @power displays information +about a power. + +The third form manipulates powers on objects, and is limited to Wizards. `@power <object>=[!]<power>` sets (or clears) the given power on an object. + +God can add, delete, and otherwise manipulate power definitions. See help @power2 for these commands. + + +### See Also +- [powers()](/reference/sharpmush-help/pennfunc/#powers) +- [@flag](/reference/sharpmush-help/penncmd/#flag) +## @power2 +`@power/add <power>=[<letter>], [<type(s)>], [<setperms>], [<unsetperms>]` +`@power/delete <power>` +`@power/alias <power>=<alias>` +`@power/letter <power>[=<letter>]` +`@power/restrict <power>=[<setperms>], [<unsetperms>]` +`@power/type <power>=<type(s)>` +`@power/enable <power>` +`@power/disable <power>` + +These commands manipulate power definitions. Only God may use them. +- /disable disables a power, making it invisible and unusable +- /enable re-enables a disabled power +- /alias adds a new alias for an existing power +- /letter changes or removes a single-letter alias for an existing power. +- /restrict changes power permissions (see help @power3) +- /type changes power type(s) (see help @power3) +- /delete deletes a power completely, removing it from all objects in the database and the removing it permanently from the power table. It requires the exact power name or alias to be used. Be very very careful with this. + +See help @power3 for information on `@power/add` +## @power3 +`@power/add` is used to add a new power with the given name. Arguments other than the power name are optional: + +`<letter>` gives the power's one-letter abbreviation, which must not conflict with the one-letter abbreviation of another power that could be applied to the same object type(s). It defaults to none, which means it won't appear in a list of power characters but can still be tested for with haspower(), andlpowers(), and orlpowers(). +`<type>` specifies the space-separated list of types to which the power applies, and may be 'any' or one or more of 'room', 'thing', 'player', or 'exit'. It defaults to 'any'. +`<setperms>` specifies the space-separated list of permissions for who can set and/or see the power. See [flag permissions](/reference/sharpmush-help/penncmd/#flag-permissions) for details. It defaults to 'any' +`<unsetperms>` specifies the space-separated list of permissions for who can clear the power on an object they control. It defaults to whatever `<setperms>` is given, or 'any'. + +Powers added with `@power/add` are saved with the database when it is dumped, and do not need to be re-added at startup. They are treated exactly as any other power in the server. +## @prefix +`@prefix <object>[=<message>]` + +This attribute is meant to be used in conjunction with the AUDIBLE flag. The @prefix of the object is prepended to messages propagated via AUDIBLE. Pronoun substitution is done on @prefix messages. + +For example, if you have an audible exit "Outside" leading from a room Garden to a room Street, with @prefix "From the garden nearby," if Joe does a ":waves to everyone." from the Garden, the people at Street will see the message, "From the garden nearby, Joe waves to everyone." + + +### See Also +- [@inprefix](/reference/sharpmush-help/penncmd/#inprefix) +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) +- [@listen](/reference/sharpmush-help/penncmd/#listen) +## @ps +`@ps[/<switch>] [<player>]` +`@ps[/debug] <pid>` + +@ps lists all commands currently on your 'to be executed' queue, thus allowing you to identify infinite (or unnecessary) loops with-out putting in says or poses. It gives a count of the total commands in each of the queues (Command, Wait, and Semaphore), displayed in the format: +`<Number of your queued commands> / <Total number of queued commands>`. + +Some of the queues also include a [Ndel](/reference/sharpmush-help/pennconf/#ndel) after the total. That number is the number of entries made by objects that have been halted but haven't been removed from the queue yet. + +It also shows a running load average of the number of queue entries executed per second for the last 1, 5 and 15 minutes. + +@ps with no arguments will show you your own queue. Wizards may specify the `/all` switch, and see the full queue. They may also specify a player. `@ps/summary` just displays the queue totals for the whole queue. `@ps/quick` displays the queue totals for just your queue. + +See [@ps2](/reference/sharpmush-help/penncmd/#ps2). +## @ps2 +With a `<pid>` argument, @ps shows information on a single queue entry. The `/debug` switch will also display the queue entry's environment: Arguments, q registers, executor, enactor and caller dbrefs. + +Each line includes the process id of the queue entry, the object and attribute being used as a semaphore (if any), the number of seconds left before it executes (for waits and semaphores), the object that is going to execute the entry, and the command. To halt a specific queue entry, use `@halt/pid`. + + +### See Also +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [@halt](/reference/sharpmush-help/penncmd/#halt) +- [@notify](/reference/sharpmush-help/penncmd/#notify) +- [@drain](/reference/sharpmush-help/penncmd/#drain) +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +## @purge +@purge is a wizard only command that calls the internal purge routine to advance the clock of each object scheduled to be destroyed, and destroy those things whose time is up. The internal purge routine is normally run automatically approximately every 10 minutes. + +The @purge command should almost never need to be performed manually. If you do use it manually, you may want to use it twice in a row to make sure that everything marked GOING is actually destroyed. + + +### See Also +- [@dbck](/reference/sharpmush-help/penncmd/#dbck) +## @quota +`@quota [<player>]` + +These commands are only meaningful if the Quota system is enabled (check the use_quota @config option). + +@quota shows the current quota for `<player>`, or for the executor if no `<player>` is given. You must control `<player>`, or have either the See_All or Quotas @power. + +See [@quota2](/reference/sharpmush-help/penncmd/#quota2). +## @quota2 +## @squota +## @allquota +`@squota <player>=[+|-]<amount>` +`@allquota[/quiet] [<limit>]` + +@squota is a Wizard-only command which adjusts the quota of `<player>`. If `<amount>` is prefixed by + or -, their current quota will be incremented or decremented by `<amount>`, respectively. Otherwise, their total quota is set to `<amount>`. + +@allquota can only be used by God. With no `<limit>` argument, it reports the quotas of all players. If a `<limit>` is given, the quotas of all players is reset to `<limit>`. The `/quiet` switch stops @allquota reporting the current quotas before changing them. + +Players always have enough quota for the objects they currently own; if you attempt to set their quota to a lower number (with @squota or @allquota), it will be set to the number of objects they own instead. + +`@quota/set` and `@quota/all` are equivilent to @squota and @allquota, respectively. + + +### See Also +- [QUOTAS](/reference/sharpmush-help/penntop/#quotas) +- [Quotas Power](/reference/sharpmush-help/pennconf/#quotas-power) +- [No_Quota Power](/reference/sharpmush-help/pennconf/#noquota-power) +## @readcache +`@readcache` + +This wizard-only command reloads the cached text files (listed under '@config messages') and rebuilds the indexes for help, news and similar commands. + +On some systems (where '@config compile' shows 'Changed help files will be automatically reindexed.'), updates to these files are noticed and loaded automatically. Otherwise, @readcache must be used any time changes are made to one of these files while the game is running. + +A site admin can achieve the same effect by sending the MUSH process a kill -1 or kill -HUP. + +@readcache does not load updates to the configuration files (mush.cnf, restrict.cnf, etc) - the game must be restarted with `@shutdown/reboot` to reload these. + + +### See Also +- [@shutdown](/reference/sharpmush-help/penncmd/#shutdown) +## @remit +`@remit[/switches] <object>=<message>` + +Sends the message to all contents of `<object>`, which can be a room, thing, or player. The message is also sent to the `<object>` itself. (The TinyMUSH equivalent is `@pemit/contents`). + +The `/silent` switch stops the remitter from getting feedback if they're in a different location than the target. +The `/noisy` switch always gives feedback to the remitter if they are not in the target location. +(Without `/silent` or `/noisy`, the silent_pemit config option is used to determine noisiness.) +The `/list` switch will send the message to the contents of multiple objects at the same time. The `<object>` argument is treated as a space-separated list of targets. +The `/spoof` switch causes nospoof notifications to show the enactor's dbref instead of the executor's dbref, and requires control over the enactor or the Can_spoof power. +The `/noeval` switch causes `<message>` to not be evaluated. + + +### See Also +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [SPOOFING](/reference/sharpmush-help/penntop/#spoofing) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [CONTROL](/reference/sharpmush-help/penntop/#control).] +## @retry +`@retry <boolean>` +`@retry <boolean>=<arg0>[,...[,<argN>]]` + +The @retry command restarts the current queue entry, enabling people to loop their command without requiring a wait for the next queue entry. It can be a little tricky to understand at first. It basically tells the parser: "If `<boolean>` is true, then go back to the beginning." It can also replace %0-%9 with the arguments passed to it. (`<arg0>`,...). + +Please note: @retry only restarts the action list it is currently in. If you have: "`@break 1=@retry 1=hello`", then the action list is only "`@retry 1=hello`" - which would thus create an infinite loop. + +Watch out for infinite loops! @retry does respect all the limits (cpu_limit, function_invocation_limit, etc). But because @retry causes the queue parser to repeat itself _without_ invoking a new function, it doesn't risk hitting any issues other than infinite loops. + +See [@retry2](/reference/sharpmush-help/penncmd/#retry2) for examples. + + +### See Also +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [@break](/reference/sharpmush-help/penncmd/#break) +- [@include](/reference/sharpmush-help/penncmd/#include) +## @retry2 +Example: 'while' +``` +> &sing me=$sing *:say %0 bottles of beer! ; @retry gt(%0,0)=dec(%0) ; say Go get some more! +> sing 3 +You say, "3 bottles of beer!" +You say, "2 bottles of beer!" +You say, "1 bottles of beer!" +You say, "0 bottles of beer!" +You say, "Go get some more!" +``` + +Implementing a folding algorithm: +(Yes, I know lmath is better, but this is just an example! :D) +``` +> &add me=$add *:@retry words(%0)=rest(%0),add(first(%0),0%1) ; think %1 +> add 4 3 2 1 +10 +``` +## @restart +`@restart <object>` +`@restart/all` + +This command halts `<object>` (as described in @halt), and then triggers the STARTUP attribute on the object, if set. If `<object>` is a player, it affects the player and all of their objects. Players can use `@restart me` to restart their own objects. The `/all` switch halts all objects (see @allhalt) and restarts them, and can only be used by a wizard. + + +### See Also +- [@halt](/reference/sharpmush-help/penncmd/#halt) +- [@startup](/reference/sharpmush-help/penncmd/#startup) +- [@shutdown](/reference/sharpmush-help/penncmd/#shutdown) +## @scan +`@scan[/<switches>] <command>` + +@scan gives you a list of all objects containing $-commands (user-defined commands) which could match `<command>`. If given no switches, it checks you, your possessions, your location, objects in your location, the zone/zone master room of your location, your zone, and objects in the master room. It does NOT stop when it gets a match, but rather, finds all possible matches. It also tells how many commands on each object were matched, and what attributes they are in. It does NOT scan objects that you do not control and are not set VISUAL. + +This command any combination of these four switches: +- /room -- just matches on your location and objects in it. +- /self -- just matches on you and anything you're carrying. +- /zone -- just matches on zones of your location and yourself. +- /globals -- just matches on objects in the master room. + +If no switch is given, all locations are checked. `<command>` must be entered exactly as you would type it (so, to match the $-command `$foo *:` you must type '`@scan foo <something>`', not just '`@scan foo`'). + + +### See Also +- [$-commands] +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +## @search +`@search [<player>] [<classN>=<restrictionN>[,...]][,<begin>,<end>]` + +This command searches the database and lists objects which meet user specified search criteria. You can limit the scope of the search by specifying `<begin>` and `<end>` as the first and last dbrefs to search. + +If a `<player>` argument is supplied, only objects owned by that player will be listed, or all objects if "all" is used. Mortals attempting to match other players (aside from ZMPs whose @lock/zone they pass) or "all" will only get objects which they can examine. + +`<class>` and `<restriction>` arguments can be given to filter the match results. Possible `<class>`es include TYPE, NAME, ZONE, PARENT, EXITS, THINGS (or OBJECTS), ROOMS, PLAYERS, FLAGS, LFLAGS, POWERS, ELOCK, COMMAND, LISTEN, EVAL, EPLAYER, EROOM, EEXIT, and ETHING (or EOBJECT). + +If `<class>`=TYPE, possible `<restriction>`s include THING (or OBJECT), ROOM, EXIT, PLAYER, GARBAGE. This shows all objects of the specified type. + +If `<class>`=NAME, only objects whose name begin with the string `<restriction>` will be listed. If `<class>`=EXITS, OBJECTS, ROOMS or PLAYERS, only objects of that type whose name begins with `<restriction>` are listed. + +If `<class>`=ZONE, only objects in the zone `<restriction>` will be listed. +If `<class>`=PARENT, only children of parent `<restriction>` will be listed. +For ZONE and PARENT, `<restriction>` must be specified as a dbref number. + +See [@search2](/reference/sharpmush-help/penncmd/#search2). +## @search2 +If `<class>`=FLAGS or LFLAGS, only objects with the list of flags specified by `<restriction>` will be listed. For FLAGS, flags to match should be given as a string of single flag letters, with appropriate case. For LFLAGS, flags to match should be given as a space-separated list of flag names. + +If `<class>`=POWERS, only objects with the given powers are listed. `<restriction>` should be a space-separated list of power names. + +If `<class>`=ELOCK, only objects that pass the given lock string (as in help @lock) are listed. For purposes of indirect locks (@#123), 'search' is the name of the lock. + +If `<class>`=EVAL, only objects for which `<restriction>` evaluates to a true boolean value will be listed. The token '##' in `<restriction>`, which is a function, is replaced by each dbref sequentially. Classes EPLAYER, EROOM, EEXIT, and ETHING work like EVAL but are restricted to a single type. + +See [@search3](/reference/sharpmush-help/penncmd/#search3). for more. +## @search3 +If `<class>`=MINDB, only objects with dbrefs of `<restriction>` or higher will be listed. If `<class>`=MAXDB, only objects with dbrefs of `<restriction>` or lower will be listed. + +If `<class>`=START, then @search will start returning results at the `<restriction>`th result. + +If `<class>`=COUNT, then @search will only return up to `<restriction>` results. + +If `<class>`=COMMAND, then @search will only return objects that respond to `<restriction>` as an $-command. + +If `<class>`=LISTEN, then @search will only return objects that respond to `<restriction>` through a listen. + +See [@search4](/reference/sharpmush-help/penncmd/#search4). +## @search4 +For the class TYPE=PLAYER, and for PLAYER=`<player-name>`, anyone may obtain information on any player. In all other cases, wizards may obtain information about other players, and players who pass a ZMP's zone-lock may obtain information about the ZMP. + +If multiple `<class>` and `<restrictions>` are given, objects must meet all criteria in order to match successfully. The exception to this is that if multiple 'type' searches (PLAYER, EROOM, etc) are used, only the last type given is used in the search. + +@search is only mildly computationally expensive for most of the search classes. Computationally expensive searches are the evaluating searches (EVAL, EPLAYER, ETHING, EROOM, EEXIT), the attribute pattern searches (COMMAND, LISTEN), and ELOCK searches which perform evaluation searches (attr/value) or indirect locks (@obj/lock). These searches all cost a number of pennies (the exact amount is configurable; see @config find_cost). + +See [@search5](/reference/sharpmush-help/penncmd/#search5) for some examples. + +### See Also +- [lsearch()](/reference/sharpmush-help/pennfunc/#lsearch) +- [@find](/reference/sharpmush-help/penncmd/#find) +## @search5 +Examples: +``` +@search all type=player,flags=W <-- list all Wizard players +@search type=room <-- list all rooms owned by me. +@search zone=#50 <-- list all objects belong to zone #50. +@search Joe eval=1,100,200 <-- list objects from #100-#200 owned by Joe. +@search eval=gt(money(##),10) <-- list all objects owned by me worth more than 10 coins. +@search all elock=FLAG^WIZARD|FLAG^ROYALTY <-- list all objects with wizard or royalty flags. +@search wizard_bc command=+who <-- Forgot what object has your +who? +``` +## @set +`@set <object>=[!]<flag> [[!]<flag> ...]` +`@<pre-defined attribute> <object>=<value>` +`@set <object>=<attribute>:<value>` +`@set <object>/<attribute>=[!]<attrflag>` + +The first form sets (or unsets) flag(s) on `<object>`. See [flags](/reference/sharpmush-help/pennflag/#flags). +Ex: `@set me=VISUAL` +Flags may be specified by full name (recommended) or by flag character. +Flags are set or reset in the order supplied. + +The second form sets a pre-defined attribute on `<object>` +Ex: `@fail Heavy Box=You can't pick that up.` + +The third form sets an arbitrary attribute with `<value>` on `<object>`. You can also do this with `&<attribute> <object>=<value>` +Ex: `@set Test Object=random:This is a random attribute.` +`&random Test Object=This is a random attribute.` +An important difference between these two forms is that @set will always evaluate the `<value>` before setting it on `<object>`, while the `&<attribute>` form will not evaluate when entered directly by a player in his client (and is usually what you want). + +The fourth form sets (or unsets) an attribute flag on the specified attribute. See [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags). + + +### See Also +- [ATTRIB_SET](/reference/sharpmush-help/penncmd/#attribset) +- [attrib_set()](/reference/sharpmush-help/pennfunc/#attribset) +- [set()](/reference/sharpmush-help/pennfunc/#set) +## ATTRIB_SET +## @_ +`&<attr> <object>[=<value>]` +`@_<attr> <object>[=<value>]` +`ATTRIB_SET/<attr> <object>=<value>` + +The `&<attr>` and `@_<attr>` commands can be used to set or clear an attribute from an object. When entered directly from a client, they do not evaluate the `<value>`. + +ATTRIB_SET is the internal command which powers &attr and @_attr setting; it cannot be used directly, but can be restricted or @hook'd to change the behaviour of &attr/@_attr-setting. + + +### See Also +- [@set](/reference/sharpmush-help/penncmd/#set) +- [attrib_set()](/reference/sharpmush-help/pennfunc/#attribset) +## @sex +`@sex <player>[=<gender>]` + +You can use this command to set yourself or any of your objects to be male, female, neuter, or plural. The SEX attribute is used for pronoun substitution by the MUSH, and anything not recognizable will be treated as neuter. + +Examples: +``` +> @sex me=Male +> @sex me=Female +> @sex me=Woman +> @sex me=They +> @sex me=Plural +> @sex me=No thank you (silly, but possible) +``` + + +### See Also +- [GENDER](/reference/sharpmush-help/penntop/#gender) +- [subj()](/reference/sharpmush-help/pennfunc/#subj) +- [poss()](/reference/sharpmush-help/pennfunc/#poss) +- [aposs()](/reference/sharpmush-help/pennfunc/#aposs) +- [obj()](/reference/sharpmush-help/pennfunc/#obj) +## @shutdown +`@shutdown[/panic][/reboot][/paranoid]` + +@shutdown shuts down the game. It may only be used by Wizards. + +`@shutdown/panic` performs a panic shutdown of the game, using a seperate database file, not the normal one. It may only be used by God. + +`@shutdown/reboot` restarts the game without disconnecting the users. This is necessary to load changes to the MUSH's configuration files (mush.cnf, restrict.cnf, etc), though not changes to names.cnf, which take effect without a reboot. + +If the `/paranoid` switch is added, the shutdown dump will be a paranoid dump (see @dump). +## @sitelock +`@sitelock` +`@sitelock/name <name>` +`@sitelock[/player] <host-pattern>=<options>[, <name>]` +`@sitelock[/<ban|register>][/player] <host-pattern>` +`@sitelock/check <host>` +`@sitelock/remove[/player] <string>` + +The @sitelock command adds rules to the access.cnf file, controlling a host's level of access to the MUSH, or adds banned player names to the names.cnf file. Only Wizards may use @sitelock. + +@sitelock without arguments lists all sites in access.cnf. Rules are processed in the order listed, and the first matching rule is applied. `@sitelock/check` tells you which rule will match for a given `<host>`. + +`@sitelock/name` adds a name to the list of banned player names. Use !`<name>` to remove a name from the list. + +`@sitelock <host-pattern>=<options>[, <name>]` controls the access options for hosts which match `<host-pattern>`, which may include wildcard characters "*" and "?". See help @sitelock2 for the list of options, and help @sitelock3 for an explanation about the name argument. + +For backward compatibility, `@sitelock/ban` is shorthand for setting options "!connect !create !guest", and `@sitelock/register` is shorthand for options "!create register". + +If the `/player` switch is given, `<host-pattern>` is treated as a player name, and sitelock rules are added for that player's LASTIP and LASTSITE, if set. + +See [@sitelock2](/reference/sharpmush-help/penncmd/#sitelock2). + +### See Also +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +- [REGEXPS](/reference/sharpmush-help/penntop/#regexps) +- [ipaddr()](/reference/sharpmush-help/pennfunc/#ipaddr) +- [hostname()](/reference/sharpmush-help/pennfunc/#hostname) +## @sitelock2 +Sitelock allow/deny options: +- connect -- allow this site to connect to non-guest players +- !connect -- don't allow this site to connect to non-guest players +- guest -- allow this site to connect to guest players +- !guest -- don't allow this site to connect to guest players +- create -- allow this site to create players +- !create -- don't allow this site to create players +- default -- allow any of the above +- none -- don't allow any of the above +- !god -- God can't connect from this site. +- !wizard -- Wizards can't connect from this site. +- !admin -- Wizards and Royalty can't connect from this site. + +Allow/deny options not set are assumed to be allowed. + +Sitelock special options: +- register -- allow this site to use 'register `<name>` `<email>`' at the connection screen to register players. Players will be emailed their character's password. This should be used with !create to be effective. +- suspect -- set all players who connect from this site SUSPECT. +- deny_silent -- don't log failed access attempts from this site. +- regexp -- Treat the hostname pattern as a regular expression instead of a wildcard pattern. + +See [@sitelock3](/reference/sharpmush-help/penncmd/#sitelock3). +## @sitelock3 +If you specify a character name after the options, the options are only checked if the host pattern matches, AND the character being checked for connect support matches the one you gave. Use it only with connect and !connect options, since they're the only ones where an existing character is used. + +For example, to disallow anyone from connecting to 'Twink' from one domain, but to allow connections to the character from others, use something like: +``` +> @sitelock *.somesite.com=!connect,Twink +``` + +If you want to disallow connections to a character from anywhere, use @newpassword or `@sitelock *=!connect,Twink`. + +`@sitelock/remove` will delete entries that were added with @sitelock if their host-pattern matches `<string>` exactly. If the `/player` switch is given, `<string>` is treated as a player name, and entries whose host-patterns match the player's LASTIP or LASTSITE addresses exactly will be deleted. +## @SLAVE +`@slave/restart [info|ssl]` + +@slave is a wizard-only command used to control the various subprocesses used by the mush to do various things. The only switch it currently takes is `/restart`, which will shut down and relaunch the slave daemon process in question. + +Two different daemons are used: + +info: Resolves IP addresses into host names whenever a new connection is established. +ssl : Handles encrypted SSL connections across @shutdown/reboots. +## @SOCKSET +## SOCKSET +`SOCKSET [<option>=<value>]` +`@sockset [<descriptor>][=<option>, <value>[, ..., <optionN>, <valueN>]]` + +SOCKSET is a socket command which sets or queries socket-specific options. These options are usually set automatically, or negotiated by the MUSH and your client, but this command lets you override those settings. + +With no args, SOCKSET shows the current value of the socket options. With an `<option>=<value>` pair, it attempts to set the given option. + +@sockset is a similar in-game command, but can specify which descriptor to change options for, and can set multiple options at once. Only Wizards can change the options for other players' descriptors. `<descriptor>` defaults to your least-idle descriptor, when used by a player; for non-players, it has no default. + +Options: +- colorstyle: See [colorstyle](/reference/sharpmush-help/penncmd/#colorstyle) +- outputprefix: Same as OUTPUTPREFIX +- outputsuffix: Same as OUTPUTSUFFIX +- pueblo: Sets Pueblo-related options. If value has md5=...", then it will set the pueblo checksum. If empty, Pueblo mode is turned off. +- telnet: Yes or no, to enable/disable telnet negotiation +- width: Set your width(), same as SCREENWIDTH +- height: Set your height(), same as SCREENHEIGHT +- terminaltype: Your terminal type, used by terminfo() +- prompt_newlines: Set whether a newline is shown after prompts from @prompt, same as PROMPT_NEWLINES +- stripaccents: Strip accents for this connection. Like the NOACCENTS flag, but connection-specific. Set by default on connections which negotiate charset as [US-](/reference/sharpmush-help/pennconf/#us)ASCII +- noquota: Input command quota is set to max every refresh. Can only be set by a logged-in Wizard. + +Note that changing 'telnet' or 'pueblo' may stop your client from parsing or displaying output correctly; only use if you know what you're doing! + + +### See Also +- [SOCKET COMMANDS](/reference/sharpmush-help/penncmd/#socket-commands) +- [terminfo()](/reference/sharpmush-help/pennfunc/#terminfo) +- [Pueblo](/reference/sharpmush-help/pennpueb/#pueblo) +- [colorstyle](/reference/sharpmush-help/penncmd/#colorstyle) +- [@prompt](/reference/sharpmush-help/penncmd/#prompt) +## COLORSTYLE +`SOCKSET colorstyle=<value>` +`@SOCKSET [me|<descriptor>]=colorstyle,<value>` + +You can override the color format you receive from PennMUSH. Normally, PennMUSH tries to guess what your client is capable of through telnet negotiation and your player flags. @sockset lets you inform PennMUSH that your client can support more colors than expected. + +Colorstyle options are: + +- plain: Plain text. No markup whatsoever. +- hilite: You only receive hilite text. No colors, just ansi-hilite. +- 16color: You receive hilite text and the ANSI 16 colors. +- xterm256: You receive xterm-style 256 colors for text and background. +- auto: go back to what PennMUSH determined was your client's capabilities. + +In the event that your client receives a color that it is unable to display, PennMUSH will attempt to find a close match that can fit your client's capabilities. + + +### See Also +- [ANSI](/reference/sharpmush-help/pennflag/#ansi) +- [COLOR](/reference/sharpmush-help/pennflag/#color) +- [XTERM256](/reference/sharpmush-help/pennflag/#xterm256) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) +## @SPEECHMOD +`@speechmod <object>[=<modifier>]` + +When set, this attribute modifies everything `<object>` says, poses, semiposes and @emits. The original text spoken/posed/emitted is passed as %0, with %1 passed as " (for say), : (for pose), ; (for semipose) or | (for @emit). + +If the attribute evaluates to an empty string, the original text will be used. Otherwise, the result of the attribute is used. + +Example: +``` +> @speechmod me=ucstr(%0)! +> say hello +You say, "HELLO!" +> pose waves +Bob WAVES! +``` + +``` +> @speechmod me=switch(%1,",ucstr(%0),:,lcstr(%0)) +> say Test +You say, "TEST" +> pose Test +Bob test +> @emit Test +Test +``` + + +### See Also +- [say](/reference/sharpmush-help/penncmd/#say) +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@chatformat](/reference/sharpmush-help/pennchat/#chatformat) +- [@pageformat](/reference/sharpmush-help/penncmd/#pageformat) +## @mapsql +`@mapsql[/notify][/colnames][/spoof] <obj>/<attr>=<query>` + +This command issues an SQL query if the MUSH supports SQL and can connect to an SQL server. You must be WIZARD or have the Sql_Ok power to use @sql. + +For each row returned by the query, the action list in `<obj>/<attr>` is queued, with row number passed as %0 and the columns passed as %1-%9 and v(10) to v(29). Row numbers start at 1. The MUSH will also set named arguments, with arg names matching the SQL field names. These are accessible as `r(<name>, arg)`. + +The `/notify` switch causes the executor to do queue "@notify me" after all the rows are processed. Note that this is the object running "@mapsql", and not `<obj>`. + +The `/colnames` switch causes @mapsql to first queue the obj/attr with row number (%0) set to 0 and args %1 to v(29) being the column names. + +By default, the object using @mapsql will be the enactor (%#) for the triggered attribute. However, if you control `<object>`, the `/spoof` switch can be used to preserve the current enactor. + +Examples: +``` +> &desctable me=think align(30 20 4 10 10,%0,%1,%2,%3,%4) +> @mapsql me/desctable=DESCRIBE table_name +``` + +``` +> &showresult me=@pemit %#=%0. [r(name, arg)] ([r(age, arg)]) +> @mapsql me/showresult=SELECT `name`, `age` FROM `people` +``` + + +### See Also +- [@sql](/reference/sharpmush-help/penncmd/#sql) +- [sql()](/reference/sharpmush-help/pennfunc/#sql) +- [sqlescape()](/reference/sharpmush-help/pennfunc/#sqlescape) +- [mapsql()](/reference/sharpmush-help/pennfunc/#mapsql) +## @sql +`@sql <query>` + +This command issues an SQL query if the MUSH supports SQL and can connect to an SQL server. You must be WIZARD or have the Sql_Ok power to use @sql. + +Generally, the sql() function is more useful for coding, as it delimits its return values, but @sql is handy for INSERT-type queries and quick checks. If you pass arbitrary data to @sql, be sure you call sqlescape() on it; see the example in help sql(). + +Example: +``` +> @sql SHOW TABLES +``` + + +### See Also +- [sql()](/reference/sharpmush-help/pennfunc/#sql) +- [sqlescape()](/reference/sharpmush-help/pennfunc/#sqlescape) +- [mapsql()](/reference/sharpmush-help/pennfunc/#mapsql) +- [@mapsql](/reference/sharpmush-help/penncmd/#mapsql) +## @startup +`@startup <object>[=<action list>]` + +Sets the list of actions on `<object>` that will happen whenever the MUSH is restarted. This lets you start up objects that need to be running continuously. It is also useful for setting up @functions and @hooks, which are not saved across restarts. + +@startup is also triggered when an object is @restarted or @undestroyed. + +Note that @startups are NEVER inherited from parent objects. + + +### See Also +- [@restart](/reference/sharpmush-help/penncmd/#restart) +- [@undestroy](/reference/sharpmush-help/penncmd/#undestroy) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) +- [@function](/reference/sharpmush-help/penncmd/#function) +- [@command](/reference/sharpmush-help/penncmd/#command) +- [@hook](/reference/sharpmush-help/penncmd/#hook) +## @stats +`@stats [<player>]` +`@stats/tables` +`@stats/flags` +`@stats/chunks` +`@stats/regions` +`@stats/paging` +`@stats/freespace` + +In its first form, display the number of objects in the game broken down by object types. Wizards can supply a player name to count only objects owned by that player. + +`@stats/tables` displays statistics on internal tables. +`@stats/flags` displays statistics about the flag and power system. + +In the remaining forms, display statistics or histograms about the chunk (attribute) memory system. +## @sweep +`@sweep [connected | here | inventory | exits ]` + +@sweep gives you a list of all nearby objects that are listening, including the room you are in and the objects you are carrying. Most objects only listen for a particular string or phrase, so they normally do not pose a problem if you need privacy. You will have to be careful of players and puppets since they will hear everything you say and do. (And might post the same to r.g.m!) AUDIBLE exits are also shown on an ordinary sweep, if the room is also AUDIBLE. (Audible exits aren't active unless the room is audible). + +The four command options can also be used as switches (i.e., you can use "`@sweep/connected`" instead of "`@sweep connected`"). If the connected flag is given, only connected players and puppets owned by connected players will be shown in the @sweep. The "here" and "inventory" flags check only your location or inventory, respectively. "exits" only checks for AUDIBLE exits. + + +### See Also +- [@scan](/reference/sharpmush-help/penncmd/#scan) +## @switch +## @select +`@switch[/<switch>] <string>=<expr1>, <action1> [,<exprN>, <actionN>]... [,<default>]` +`@select <string>=<expr1>, <action1> [,<exprN>, <actionN>]... [,<default>]` + +For those of you familiar with programming, these command acts like if/then/else or switch/case. It compares `<string>` against whatever each `<expr>` evaluates to. If `<string>` and `<expr>` match, the action list associated with that `<expr>` is carried out. If no match is found, the `<default>` action list is carried out. @switch runs `<action>`s for all matching `<expr>`s by default, while @select only runs the `<action>` for the first matching `<expr>`. + +If `<expr>` is a regexp or a wildcard glob, then $0-$9 will be set with capture data. (In wildcard globbing, every wildcard captures.) + +The string "#$" in `<action>`'s will be replaced with the evaluated result of `<string>` before it is acted on. Note that this replacement happens BEFORE the `<action>` is queued and executed, and does not work well in nested switches. It is recommended that you use the %$N substitution, or the stext() function, instead. + +`@switch/all` runs `<action>`s for all matching `<expr>`s. Default for @switch. +`@switch/first` runs `<action>` for the first matching `<expr>` only. Same as @select, and often the desired behaviour. +`@switch/notify` queues "@notify me" after the last `<action>`. +`@switch/inline` runs all actions in place, instead of creating a new queue entry for them. +`@switch/regexp` makes `<expr>`s case-insensitive regular expressions, not wildcard/glob patterns. + +See [@switch2](/reference/sharpmush-help/penncmd/#switch2). +## @switch2 +When using `@switch/inline`, an @break in an `<action>` will stop the calling action list (and any further `<action>`s) from running. Each `<action>` will also be able to see/alter the q-registers for the calling action list. The following switches can be used with `/inline` to alter this behaviour: +- /nobreak: @breaks in `<action>` do not effect to the calling action list +- /localize: q-registers are saved before each `<action>` is run, and restored after it completes +- /clearreg: q-registers are all reset before each `<action>` is run. Most useful when used in combination with /localize. + +`@switch/inplace` is an alias for `@switch/inline/nobreak/localize`. + +See [@switch3](/reference/sharpmush-help/penncmd/#switch3) for examples. + +### See Also +- [SWITCH WILDCARDS](/reference/sharpmush-help/pennfunc/#switch-wildcards) +- [switch()](/reference/sharpmush-help/pennfunc/#switch) +- [@if](/reference/sharpmush-help/penncmd/#if) +- [@break](/reference/sharpmush-help/penncmd/#break) +- [stext()](/reference/sharpmush-help/pennfunc/#stext) +- [slev()](/reference/sharpmush-help/pennfunc/#slev) +## @switch3 +Examples: +``` +> &SWITCH_EX thing=$foo *: @switch %0=*a*, :acks, *b*, :bars, :glurps +> foo abc +thing acks +thing bars +> foo xxx +thing glurps +``` + +``` +> &SWITCH_EX thing=$foo *: @switch/first %0=*a*, :acks,*b*, :bars, :glurps +> foo abc +thing acks +``` + +``` +> &SWITCH_EX thing=$test: @switch hasflag(%#,PUPPET)=1, say Puppet!, say Not Puppet! +> test +thing says, "Not Puppet!" +``` + +``` +> &SWITCH_EX thing=$foo *: @switch %0=*a*,say Before: '$0'. After: '$1' +> foo foobarbaz +thing says, "Before: 'foob'. After: 'rbaz' +``` + +See [@switch4](/reference/sharpmush-help/penncmd/#switch4). +## @switch4 +Examples: +``` +> &SWITCH_EX me=$foo *:think before ; @switch %0=1,think one ; think after +> foo 1 +thing before +thing after +thing one +``` + +``` +> &SWITCH_EX me=$foo *:think before ; @switch/inline %0=1,think one ; think after +> foo 1 +thing before +thing one +thing after +``` +## @teleport +`@teleport[/<switches>] [<object>=]<destination>` +`@teleport/list[/<switches>] <object-list>=<destination>` + +Teleports `<object>` to `<destination>`. `<object>` can be a player, thing or exit, and defaults to yourself. (Exits must be specified by dbref, things or players can be specified by name.) The destination must be either JUMP_OK or controlled by you, and you must either control `<object>` or `<object>`'s current location. Also, the destination, if a room, cannot be teleport-locked against `<object>`. Mortals cannot teleport HEAVY objects. If the destination is a room with a drop-to, `<object>` may go to the drop-to room instead. + +If the `/list` switch is given, each object specified in `<object-list>` will be teleported to `<destination>` instead. Names containing spaces should be enclosed in "double quotes". + +Admin and those with the tport_anything power can teleport an object even if they don't control it. Those with tport_anywhere can teleport objects to any destination. You can also teleport an exit to any room if you have the Open_Anywhere power. + +Privileged players who teleport a player to another player send them to the location of the target, unless the `/inside` switch is used, in which case they are sent to the inventory of the target. + +See [@teleport2](/reference/sharpmush-help/penncmd/#teleport2). +## @teleport2 +Teleporting to an exit works the same as using "goto". If you don't control the exit and don't have the tport_anywhere power, either you or `<object>` must be nearby the exit. + +Teleportation from a room can be stopped by setting the NO_TEL flag. Royalty and Wizards can _always_ teleport to any location, regardless of NO_TEL or teleport locks. + +Teleportation triggers the @oxtport/@tport/@otport/@atport attributes, unless `<room>` is an exit or the `/silent` switch is given. With @oxtport, %0 is the dbref of the object causing the dbref. The others, in addition to %0, get the former location of the object that was teleported passed in %1. + +As a special case, using "home" as the `<room>` has the same effect as the home command, and does not act like a normal teleport. + + +### See Also +- [JUMP_OK](/reference/sharpmush-help/pennflag/#jumpok) +- [NO_TEL](/reference/sharpmush-help/pennconf/#notel) +- [Z_TEL](/reference/sharpmush-help/pennconf/#ztel) +- [@tport](/reference/sharpmush-help/penncmd/#tport) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +## @trigger +`@trigger[/<switches>] <object>/<attribute>[=<arg0>, ..., <arg29>]` +`@trigger/match[/<switches>] <object>/<attribute>=<string>` + +@trigger queues an action list stored in an attribute. It can also pass values to that attribute on the stack, as %0 to %9 and `r(0,args)` to `r(29,args)`. + +Switches: +- /spoof: If you control `<object>`, enactor is preserved. +- /inline: Run @triggered attribute immediately, rather than queueing it. +- /clearregs: Clear Q-registers before @triggering. + +If `/inline` is given, the following switches can be used: +- /nobreak: If the @triggered attribute has @break or @assert, it won't propagate up. +- /localize: Don't let the @triggered attribute override your Q-registers. + +`/inplace` is an alias for `/inline/localize/nobreak`. + +The `/match` switch is explained in [@trigger2](/reference/sharpmush-help/penncmd/#trigger2) + +You must control `<object>`, or it must be Link_OK and you must have the same owner, to trigger an attribute on it. + +The triggered attribute is queued - the new action list is not run instantly. The action list is executed by `<object>`, not by the object using @trigger. + +See [@trigger2](/reference/sharpmush-help/penncmd/#trigger2). +## @trigger2 +By default, the object using @trigger will be the enactor (%#) for the triggered attribute. However, if you control `<object>`, the `/spoof` switch can be used to preserve the current enactor. This is useful for global commands with @a* verb attributes. + +Q-registers set at the time @trigger is run will be copied and made available in the triggered attribute, unless the `/clearregs` switch is given. + +@trigger can execute obj/attrs that are $-commands or ^-listens. e.g: +``` +> &SLAP object=$slap *=*:@emit %n slaps %0 around with a %1 +> slap himself=trout +Walker slaps himself around with a trout +> @trigger object/slap=himself,trout +Walker slaps himself around with a trout +``` + +Note that you have to pass %0 and %1 yourself. For some $-commands or listens, the pattern can get complex (especially with regexps!), so `/match` allows you to pass a command to match the pattern. +``` +> @trigger/match object/slap=slap himself=trout +Walker slaps himself around with a trout +``` + +See [@trigger3](/reference/sharpmush-help/penncmd/#trigger3) for examples. + +### See Also +- [@include](/reference/sharpmush-help/penncmd/#include) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +## @trigger3 +Examples: +``` +> &GREET me=POSE waves hi. +> @trigger me/GREET +Cyclonus waves hi. +``` + +``` +> &GREET me=POSE waves to %0! ; say Hi there, %1. +> @trigger me/GREET=Gears, Arcee +Cyclonus waves to Gears. +You say, "Hi there, Arcee." +``` + +``` +> &foo Globals=$foo *: @assert setr(0,locate(%#,%0,*))=@nspemit %#=Who? ; @nspemit %#=You foo [name(%q0)]. ; @trigger %q0/AFOO +> &AFOO Bar=:is foo'd by %n! +> FOO BAR +Bar is foo'd by Globals! +``` + +``` +> &foo Globals=$foo *: @assert setr(0,locate(%#,%0,*))=@nspemit %#=Who? ; @nspemit %#=You foo [name(%q0)]. ; @trigger/spoof %q0/AFOO +> FOO BAR +Bar is foo'd by Cyclonus! +``` +## @ulock +## @uunlock +`@ulock <object>[=<key>]` +`@uunlock <object>` + +These commands set the Use lock for `<object>` to `<key>`, or clear the Use lock. They are deprecated, and should be replaced with + +`@lock/use <object>[=<key>]` +and +`@lock/use <object>` + +The Use lock determines who is allowed to "use" the object or trigger any $-commands or ^-listens on the object. + +To only lock who can use $-commands, use `@lock/command`. To only lock who can trigger ^-listens, use `@lock/listen`. + +Example: if I want everyone but Bob to be able to use my toy, I would "`@lock/use toy=!*Bob`". If I want only Bob to be able to use it, I would "`@lock/use toy==*Bob`". + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [use](/reference/sharpmush-help/penncmd/#use) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +## @uptime +`@uptime[/mortal]` + +This command, for mortals, gives the time until the next database dump. For wizards, it also gives the system uptime (just as if 'uptime' had been typed at the shell prompt) and process statistics, some of which are explained in the next help entry. Wizards can use the `/mortal` switch to avoid seeing the extra process statistics. + +See [@uptime2](/reference/sharpmush-help/penncmd/#uptime2). +## @uptime2 +While the exact statistics displayed depends on the operating system of the game's server, typical things might include the process ID, the machine page size, the maximum resident set size utilized (in K), "integral" memory (in K x seconds-of-execution), the number of page faults ("hard" ones require I/O activity, "soft" ones do not), the number of times the process was "swapped" out of main memory, the number of times the process had to perform disk I/O, the number of network packets sent and received, the number of context switches, and the number of signals delivered to the process. + +Under Linux, memory usage is split into a number of different categories including shared libraries, resident set size, stack size, and some other figures. Also under linux, more information on signals is printed. + + +### See Also +- [@stats](/reference/sharpmush-help/penncmd/#stats) +- [@list](/reference/sharpmush-help/penncmd/#list) +## @unlink +`@unlink <exit>` +`@unlink <room>` + +The first form of this command unlinks an exit from its destination room. Unlinked exits may be picked up and dropped elsewhere or relinked by anyone else. (Note that relinking an unlinked exit will @chown it to you if you do not already own it.) + +The second form removes the DROP-TO on the room. + + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [DROP-TO](/reference/sharpmush-help/pennconf/#drop-to) +## @unlock +`@unlock[/<switch>] <object>` + +Removes the lock on `<object>`. It can take as many switches as @lock can. + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +## @version +`@version` + +Tells the player the name of the MUSH, which version of the code is currently running on the system, when it was compiled, and when the last restart was. It may also include some other information, including the MUSH's website address and the GIT revision, if available. + + +### See Also +- [version()](/reference/sharpmush-help/pennfunc/#version) +- [numversion()](/reference/sharpmush-help/pennfunc/#numversion) +## @verb +`@verb <victim>=<actor>,<what>,<whatd>,<owhat>,<owhatd>,<awhat>,<args>` + +This command provides a way to do user-defined verbs with associated @attr/@oattr/@aattr groups. Invoking it does the following: + +`<actor>` sees the contents of `<victim>`'s `<what>` attribute, or `<whatd>` if `<victim>` doesn't have a `<what>`. +Everyone in the same room as `<actor>` sees the contents of `<victim>`'s `<owhat>` attribute, with `<actor>`'s name prepended, or `<owhatd>`, also with `<actor>`'s name prepended, if `<victim>` doesn't have an `<owhat>`. +`<victim>` executes the contents of his `<awhat>` attribute. + +By supplying up to 29 `<args>`, you may pass those values on the stack (i.e. %0, %1, %2, etc. up through %9, and `r(0,args)` to `r(29,args)`). + +See [@verb2](/reference/sharpmush-help/penncmd/#verb2). +## @verb2 +In order to use this command, at least one of the following criterion must apply: +1. The object which did the @verb is a wizard. +2. The object which did the @verb controls both `<actor>` and `<victim>` +3. The thing which triggered the @verb (such as through a $-command on the object which did the @verb) must be `<actor>`, AND the object which did the @verb must be either privileged or control `<victim>` or `<victim>` must be VISUAL. + +See [@verb3](/reference/sharpmush-help/penncmd/#verb3) for examples. + +### See Also +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [STACK](/reference/sharpmush-help/penntop/#stack) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [@trigger](/reference/sharpmush-help/penncmd/#trigger) +## @verb3 +Examples: +``` +> &VERB_EXAMPLE Test Object=$test:@verb me=%#,TEST,You just tested.,OTEST,just tested the example.,ATEST,%n +> test +You just tested. +[others see] Cyclonus just tested the example. +``` + +``` +> &TEST Test Object=You have just tested this object! +> &ATEST Test Object=@emit %0 has failed! +> &OTEST Test Object=tests test object. +> test +You have just tested this object! +[others see] Cyclonus tests test object. +Cyclonus has failed! +``` + +See [@verb4](/reference/sharpmush-help/penncmd/#verb4) for another example. +## @verb4 +In order to make this into a global command that anyone can use, we need to put it on a WIZARD object in the Master Room. +``` +> &DO_TEST Global=$test *: @assert setr(0,locate(%#,%0,n))=@pemit %#=I don't see that here. ; @verb %q0=%#, TEST, You test [capstr(%0)]., OTEST,tests [capstr(%0)]. ,ATEST +``` + +``` +> &TEST Example=You test this fun example. +> &ATEST Example=POSE has been tested! +> test example +You test this fun example. +[others see] You test Example. +Example has been tested! +``` +## @wait +`@wait[/until] <time>=<command_list>` +`@wait <object>=<command_list>` +`@wait[/until] <object>/<time>=<command_list>` + +The basic form of this command puts the command list (a semicolon-separated list of commands) into the wait queue to execute in `<time>` seconds. If the `/until` switch is given, the time is taken to be an absolute value in seconds, not an offset. + +The second form sets up a semaphore wait on `<object>`. The enactor will execute `<command_list>` when `<object>` is @notified. + +The third form combines the first two: the enactor will execute `<command_list>` when `<object>` is @notified or when `<time>` passes, whichever happens first. + +More forms that support semaphores on arbitrary attributes are described in [@wait2](/reference/sharpmush-help/penncmd/#wait2). + + +### See Also +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +- [@drain](/reference/sharpmush-help/penncmd/#drain) +- [@notify](/reference/sharpmush-help/penncmd/#notify) +## @wait2 +Normally, a semaphore wait depends on the SEMAPHORE attribute of the object in question. However, it is useful to be able to use other attributes as semaphores, so one object can be used as the blocker for multiple different things at once. Possible attribute names aren't completely arbitrary. See 'HELP SEMAPHORES5' for details. + +The syntax for these are: + +`@wait <object>/<attribute>=<command list>` +`@wait[/until] <object>/<attribute>/<time>=<command list>` + +You cannot do a non-timed semaphore on an attribute with a numeric name, as that is taken as a timeout instead. + +See [@wait3](/reference/sharpmush-help/penncmd/#wait3). +## @wait3 +`@wait/pid <pid>=<seconds>` +`@wait/pid <pid>=[+-]<adjustment>` +`@wait/pid/until <pid>=<time>` + +The `/pid` switch can be used to alter the timeout of entries in the wait and semaphore queues. You can set a new wait time, increase or decrease the current time, or set a new absolute time in seconds. + +You must control the object doing the wait, or have the halt @power. +## @wall +## @rwall +## @wizwall +`@wall[/emit][/noeval] <message>` +`@rwall[/emit][/noeval] <message>` +`@wizwall[/emit][/noeval] <message>` + +@wall sends `<message>` to all connected players. @rwall only sends the message to connected wizards and royalty, and @wizwall is seen only be wizards. + +`<message>` can be prefixed with : or ; to pose or semi-pose it, respectively, or the `/emit` switch can be given to emit the message. If `<message>` begins with a " and the chat_strip_quote option is on, the " will be stripped. + +The message is prefixed with the value of the wall_prefix, rwall_prefix or wizwall_prefix options, depending on the command used. + + +### See Also +- [@wizwall](/reference/sharpmush-help/penncmd/#wizwall) +- [@rwall](/reference/sharpmush-help/penncmd/#rwall) +## @warnings +`@warnings <object>=<warning list>` + +This command will set the types of warnings which should be reported on an object or to a player. You must control the object to use this command. + +When an object is checked for warnings (via @wcheck by the owner, or automatically), only warnings which are set to be reported on the object will be reported. If no warnings are set on the object, the owner's warning settings will be used. When admin use @wcheck to check non-owned objects, their personal warnings are always used. + +For a list of warnings, see [warnings list](/reference/sharpmush-help/penntop/#warnings-list). +For examples, see [@warnings2](/reference/sharpmush-help/penncmd/#warnings2). + + +### See Also +- [@wcheck](/reference/sharpmush-help/penncmd/#wcheck) +- [NO_WARN](/reference/sharpmush-help/pennconf/#nowarn) +## @warnings2 +Example 1: Normal building situations +Most people will simply want to leave their @warnings set to "normal" and their objects' @warnings set to "none". They will then receive normal warnings for all their objects. + +Example 2: Warning-lover +People who find warnings very helpful (like heavy builders) may want to set their personal @warnings to "extra" or "all", and keep their objects' warnings at "none". If a specific object should be treated less strictly, set that object's @warnings differently. If an object shouldn't be warned on at all, set the NO_WARN flag on the object. + +See [@warnings3](/reference/sharpmush-help/penncmd/#warnings3). +## @warnings3 +Example 3: Warning-hater +People who prefer not to be warned except for specific object may set their personal @warnings to "none" and set the @warnings on those objects to appropriate levels. + +Example 4: I need some peace! +Players who @set themselves NO_WARN will receive no warnings ever until they unset the flag. +## @wcheck +`@wcheck <object>` +`@wcheck/all` +`@wcheck/me` + +The first form of the command performs warning checks on a specific object. The player must own the object or be see_all. When the owner runs the command, the @warnings of the object are used to determine which warnings to give. If the object has no @warning's set, the @warnings of the owner are used. When a non-owner runs the command, the @warnings of the non-owner are used. + +The second form of the command runs @wcheck on every object in the database and informs connected owners of warnings. It is usually automatically run by the MUSH at intervals. Only Wizards may use `@wcheck/all`. + +The third runs it on all objects the player owns that aren't set NO_WARN. + + +### See Also +- [@warnings](/reference/sharpmush-help/penncmd/#warnings) +- [WARNINGS](/reference/sharpmush-help/penntop/#warnings) +- [NO_WARN](/reference/sharpmush-help/pennconf/#nowarn) +## @whereis +`@whereis <player>` + +If `<player>` is not set UNFINDABLE, this command will tell you where the player is. It will also inform the player that you attempted to locate their position, and whether you succeeded or not. + +To avoid being found this way, just do: `@set me=UNFINDABLE` + +Example: +``` +> @whereis Moonchilde +``` + + +### See Also +- [UNFINDABLE](/reference/sharpmush-help/pennflag/#unfindable) +- [loc()](/reference/sharpmush-help/pennfunc/#loc) +## @wipe +`@wipe <object>[/<attribute pattern>]` + +This command clears attributes from `<object>`, with the exception of attributes changeable only by wizards, and attributes not controlled by the object's owner (i.e. locked attributes owned by someone else). Only God may use @wipe to clear wiz-changeable-only attributes. The SAFE flag protects objects from @wipe. + +If no `<pattern>` is given, this gets rid of all the attributes, with exceptions as given above. If `<pattern>` is given, it gets rid of all attributes which match that pattern. Note that the restrictions above still apply. + +When wiping an attribute that is the root of an attribute tree, all attributes in that tree will also be removed. +## @zemit +`@zemit[/silent|/noisy] <zone>=<message>` + +Emits a message to all rooms in `<zone>`. You must have control `<zone>` in order to use this command. + +The `/silent` switch suppresses the confirmation message, and `/noisy` causes it to be shown. With neither switch, the silent_pemit @config option determines whether or not the message is shown. The confirmation message is only shown if you are not in a room which would receive `<message>`. + + +### See Also +- [@nszemit](/reference/sharpmush-help/penncmd/#nszemit) +- [zemit()](/reference/sharpmush-help/pennfunc/#zemit) +- [zone()](/reference/sharpmush-help/pennfunc/#zone) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +## ahelp +## anews +`ahelp [<topic>]` +`anews [<topic>]` + +These commands, if enabled, show the admin-only help or news files for the MUSH. Only Wizards and Royalty may use them. +## brief +`brief[/opaque] [<object>]` + +This command works like an abbreviated version of "examine", showing information about an object including its name, owner, zone, type, flags and powers, locks, channels, warnings, home and location. Unlike "examine", it does not print out all the attributes on the object. It will include the contents of `<object>`, unless the `/opaque` switch is given. + +`<object>` defaults to "here". + + +### See Also +- [examine](/reference/sharpmush-help/penncmd/#examine) +## cd +## ch +## cv +`cd <name> <password>` +`ch <name> <password>` +`cv <name> <password>` + +Not really MUSH commands, but commands available at the connect screen. Wizards can use 'cd' instead of 'connect'; the new connection will be hidden (as per @hide), and the player will be set DARK. Mortals set HEAR_CONNECT will not hear dark wizards connect. + +Wizards, Royalty, and those with the Hide @power can use 'ch' to connect with the new connection hidden (as per @hide). + +Connecting using 'cv' causes the Dark flag to be cleared prior to connection messages being broadcast. + +None of those commands affect the hidden status of other connections, if you're reconnecting. + + +### See Also +- [DARK](/reference/sharpmush-help/pennflag/#dark) +- [@hide](/reference/sharpmush-help/penncmd/#hide) +## OUTPUTPREFIX +## OUTPUTSUFFIX +`OUTPUTPREFIX <string>` +`OUTPUTSUFFIX <string>` + +Sets your output prefix or suffix. These strings will be shown before and after the output of any command that you initiate, respectively. They are primarily useful for bots and the like. +## IDLE +`IDLE [<string>]` + +This command does nothing. It does not reset a connection's idle time. It is useful for people who are connecting from behind a NAT gateway with a short fixed timeout; if you're in this situation, have your client send the IDLE command every minute or so, and the NAT connection won't time out (but you won't appear, to other players, to be active). + +Some routers will only consider a connection alive if text is received, as well as sent. If you give a `<string>` with the IDLE command, that same `<string>` will be sent back to you for this purpose. + + +### See Also +- [KEEPALIVE](/reference/sharpmush-help/pennflag/#keepalive) +- [@idle](/reference/sharpmush-help/penncmd/#idle) +## teach +`teach <command>` +`teach/list <action list>` + +The teach command shows its argument (unparsed) to others in your location, and then executes it as a command. If the `/list` switch is given, it will run an `<action list>` of commands in much the same way as @triggering an attribute. Otherwise, it executes a single `<command>`, exactly as if you'd entered `<command>` from your client. Useful for helping newbies and demonstrating commands. +``` +> say To do a pose, use :<action> +You say "To do a pose, use :<action>" +> teach :waves hello. +Javelin types --> :waves hello. +Javelin waves hello. +``` + +``` +> teach "[sort(c b a)] +Javelin types --> "[sort(c b a)] +Javelin says, "a b c" +``` + +``` +> teach/list @switch 1=1, say Third; say First; @break 1; say Second +Javelin types --> @switch 1=1, say Third; say First; @break 1; say Second +You say, "First" +You say, "Third" +``` + + +### See Also +- [@trigger](/reference/sharpmush-help/penncmd/#trigger) +- [@include](/reference/sharpmush-help/penncmd/#include) +## drop +`drop <object>` + +Drops `<object>`, if you are presently carrying it. If the room the object is dropped in has a DROP-TO set, the object may automatically be sent to another location. + +In order to drop an object, you must pass it's Drop lock and your location's DropIn lock. + + +### See Also +- [empty](/reference/sharpmush-help/penncmd/#empty) +- [get](/reference/sharpmush-help/penncmd/#get) +- [STICKY](/reference/sharpmush-help/pennflag/#sticky) +- [DROP-TO](/reference/sharpmush-help/pennconf/#drop-to) +## enter +`enter <object>` + +Used to enter a thing or player. You can only enter an object if you own it or if it is set ENTER_OK. You must also pass the enter-lock, if it is set. Entering an object triggers is @enter/@oenter/@oxenter messages and its @aenter actions. If you fail the enter-lock, the object's @efail/@oefail/@aefail messages and actions are triggered. + +Insides of objects are best used for vehicles, or storage spaces when you don't have a home. You can describe the interior of an object differently from its exterior by using @idescribe. + +See: [@enter](/reference/sharpmush-help/penncmd/#enter), [@efail](/reference/sharpmush-help/penncmd/#efail), [@ealias](/reference/sharpmush-help/penncmd/#ealias), [leave](/reference/sharpmush-help/penncmd/#leave), [@lock](/reference/sharpmush-help/penncmd/#lock), [@idescribe](/reference/sharpmush-help/penncmd/#idescribe), [INTERIORS](/reference/sharpmush-help/penntop/#interiors) +## examine +`examine[/<switches>] <object>[/<attribute>]` + +Displays all available information about `<object>`. `<object>` may be an object, 'me' or 'here'. You must control the object to examine it. If you do not own the object, or it is not visible, you will just see the name of the object's owner. May be abbreviated 'ex `<object>`'. If the attribute parameter is given, you will only see that attribute (good for looking at code). You can also wildcard match on attributes. +The * wildcard matches any number of characters except a backtick (`). +The ? wildcard matches a single character except a backtick (`). +The ** wildcard matches any number of characters, including backticks. +For example, to see all the attributes that began with a 'v' you could do ex `<object>`/v** + +The `/brief` switch is equivalent to the 'brief' command. +The `/debug` switch is wizard-only and shows raw values for certain fields in an object. +The `/mortal` switch shows an object as if you were a mortal other than the object's owner and is primarily useful to admins. This switch ignores the object's VISUAL flag (but not its attribute flags) +The `/parent` switch show attributes that would be inherited from the object's parents, if you have permission to examine the attributes on the parent. +The `/all` switch shows the values of VEILED attributes. +The `/opaque` switch omits contents listings. + + +### See Also +- [ATTRIBUTE TREES](/reference/sharpmush-help/pennattr/#attribute-trees) +- [brief](/reference/sharpmush-help/penncmd/#brief) +- [lattr()](/reference/sharpmush-help/pennfunc/#lattr) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## follow +`follow <object>` + +If you pass the object's follow lock, you begin following it. As the object moves around (except if it @teleports away or goes home), you will automatically move around with it, so long as you pass all the locks and enter/leave locks on the exits and things the object moves through. This doesn't prevent you from going somewhere else on your own. + + +### See Also +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [dismiss](/reference/sharpmush-help/penncmd/#dismiss) +- [desert](/reference/sharpmush-help/penncmd/#desert) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [following()](/reference/sharpmush-help/pennfunc/#following) +- [@follow](/reference/sharpmush-help/penncmd/#follow) +- [@ofollow](/reference/sharpmush-help/penncmd/#ofollow) +- [@afollow](/reference/sharpmush-help/penncmd/#afollow) +## dismiss +`dismiss <object>` +`dismiss` + +The dismiss command stops `<object>` from following you. If no object is given, it stops everyone from following you. + + +### See Also +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [desert](/reference/sharpmush-help/penncmd/#desert) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +## desert +`desert <object>` +`desert` + +The desert command stops `<object>` from following you and stops you from following `<object>`. That is, it's shorthand for 'unfollow `<object>`' and 'dismiss `<object>`'. If no object is given, it stops everyone from following or leading you. + + +### See Also +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +- [dismiss](/reference/sharpmush-help/penncmd/#dismiss) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [following()](/reference/sharpmush-help/pennfunc/#following) +## empty +`empty <object>` + +The empty command attempts to move all the contents of `<object>` to `<object>`'s location. You must either be holding `<object>` (in which case the command is like getting `<object>`'s `<item>` for each item) or be in the same location as `<object>` (in which case the command is like getting `<object>`'s `<item>` and dropping it). + +The empty command assumes that all `<object>`'s items pass through the hands of the player running the command. Therefore, the same kinds of locks and messages that are applied in a possessive get (and, possibly, a drop) are applied to each item in `<object>`. It is therefore possible to fail to empty an object for many reasons, even when you could do so using "extraphysical" methods (teleporting items, forcing the object to drop them, or forcing the items to leave the object.) + + +### See Also +- [get](/reference/sharpmush-help/penncmd/#get) +- [drop](/reference/sharpmush-help/penncmd/#drop) +## get +## take +`get <object>` +`get <box>'s <object>` + +The first form of this command lets you pick up `<object>` from your current location. The second form allows you to take `<object>` from inside `<box>`'s inventory. + +In both cases, you must pass `<object>`'s Basic @lock, and the @lock/take of it's location. + +To get an object from someone else's inventory, the possessive_get @config option must be true (and, if `<box>` is a disconnected player, so must possessive_get_d). `<box>` must also be set ENTER_OK. + +'take' is usually an alias for the 'get' command. + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [ENTER_OK](/reference/sharpmush-help/pennflag/#enterok) +- [give](/reference/sharpmush-help/penncmd/#give) +- [drop](/reference/sharpmush-help/penncmd/#drop) +- [@success](/reference/sharpmush-help/penncmd/#success) +- [inventory](/reference/sharpmush-help/penncmd/#inventory) +## @buy +## @abuy +## @obuy +`@buy <object>[=<message>]` +`@obuy <object>[=<message>]` +`@abuy <object>[=<message>]` + +These attributes contain the message shown to a player who successfully buys something from `<object>` using the "buy" command, the message shown to others in the room when something is bought from `<object>` (prefixed with the buyer's name), and the actions to be taken by `<object>` when something is bought from it, respectively. Each attribute is passed the item being purchased as %0 and the amount paid for it as %1. + +Example: +``` +> @buy Vendor=udefault(me/buy`%0,You buy %0 for %1 [money(%1)]., %0, %1) +> @obuy Vendor=hands some money to [name(me)] for [art(%0)] %0. +> @abuy Vendor=:goes into the storeroom. ; @wait 2=:returns with %n's %0. +``` + + +### See Also +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [@pricelist](/reference/sharpmush-help/penncmd/#pricelist) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [@cost](/reference/sharpmush-help/penncmd/#cost) +- [give](/reference/sharpmush-help/penncmd/#give) +## @pricelist +`@pricelist <object>=<item1>:<price1>[,<price2>][ <item2>:...]` + +The PRICELIST attribute is a space-delimited list of item names and prices that are checked when the 'buy' command is run. + +An item name may have '_'s where the player would use a space in the name. + +A price is either a number (20), a range of numbers (10-30), or a minimum number (10+). An item can also have several different prices, separated by commas. + +A player must pass `<object>`'s @lock/pay in order to purchase from it. + +Example:: +``` +> @PRICELIST vendor=mansion:1000+ large_house:100-200 house:20,30,50 +``` + + +### See Also +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [@buy](/reference/sharpmush-help/penncmd/#buy) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [@cost](/reference/sharpmush-help/penncmd/#cost) +- [give](/reference/sharpmush-help/penncmd/#give) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +## buy +`buy <item>[ from <vendor>][ for <cost>]` + +When you try buying an item, PRICELIST attributes on nearby objects (or `<vendor>` if given) will be checked for matching item:costs. If `<cost>` is given, the first item that matches that cost will be purchased. Otherwise, the first matching item that you can afford will be purchased. You must pass the vendor's @lock/pay in order to purchase items. + +If the pricelist match contains a list of prices, ITEM:30,20,10, the first one you can afford will be the resulting price. + +Example: +``` +> @PRICELIST vendor=coke:20 pepsi:20 +> &drink`coke vendor=You enjoy a delicious coke. +> &drink`pepsi vendor=It tastes like a funny coke. +> @BUY vendor=u(drink`%0) +> buy coke +You enjoy a delicious coke. +``` + + +### See Also +- [@BUY](/reference/sharpmush-help/penncmd/#buy) +- [@PRICELIST](/reference/sharpmush-help/penncmd/#pricelist) +- [give](/reference/sharpmush-help/penncmd/#give) +- [@COST](/reference/sharpmush-help/penncmd/#cost) +## give +`give[/silent] <recipient>=<number>` +`give[/silent] <number> to <recipient>` +`give <recipient>=<object>` +`give <object> to <recipient>` + +The first two forms of this command give `<number>` pennies to `<recipient>`. If `<recipient>` is a non-player, it must have an @COST, and any pennies given to it will go to its owner. The amount given must match `<recipient>`'s @cost (if set). If `/silent` is given, the message informing the recipient how many pennies were given is suppressed. Wizards may "give" a negative number of pennies to take from players. When you give `<recipient>` pennies, his PAYMENT/OPAYMENT/APAYMENT attributes are triggered. You must pass `<recipient>`'s @lock/pay, unless you are a Wizard and are either giving a negative number of pennies, or giving to a player with no @cost. + +The last two forms of this command give an `<object>` from your inventory to `<recipient>`. The recipient must be set ENTER_OK, and you must pass his @lock/from. You must also pass `<object>`'s @lock/give, and `<object>` must pass `<recipient>`'s @lock/receive. When you give an object successfully, your GIVE/OGIVE/AGIVE attributes, `<recipient>`'s RECEIVE/ORECEIVE/ARECEIVE attributes, and `<object>`'s SUCCESS/ASUCCESS/OSUCCESS attributes are all triggered. + + +### See Also +- [@pay](/reference/sharpmush-help/penncmd/#pay) +- [@cost](/reference/sharpmush-help/penncmd/#cost) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [inventory](/reference/sharpmush-help/penncmd/#inventory) +- [@receive](/reference/sharpmush-help/penncmd/#receive) +- [@give](/reference/sharpmush-help/penncmd/#give) +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [@success](/reference/sharpmush-help/penncmd/#success) +## go +## goto +## move +`go[to] <direction>` +`go[to] home` +`move <direction>` +`move home` + +Goes in the specified direction. `<Direction>` can be the name or alias of an exit in your area, the enter alias of an object in your area, or the leave alias of the object you are in. You do not need to use the word 'go' or 'move', in fact -- simply typing the direction will have the same effect. + +'go home' is a special command that returns you to your home room/object. + + +### See Also +- [HOME](/reference/sharpmush-help/penntop/#home) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [@ealias](/reference/sharpmush-help/penncmd/#ealias) +- [@lalias](/reference/sharpmush-help/penncmd/#lalias) +- [EXITS](/reference/sharpmush-help/penntop/#exits) +## INFO +`INFO` + +This command returns some information about the MUSH you are on, such as its version number, time of last restart, number of players currently connected, and size of database. It can be issued from the connect screen. + + +### See Also +- [MSSP-REQUEST](/reference/sharpmush-help/penncmd/#mssp-request) +## inventory +`inventory` + +Lists what you are carrying. Can be abbreviated by just 'i', or 'inv'. It also tells you how much MUSH money you have. If you are not set OPAQUE, others will also be able to see what is in your inventory by looking at you. + +Note that on some MUSHes it is possible to take things that are in someone else's inventory. To be safe, @lock any objects that you do not want to lose. + + +### See Also +- [score](/reference/sharpmush-help/penncmd/#score) +- [take](/reference/sharpmush-help/penncmd/#take) +- [drop](/reference/sharpmush-help/penncmd/#drop) +- [OPAQUE](/reference/sharpmush-help/pennflag/#opaque) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@invformat](/reference/sharpmush-help/penncmd/#invformat) +## leave +`leave` + +The command leave allows you to exit an object you have enter'ed into. When you leave an object, its @leave/@oleave/@oxleave messages are triggered, and its @aleave actions are triggered. + +The NO_LEAVE flag may be enabled on some MUSHes. Objects set with this flag cannot be left. @lock/leave may also be enabled on some MUSHes, which allows you to set who can leave the object. If you fail to leave, the object's @lfail/@olfail/@alfail messages/actions will be triggered. + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [@leave](/reference/sharpmush-help/penncmd/#leave) +- [@lfail](/reference/sharpmush-help/penncmd/#lfail) +- [@lalias](/reference/sharpmush-help/penncmd/#lalias) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [INTERIORS](/reference/sharpmush-help/penntop/#interiors) +## LOGOUT +`LOGOUT` + +LOGOUT is similar to QUIT, but instead of disconnecting you from the game completely, it merely disconnects you from your current character and returns you to the opening welcome screen. This is useful if you want to disconnect and then reconnect to another character. Unlike most commands, it is case-sensitive and must be typed in all caps. +## look +## read +`look [<object>]` +`look <container>'s <object>` +`look <exit>'s <object>` +`look/outside [<object>]` + +Displays the description of `<object>`, or the room you're in if you don't name a specific object. You can also look at objects inside others, as long as the `<container>` is not set OPAQUE, or at objects on the other side of an exit, if the exit is set TRANSPARENT or CLOUDY. + +If you're inside a container, `look/outside` allows you to look at the room the container is in, or at other objects in your container's location, as long as your container is not set OPAQUE. + +See [look2](/reference/sharpmush-help/penncmd/#look2). +## look2 +If you look at an object that is not set OPAQUE, you will see any non-DARK items in its inventory. You can look at DARK items in your location if you know what their name is by typing 'look `<object>`', but they will not show up in the list of contents. + +When you type 'look' alone, you look at your current location. For a room, this normally shows you the room's description, the list of contents, and any obvious exits from the room. For an object, it shows you the interior description (@idescribe) instead, if one is set. + +If a room is set DARK, when you look you will not see any of the exits or contents of the room, unless they are set LIGHT. + +'look' may be abbreviated 'l', and is sometimes aliased as 'read'. + + +### See Also +- [OPAQUE](/reference/sharpmush-help/pennflag/#opaque) +- [FLAGS](/reference/sharpmush-help/pennflag/#flags) +- [@describe](/reference/sharpmush-help/penncmd/#describe) +- [@adescribe](/reference/sharpmush-help/penncmd/#adescribe) +- [@odescribe](/reference/sharpmush-help/penncmd/#odescribe) +- [DARK](/reference/sharpmush-help/pennflag/#dark) +- [LIGHT](/reference/sharpmush-help/pennflag/#light) +- [TRANSPARENT](/reference/sharpmush-help/pennflag/#transparent) +- [CLOUDY](/reference/sharpmush-help/pennflag/#cloudy) +## news +`news [<topic>]` + +The news system works just like the help system. Many MUSHes use it to provide standard information on the rules, theme, and customized commands of the particular MUSH. It is highly recommended that you read it regularly. +## page +`page[/<switch>] [<player-list>=]<message>` + +This command sends a message to a player or list of players. If the player's name contains spaces, surround it with double-quotes. If you have already paged someone since connecting, just typing: + +'`page <message>`' or '`page =<message>`' + +will send the message to the last person paged. You cannot page a player if they are set HAVEN or if you do not pass their @lock/page. In the latter case, the player's PAGE_LOCK`FAILURE, PAGE_LOCK`OFAILURE, and PAGE_LOCK`AFAILURE attributes will be activated if set. + +Examples: +``` +> page airwolf=hi there! +You paged Airwolf with 'hi there!'. +> page see, I don't have to retype the name. +You paged Airwolf with 'see, I don't have to retype the name.'. +> page "John Lennon" Ringo=Paul's fine! +``` + +See [page2](/reference/sharpmush-help/penncmd/#page2). +## page2 +Page will attempt a partial match on the name, checking both for an @alias and to see if the name matches someone connected. If the first character of `<message>` is a : or a ;, it will send the page in pose format. + +Objects may page players, but not vice versa. If an object pages a NOSPOOF player, that player will see the object's number in square brackets, in front of the message, in a fashion similar to the way NOSPOOF flags emits. + +When a player is paged, their PAGEFORMAT attribute is checked, and if exists, the page as viewed by the player is set to the results of calling PAGEFORMAT. See help @pageformat. + +Page takes three switches: `/noeval`, `/override`, and `/port`. + +The `/noeval` switch prevents the MUSH from evaluating the message. +The `/override` switch is admin-only, and overrides pagelocks and HAVEN. +The `/port` switch is admin-only, and will page a single port descriptor directly, including connections that have not yet logged into a player. + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@alias](/reference/sharpmush-help/penncmd/#alias) +- [@pageformat](/reference/sharpmush-help/penncmd/#pageformat) +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [:] +- [;] +- [HAVEN](/reference/sharpmush-help/pennflag/#haven) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [FLAGS](/reference/sharpmush-help/pennflag/#flags) +## : +## ; +## pose +## semipose +`pose[/noeval] <action>` +`:<action>` + +`pose/nospace[/noeval] <action>` +`semipose[/noeval] <action>` +`;<action>` + +The pose and semipose commands allow you to perform actions. Pose shows your name, a space, and then `<action>`; semipose omits the space. They can be abbreviated to ':' and ';' respectively. The `/noeval` switch stops `<action>` from being evaluated. + +If you have a SPEECHMOD attribute set, it will be evaluated with `<action>` as %0 and either : (for pose) or ; (for semipose) as %1. The result is used instead of `<action>`, as long as it returns a non-empty string. + +See [pose2](/reference/sharpmush-help/penncmd/#pose2) for examples. + +### See Also +- [say](/reference/sharpmush-help/penncmd/#say) +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@speechmod](/reference/sharpmush-help/penncmd/#speechmod) +## pose2 +Examples: +``` +> pose waves. +Bob waves. +``` + +``` +> :laughs out loud. +Bob laughs out loud. +> ;'s laughing on the inside. +Bob's laughing on the inside. +``` +## " +## say +`say[/noeval] <message>` +`"<message>` + +Says `<message>` out loud. The message will be enclosed in double-quotes. A single double-quote is the abbreviation for this common command. If the `/noeval` switch is given, `<message>` will not be evaluated. + +If you have a SPEECHMOD attribute set, it will be evaluated with `<message>` passed as %0 and " (a double-quote) passed as %1. The result is shown instead of `<message>`, as long as it evaluates to a non-empty string. + +If `<message>` begins with a double-quote and the chat_strip_quote @config option is on, the leading " will be stripped. + + +### See Also +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [whisper](/reference/sharpmush-help/penncmd/#whisper) +- [@speechmod](/reference/sharpmush-help/penncmd/#speechmod) +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [page](/reference/sharpmush-help/penncmd/#page) +## score +`score` + +Displays how many pennies you have. Helpful to see if any machines are looping. If they are, your pennies will be being rapidly drained. MUSH money may also be used for other purposes in the game. + + +### See Also +- [LOOPING](/reference/sharpmush-help/penntop/#looping) +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [QUEUE](/reference/sharpmush-help/penntop/#queue) +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [TRACK_MONEY](/reference/sharpmush-help/pennflag/#trackmoney) +## think +`think <message>` + +You can use this command to send a private message to yourself. Pronoun substitution is performed. This is essentially equivalent to doing a "`@pemit/silent me=<message>`". + +One possible use: `@adesc me=think %n just looked at you.` + + +### See Also +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@@](/reference/sharpmush-help/penncmd/) +## QUIT +`QUIT` + +Log out and leave the game. Must be in all capitals. +## unfollow +`unfollow` +`unfollow <object>` + +This command stops you from following an object that you were formerly following. If no object is given, you stop following everyone you were following. + + +### See Also +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [dismiss](/reference/sharpmush-help/penncmd/#dismiss) +- [desert](/reference/sharpmush-help/penncmd/#desert) +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [@follow](/reference/sharpmush-help/penncmd/#follow) +- [@ofollow](/reference/sharpmush-help/penncmd/#ofollow) +- [@afollow](/reference/sharpmush-help/penncmd/#afollow) +## use +`use <object>` + +This command attempts to "use" `<object>`. If you do not pass `<object>`'s @lock/use, the UFAIL/OUFAIL/AUFAIL attributes are triggered. + +If you pass the lock, you will see `<object>`'s USE attribute, and others in your location will see `<object>`'s OUSE. Depending on `<object>`'s CHARGES attribute, one of `<object>`'s AUSE or RUNOUT attributes will be triggered - see [@charges](/reference/sharpmush-help/penncmd/#charges) for more information. + + +### See Also +- [@use](/reference/sharpmush-help/penncmd/#use) +- [@charges](/reference/sharpmush-help/penncmd/#charges) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@ufail](/reference/sharpmush-help/penncmd/#ufail) +## WARN_ON_MISSING +This internal command is run when someone attempts to run a command which starts with a function, for example: +``` +&test me=$test: [emit(test)] +``` +By default it sends the owner of the offending object a message, so they can fix the code to use a command instead of a function. The command must be enabled (either in restrict.cnf or with @command/enable) in order to be used. It can be @hooked to set custom behaviour. + +Example: +``` +> @hook/override warn_on_missing=#0, wom +> &wom #0=$warn_on_missing: @pemit/list %# [owner(%!)]=[name(%!)] has broken code in %=! +``` + +``` +> &wom #0=$warn_on_missing *: @pemit [owner(%!)]=[name(%!)] has broken code in %= - attempted to run %0! +``` + + +### See Also +- [huh_command](/reference/sharpmush-help/penncmd/#huhcommand) +- [unimplemented_command](/reference/sharpmush-help/penncmd/#unimplementedcommand) +## UNIMPLEMENTED_COMMAND +This internal command is run when someone attempts to use an unimplemented command. Currently, this only occurs when a command has been added with @command/add but has not been properly @hooked to run softcode. UNIMPLEMENTED_COMMAND cannot be run directly. + +By default, the command just shows the message "This command has not been implemented.", but you can @hook it to perform other actions. + + +### See Also +- [huh_command](/reference/sharpmush-help/penncmd/#huhcommand) +- [warn_on_missing](/reference/sharpmush-help/penncmd/#warnonmissing) +- [@command](/reference/sharpmush-help/penncmd/#command) +- [@hook](/reference/sharpmush-help/penncmd/#hook) +## whisper +`whisper <player>=<message>` +`whisper/silent <player>=<message>` +`whisper/noisy <player>=<message>` +`whisper/noeval <player>=<message>` +`whisper/list <players>=<message>` + +Whispers the message to the named person, if they are nearby. If `<message>` is prefixed with a ':' or ';' it will be posed or semiposed, respectively. + +With the `/noisy` switch, other players in the room may be informed who you whisper to (but not what you whisper); the probability that a noisy whisper will be heard is set by the 'whisper_loudness' @config option. With the `/silent` switch, the whisper will not be overheard. (When neither switch is given, the default behaviour is controlled by the 'noisy_whisper' @config option.) + +`<message>` will not be evaluated if the `/noeval` switch is given. + +The `/list` switch lets you whisper to multiple people at once. In this case, `<players>` is a space-separated list of names, and names with spaces should be enclosed in double-quotes, as per page/list. + + +### See Also +- [page](/reference/sharpmush-help/penncmd/#page) +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +## WHO +## DOING +`WHO [<pattern>]` +`DOING [<pattern>]` + +For mortals, the WHO command displays a list of players currently connected to the MUSH, the amount of time they've been connected, their idle time, and their @doing. Hidden players are not shown. + +For admin, WHO shows the names of online players, their location, connection/idle times, the number of commands typed through the connection, the descriptor/port number, and the host the player is connected from. It also includes hidden players, and connections which are at the login screen, but have not yet connected to a player. + +Admin can use the DOING command to see the same output mortals see with WHO, with the exception that dark/hidden players are included. + +If a `<pattern>` is given for either command, only connected players whose names start with `<pattern>` are shown. If `<pattern>` is a wildcard, only players whose names or aliases match the pattern are shown. + +See [who2](/reference/sharpmush-help/penncmd/#who2). +## WHO2 +In earlier versions of PennMUSH, WHO was a socket command (meaning only players could use it, and that while it could not be overwritten, you could use softcoded 'who' commands along side it which worked as long as they weren't typed in all upper-case). Existing games which have softcoded 'who' commands can maintain this feature by using an @hook/ignore on the WHO command, such as: +``` +> &HOOK.WHO <object>=not(comp(left(%c,3),WHO)) +> @hook/ignore WHO=<object>,HOOK.WHO +``` + +@hooks are not maintained across reboots, and should be placed into an @startup on a low-dbref object. + +Note: The WHO command available at the login screen is totally separate from the in-game WHO command, and is not affected by any changes to the in-game WHO. To alter that, use the WHO_FILE @config option. + + +### See Also +- [@doing](/reference/sharpmush-help/penncmd/#doing) +- [@poll](/reference/sharpmush-help/penncmd/#poll) +- [SESSION](/reference/sharpmush-help/penncmd/#session) +## SESSION +`SESSION [<pattern>]` + +The SESSION command is the same as the admin WHO, but instead of showing the hostname, it shows the number of bytes sent to, received from, and pending for each connection. `<pattern>` limits the output, only showing players whose name begins with `<pattern>`, or whose names or aliases match `<pattern>` if it's a wildcard pattern. + + +### See Also +- [WHO](/reference/sharpmush-help/penncmd/#who) +## with +`with[/room] <obj>=<command>` + +Attempts to run a user-defined command on a specific object. If the `/room` switch is given, `<obj>` must be a room or your current location, and its contents are checked for commands as if it was a master room. + +`<obj>` must be an object near you, an object you control, your ZMO or (if the `/room` switch is given) the Master Room. + + +### See Also +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +## socket commands +These commands can only be entered by a connected player through their client. They generally do things that only affect a specific connection and would be meaningless if run by an object or disconnected player. + +- IDLE +- INFO +- LOGOUT +- OUTPUTPREFIX +- OUTPUTSUFFIX +- PROMPT_NEWLINES +- QUIT +- SCREENWIDTH +- SCREENHEIGHT +- SOCKSET +- MSSP-REQUEST + +In addition, the following commands can only be used at the login screen: + +- cd +- ch +- cv +- connect +- create +- register + +The WHO command can also be used at the login screen. Please note that this is different to the in-game WHO command. +## MSSP-REQUEST +`MSSP-REQUEST` + +This socket command shows some basic information about the MUSH, along with any admin-defined information specified in mush.cnf with the 'mssp' option. The info is also shown via the MSSP telnet option. Useful for MUD crawlers and bots. For more information about the MUD Server Status Protocol (MSSP), see http://tintin.sourceforge.net/mssp/ + + +### See Also +- [INFO](/reference/sharpmush-help/penncmd/#info) +## @SUGGEST +`@suggest[/list]` +`@suggest/add <category>=<word>` +`@suggest/delete <category>=<word>` + +Given a list of known good words in a category, the mush can suggest ones based on misspelled or otherwise invalid words. This is used for suggesting function names, help entries, etc. @suggest provides a way to add custom categories and vocabulary words. + +When given no switches or `/list`, shows all available suggestion categories. If the dict_file config option is set, tries to populate the 'words' category from it. + +`/add` and `/delete` are Wizard-only switches that do the respective operation for a word in a given category. + +Example: +``` +> @suggest/add pets=dog +> @suggest/add pets=cat +> @suggest/add pets=bird +> think suggest(pets, birb) +BIRD +``` + + +### See Also +- [suggest()](/reference/sharpmush-help/pennfunc/#suggest) + diff --git a/src/content/docs/reference/sharpmush-help/penncode.md b/src/content/docs/reference/sharpmush-help/penncode.md new file mode 100644 index 0000000..3c82567 --- /dev/null +++ b/src/content/docs/reference/sharpmush-help/penncode.md @@ -0,0 +1,184 @@ +--- +title: "Coding and Programming" +description: "SharpMUSH documentation for Coding and Programming" +--- + +## code + +## contact +PennMUSH is developed by a team of developers whose names are listed in [changes](/reference/sharpmush-help/pennconf/#changes). Suggestions, comments, and bug reports are welcome. + +The main PennMUSH web page is at http://www.pennmush.org + +Report bugs and make suggestions at https://github.com/pennmush/pennmush/issues + +The PennMUSH community page is at http://community.pennmush.org + +For information about downloading PennMUSH, see [download](/reference/sharpmush-help/penncode/#download). +For information about changes in versions of the code, see [changes](/reference/sharpmush-help/pennconf/#changes). + +## download +The latest version of this MUSH code is available from https://github.com/pennmush/pennmush/releases or http://download.pennmush.org. It will be called something like pennmush-1.8.3p9.tar.bz2, depending on the version number. + +The MUSH manual is available from http://download.pennmush.org, in the /Manuals directory. It should be called mushman.2.008.tar.Z or something similar; you should attempt to get at least version 2.007. Also on that site is Javelin's Guide for PennMUSH Gods, in /Guide, available as plain text or +HTML. + +## i18n + +## internationalization + +## locale + +## translation +Internationalization support in PennMUSH includes: +* Support for (8-bit) locale-based character sets, including translation of iso-8859-1 accented characters to html entities for Pueblo, the `accent()` and `stripaccents()` functions, and the NOACCENTS flag. +* Support for locale-based date/time formats +* Support for locale-based message sets for translations of server messages. There are active translation teams (and you can join!) and several languages have practically complete translation files available. +* Some support for locale-based string collation +* The ability to alias command and function names, so you can generate a set of translated commands/functions. + +Most of these features get enabled by setting an appropriate environment variable in the PennMUSH restart script. + +Unicode is not currently supported. + +## copyright + +## copyrite + +## license +Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006. + +I. Copyrights + +PennMUSH 1.x +Copyright (c) 1995-2006, T. Alexander Popiel <talek@pennmush.org> and Shawn Wagner <raevnos@pennmush.org>. + +Some code used in this server may have been derived from the TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker. + +Some code used in this server may have been derived from TinyMUSH 2.0. Copyright (c) 1995, Joseph Traub, Glenn Crocker. + +Some code used in this server may have been derived from TinyMUD. Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman and Bennet Yee. + + *------------------------------------------------------------------------* + +II. License + +Because PennMUSH includes parts of multiple works, you must comply with all of the relevant licenses of those works. The portions derived from TinyMUD/TinyMUSH 2.0 are licensed under the following terms: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that: (1) source code distributions + retain the above copyright notice and this paragraph in its entirety, and + (2) distributions including binary code include the above copyright + notice and this paragraph in its entirety in the documentation or other + materials provided with the distribution. The names of the copyright + holders may not be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The portions derived from TinyMUSH 2.2 are used under the Artistic License. The Artistic License is also the license under which you are granted permission to copy and modify PennMUSH: + +The Artistic License + +Preamble + +The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. + +Definitions: + +"Package" refers to the collection of files distributed by the Copyright +Holder, and derivatives of that collection of files created through +textual modification. +"Standard Version" refers to such a Package if it has not been modified, +or has been modified in accordance with the wishes of the Copyright +Holder. +"Copyright Holder" is whoever is named in the copyright or copyrights +for the package. +"You" is you, if you're thinking about copying or distributing this Package. +"Reasonable copying fee" is whatever you can justify on the basis of media +cost, duplication charges, time of people involved, and so on. (You will +not be required to justify it to the Copyright Holder, but only to the +computing community at large as a market that must bear the fee.) +"Freely Available" means that no fee is charged for the item itself, +though there may be fees involved in handling the item. It also means +that recipients of the item may redistribute it under the same conditions +they received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that +you duplicate all of the original copyright notices and associated +disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications +derived from the Public Domain or from the Copyright Holder. A Package +modified in such a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of +the following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or an + equivalent medium, or placing the modifications on a major archive site + such as ftp.uu.net, or by allowing the Copyright Holder to include your + modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict with + standard executables, which must also be provided, and provide a separate + manual page for each non-standard executable that clearly documents how + it differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or +executable form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where + to get the Standard Version. + + b) accompany the distribution with the machine-readable source of the + Package with your modifications. + + c) accompany any non-standard executables with their corresponding + Standard Version executables, giving the non-standard executables + non-standard names, and clearly documenting the differences in manual + pages (or equivalent), together with instructions on where to get the + Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of +this Package. You may charge any fee you choose for support of this +Package. You may not charge a fee for this Package itself. However, you +may distribute this Package in aggregate with other (possibly commercial) +programs as part of a larger (possibly commercial) software distribution +provided that you do not advertise this Package as a product of your own. + +6. The scripts and library files supplied as input to or produced as +output from the programs of this Package do not automatically fall under +the copyright of this Package, but belong to whomever generated them, +and may be sold commercially, and may be aggregated with this Package. + +7. C or perl subroutines supplied by you and linked into this Package +shall not be considered part of this Package. + +8. The name of the Copyright Holder may not be used to endorse or +promote products derived from this software without specific prior +written permission. + +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/src/content/docs/reference/sharpmush-help/pennconf.md b/src/content/docs/reference/sharpmush-help/pennconf.md index 7727b72..01f1fff 100644 --- a/src/content/docs/reference/sharpmush-help/pennconf.md +++ b/src/content/docs/reference/sharpmush-help/pennconf.md @@ -1,10 +1,10 @@ --- -title: Admin Configuration Help -description: Helpfiles on SharpMUSH Config. +title: "Configuration" +description: "SharpMUSH documentation for Configuration" --- ## @config parameters -Many of the mush's run-time options can be set from the game by wizards, using `@config/set <option>=<new value>`. Those that can be set with visible changes are listed below, grouped by category. See [@config](#@config) for details on each. +Many of the mush's run-time options can be set from the game by wizards, using `@config/set <option>=<new value>`. Those that can be set with visible changes are listed below, grouped by category. See [@config <category>](/reference/sharpmush-help/penncmd/#config-category) for details on each. Categories: - Attribs @@ -48,7 +48,7 @@ These options control chat system settings. - `max_player_chans=<number>`: How many channels can each non-admin player create? If 0, mortals cannot create channels. - `noisy_cemit=<boolean>`: Is @cemit/noisy the default? - `chan_title_len=<number>`: How long can @channel/title's be? -- `use_muxcomm=<boolean>`: Enable MUX-style channel aliases? See [muxcomsys](#muxcomsys) +- `use_muxcomm=<boolean>`: Enable MUX-style channel aliases? See [muxcomsys](/reference/sharpmush-help/pennchat/#muxcomsys) - `chat_token_alias=<character>`: A single character that can be used as well as + for talking on channels (+<chan> <msg>) ## @config cmds @@ -71,12 +71,12 @@ These are cosmetic options of various sorts. - `money_plural=<string>`: What are many pennies called? - `player_name_spaces=<boolean>`: Can player names have spaces in them? - `ansi_names=<boolean>`: Are names in look hilighted? -- `monikers=<list>`: Where should @monikers be displayed? See [monikers](#monikers) +- `monikers=<list>`: Where should @monikers be displayed? See [monikers](/reference/sharpmush-help/penntop/#monikers) - `float_precision=<numbers>`: How many digits after the decimal point in floating point numbers are kept when formatting the result of a floating point function? - `comma_exit_list=<boolean>`: Do exits show up like North, East, and West or as North East West? - `count_all=<boolean>`: Does the count of connected players in WHO include hidden connections for mortals? -See [@config cosmetic2](#@config cosmetic2) +See [@config cosmetic2](/reference/sharpmush-help/pennconf/#config-cosmetic2) ## @config cosmetic2 More cosmetic options. @@ -157,7 +157,7 @@ Limits and other constants. - `idle_timeout=<time>`: The number of minutes a connection can be idle before getting booted. 0 means no limit. - `unconnected_idle_timeout=<time>`: The number of minutes a connection can be sitting at the login screen before getting booted. 0 means no limit. -See [@config limits2](#@config limits2) +See [@config limits2](/reference/sharpmush-help/pennconf/#config-limits2) ## @config limits2 Limits and constants, continued. @@ -173,7 +173,7 @@ Limits and constants, continued. - `queue_loss=<number>`: One in <number> times, queuing a command will cost an extra penny that doesn't get refunded. - `queue_chunk=<number>`: How many queued commands get executed in a row before checking for network activity. -See [@config limits3](#@config limits3) +See [@config limits3](/reference/sharpmush-help/pennconf/#config-limits3) ## @config limits3 Limits and constants, continued. @@ -186,7 +186,7 @@ Limits and constants, continued. - `queue_entry_cpu_time=<number>`: The maximum number of milliseconds a queue entry can take to run. - `use_quota=<boolean>`: Controls if quotas are used to limit the number of objects a player can own. -See [@config limits4](#@config limits4) +See [@config limits4](/reference/sharpmush-help/pennconf/#config-limits4) ## @config limits4 Limits and constants, continued. diff --git a/src/content/docs/reference/sharpmush-help/pennevents.md b/src/content/docs/reference/sharpmush-help/pennevents.md index 6583b0f..8a162ed 100644 --- a/src/content/docs/reference/sharpmush-help/pennevents.md +++ b/src/content/docs/reference/sharpmush-help/pennevents.md @@ -1,6 +1,6 @@ --- -title: Admin Events Help -description: Helpfiles on SharpMUSH Event Handlers. +title: "Events" +description: "SharpMUSH documentation for Events" --- ## EVENTS @@ -22,9 +22,10 @@ The enactor of an event is either: 1. The executor that caused it, or 2. #-1 for system events without an executor. -See also: -- [event list](#event list) -- [event examples](#event examples) + +### See Also +- [- [event list](/reference/sharpmush-help/pennevents/#event-list) +- [event examples](/reference/sharpmush-help/pennevents/#event-examples) ## EVENT EXAMPLES Suppose you want random dbsave messages: @@ -47,7 +48,9 @@ Or admin want to be notified when a player connect attempt fails: Broadcast: [Event Handler]: On descriptor 3, from IP '127.0.0.1', a failed connect attempt to '#1': 'invalid password' ``` -See also: [event examples2](#event examples2) + +### See Also +- [event examples2](/reference/sharpmush-help/pennevents/#event-examples2) ## EVENT EXAMPLES2 Suppose you want `@pcreated` players to be powered builder, set shared and zonelocked to roys, but players created at the connect screen to not be: @@ -66,7 +69,7 @@ Event names are of the format *<type>\`<event>*. The 'type' is used simply to gr Event syntax in the help is of the form: *<eventgroup>\`<eventname>* (What is passed as %0, %1, ... %9) -The following event types and events have been added to SharpMUSH. To see the help for them, type [event type](#event type). +The following event types and events have been added to SharpMUSH. To see the help for them, type [event <type>](/reference/sharpmush-help/pennevents/#event-type). Event Types: - **dump**: dump\`5min, dump\`1min, dump\`complete, dump\`error @@ -180,7 +183,7 @@ To mimic old behaviour: - **socket\`loginfail** (*descriptor*, *IP*, *count*, *reason*, *playerobjid*, *name*) - Triggered when a login attempt fails. *<count>* is the number of fails in the past 10 minutes. If used in conjuction with the config option connect_fail_limit, then any failures after the limit is reached will **NOT** trigger socket\`loginfail. If the connect is a failed attempt to log into a valid player, *<playerobjid>* will be set to that objid. Otherwise it will be set to #-1. *<name>* is the name the connection attempted to connect with, and is only set when *<playerobjid>* is #-1. -- **socket\`createfail** (*descriptor*, *ip*, *count*, *reason*, *name[*, *error]*) +- **socket\`createfail** (*descriptor*, *ip*, *count*, *reason*, *name[*, *error](/reference/sharpmush-help/pennconf/#error)*) - Triggered when a player create attempt fails. *<count>* is the # of fails caused by this ip. If the failure is from an attempt to register a player via email, the error code of the mailer program is provided as *<error>*. **Note**: A sitelock rule with deny_silent will not trigger socket\`createfail or socket\`createfail. diff --git a/src/content/docs/reference/sharpmush-help/pennflag.md b/src/content/docs/reference/sharpmush-help/pennflag.md index 5ff6a1f..0c4e9c8 100644 --- a/src/content/docs/reference/sharpmush-help/pennflag.md +++ b/src/content/docs/reference/sharpmush-help/pennflag.md @@ -1,6 +1,6 @@ --- -title: Flag Help -description: Helpfiles on SharpMUSH Flags. +title: "Flags" +description: "SharpMUSH documentation for Flags" --- ## FLAGS @@ -11,9 +11,9 @@ Some flags can only be set on certain types of objects, such as just players or Flags can be set on an object with the `@set` command or `set()` function. To un-set a flag, use the exclamation point (`!`) before the flag name. For help on any particular flag, type **'help \<flag name\>'**. -A descriptive list of default flags is available in [flag list](#flag list). A complete list of all flags is available through `@flag/list`. +A descriptive list of default flags is available in [flag list](/reference/sharpmush-help/pennflag/#flag-list). A complete list of all flags is available through `@flag/list`. -Continued in [flags2](#flags2). +See [flags2](/reference/sharpmush-help/pennflag/#flags2). ## FLAGS2 @@ -23,11 +23,28 @@ You can see the list of flags set on an object in several ways: 2. Flag abbreviations are also visible after the object's name in the room description, if the object is not set OPAQUE and you are not set MYOPIC 3. The `lflags()` and `flags()` function will return a list of flag names and abbreviations for an object, respectively -Note: The object type (player, thing, room, exit or garbage) is not actually a flag. See [types of objects](#types of objects) for more information. - -See also: [examine](#examine), [flags()](#flags()), [hasflag()](#hasflag()), [orflags()](#orflags()), [andflags()](#andflags()), [orlflags()](#orlflags()), [andlflags()](#andlflags()), [types of objects](#types of objects), [type()](#type()), [hastype()](#hastype()), [@flag](#@flag), [FLAG LIST](#FLAG LIST), [@set](#@set), [set()](#set()), [attribute flags](#attribute flags) +Note: The object type (player, thing, room, exit or garbage) is not actually a flag. See [types of objects](/reference/sharpmush-help/penntop/#types-of-objects) for more information. + + +### See Also +- [examine](/reference/sharpmush-help/penncmd/#examine) +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [hasflag()](/reference/sharpmush-help/pennfunc/#hasflag) +- [orflags()](/reference/sharpmush-help/pennfunc/#orflags) +- [andflags()](/reference/sharpmush-help/pennfunc/#andflags) +- [orlflags()](/reference/sharpmush-help/pennfunc/#orlflags) +- [andlflags()](/reference/sharpmush-help/pennfunc/#andlflags) +- [types of objects](/reference/sharpmush-help/penntop/#types-of-objects) +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [@flag](/reference/sharpmush-help/penncmd/#flag) +- [FLAG LIST](/reference/sharpmush-help/pennflag/#flag-list) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [set()](/reference/sharpmush-help/pennfunc/#set) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) ## FLAG LIST +## FLAGS LIST | Flag | Title | Flag | Title | Flag | Title | |------|-------|------|-------|------|-------| @@ -69,7 +86,10 @@ If a room has the ABODE flag set, any player or thing can set his home there. It To make a room your home, type `@link me=here` while standing in the room. -See also: [@link](#@link), [LINK_OK](#LINK_OK) + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) ## ANSI @@ -79,7 +99,13 @@ When set, this flag allows a player to see ANSI highlight, generated by the `ans ANSI highlight can also be enabled on a per-connection basis with `@sockset`. -See also: [ansi()](#ansi()), [COLOR](#COLOR), [XTERM256](#XTERM256), [@config](#@config), [@sockset](#@sockset) + +### See Also +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [COLOR](/reference/sharpmush-help/pennflag/#color) +- [XTERM256](/reference/sharpmush-help/pennflag/#xterm256) +- [@config](/reference/sharpmush-help/penncmd/#config) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) ## AUDIBLE @@ -87,13 +113,17 @@ See also: [ansi()](#ansi()), [COLOR](#COLOR), [XTERM256](#XTERM256), [@config](# Objects which are set AUDIBLE forward sound in a number of ways. Only sound passing the object's `@filter`, and its `@lock/filter`, is forwarded. The lock receives the sound heard as *%0*. The forwarded sound is always prefixed with the object's `@prefix`. -If an AUDIBLE object has an `@forwardlist` attribute set, sound heard by the object is forwarded to the objects listed in the `@forwardlist`. See [@forwardlist](#@forwardlist) for more information. +If an AUDIBLE object has an `@forwardlist` attribute set, sound heard by the object is forwarded to the objects listed in the `@forwardlist`. See [@forwardlist](/reference/sharpmush-help/penncmd/#forwardlist) for more information. When a THING is set AUDIBLE, any sound made inside it is broadcast to other objects in its location. This is useful for coding vehicles. Only sound passing the `@filter` is broadcast, and is prefixed with the thing's `@prefix`, or "From [name(\<thing\>)], " if no `@prefix` is set. Setting the AUDIBLE flag on a ROOM activates audible exits in that room. EXITs which are set AUDIBLE propagate sound from their source room to their destination, prefixed with the exit's `@prefix`, or "From [name(home(\<exit\>))], " if no `@prefix` is set. -See also: [@forwardlist](#@forwardlist), [@filter](#@filter), [@prefix](#@prefix) + +### See Also +- [@forwardlist](/reference/sharpmush-help/penncmd/#forwardlist) +- [@filter](/reference/sharpmush-help/penncmd/#filter) +- [@prefix](/reference/sharpmush-help/penncmd/#prefix) ## TRACK_MONEY @@ -116,7 +146,9 @@ GAME: foo(#345) spent 100 pennies! GAME: Object Walker(#123) lost a Penny to queue loss. ``` -See also: [no_pay](#no_pay) + +### See Also +- [no_pay](/reference/sharpmush-help/pennconf/#nopay) ## CHOWN_OK @@ -124,7 +156,9 @@ See also: [no_pay](#no_pay) You can set this flag on an object you own to allow other players to transfer ownership of the object to themselves (using `@chown`), as long as they pass the object's `@lock/chown`. -See also: [@chown](#@chown) + +### See Also +- [@chown](/reference/sharpmush-help/penncmd/#chown) ## CLOUDY @@ -134,7 +168,10 @@ If this flag is set on a (non-TRANSPARENT) exit, when a player looks at the exit If the flag is set on a TRANSPARENT exit, when a player looks at the exit they will see only the description of the destination room following the exit's description, and will not see contents. -See also: [TRANSPARENT](#TRANSPARENT), [look](#look) + +### See Also +- [TRANSPARENT](/reference/sharpmush-help/pennflag/#transparent) +- [look](/reference/sharpmush-help/penncmd/#look) ## COLOR @@ -144,7 +181,12 @@ This flag indicates to the MUSH that the player's client can see ANSI colors, us ANSI colors can also be enabled on a per-connection basis with `@sockset`. -See also: [ANSI](#ANSI), [XTERM256](#XTERM256), [ansi()](#ansi()), [@sockset](#@sockset) + +### See Also +- [ANSI](/reference/sharpmush-help/pennflag/#ansi) +- [XTERM256](/reference/sharpmush-help/pennflag/#xterm256) +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) ## XTERM256 @@ -157,7 +199,12 @@ The flag is aliased to COLOR256 for MUX compatability. XTERM colors can also be enabled on a per-connection basis with `@sockset`. -See also: [ANSI](#ANSI), [COLOR](#COLOR), [ansi()](#ansi()), [@sockset](#@sockset) + +### See Also +- [ANSI](/reference/sharpmush-help/pennflag/#ansi) +- [COLOR](/reference/sharpmush-help/pennflag/#color) +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) ## CONNECTED @@ -167,7 +214,11 @@ This flag is used internally by the MUSH to track whether a player is currently Prior to 1.8.5p6, mortal objects couldn't use `hasflag(<player>, connected)` to see if a player was online, and needed to instead use `conn()` or `lwho()`. Starting with that version, any object can use `hasflag()` to see if they can see that a player is online. Be careful, when coding on a privileged object, not to give away the presence of hidden players! -See also: [conn()](#conn()), [lwho()](#lwho()), [mwho()](#mwho()) + +### See Also +- [conn()](/reference/sharpmush-help/pennfunc/#conn) +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [mwho()](/reference/sharpmush-help/pennfunc/#mwho) ## DARK @@ -183,7 +234,10 @@ If the "full_invis" `@config` option is on, DARK players and things will show up In the past, players set DARK were automatically hidden from the WHO list via `@hide`, but this no longer happens. If you wish to disappear completely, you must use `@hide` after setting yourself DARK. -See also: [LIGHT](#LIGHT), [@hide](#@hide) + +### See Also +- [LIGHT](/reference/sharpmush-help/pennflag/#light) +- [@hide](/reference/sharpmush-help/penncmd/#hide) ## DEBUG @@ -192,20 +246,24 @@ See also: [LIGHT](#LIGHT), [@hide](#@hide) The DEBUG flag is used for debugging MUSHcode. When an object is set DEBUG, all parser evaluation results will be shown to the object's owner and to any dbrefs in the object's DEBUGFORWARDLIST, in the format: ``` -##dbref! <string to evaluate> : -##dbref! recursive evaluation of functions in string -##dbref! <string to evaluate> => <evaluated string> +#dbref! <string to evaluate> : +#dbref! recursive evaluation of functions in string +#dbref! <string to evaluate> => <evaluated string> ``` Because the parser does recursive evaluations, you will see successive messages evaluating specific parts of an expression. This enables you to pinpoint exactly which evaluation is going wrong. Objects run under this flag are computationally expensive, and can generate large amounts of spam, so this flag should only be set when needed, and cleared afterwards. -There's also a DEBUG attribute flag, which only affects a single attribute; see [attribute flags](#attribute flags) for more information. You can also use the "}" command prefix to run a command with DEBUG output just once. +There's also a DEBUG attribute flag, which only affects a single attribute; see [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) for more information. You can also use the "}" command prefix to run a command with DEBUG output just once. + +See [debug2](/reference/sharpmush-help/pennflag/#debug2) for an example. -See [debug2](#debug2) for an example. -See also: [VERBOSE](#VERBOSE), [PUPPET](#PUPPET), [}](#}) +### See Also +- [VERBOSE](/reference/sharpmush-help/pennflag/#verbose) +- [PUPPET](/reference/sharpmush-help/pennflag/#puppet) +- [}] ## DEBUG2 @@ -215,14 +273,14 @@ See also: [VERBOSE](#VERBOSE), [PUPPET](#PUPPET), [}](#}) > &cmd test=$wc *: say String %0 has [strlen(%0)] letters and [words(%0)] words. > wc This is my test string -##14! String %0 has [strlen(%0)] letters and [words(%0)] words. : -##14! strlen(%0) : -##14! %0 => This is my test string -##14! strlen(%0) => 22 -##14! words(%0) : -##14! %0 => This is my test string -##14! words(%0) => 5 -##14! String %0 has [strlen(%0)] letters and [words(%0)] words. => +#14! String %0 has [strlen(%0)] letters and [words(%0)] words. : +#14! strlen(%0) : +#14! %0 => This is my test string +#14! strlen(%0) => 22 +#14! words(%0) : +#14! %0 => This is my test string +#14! words(%0) => 5 +#14! String %0 has [strlen(%0)] letters and [words(%0)] words. => String This is my test string has 22 letters and 5 words. Test says, "String This is my test string has 22 letters and 5 words." @@ -236,7 +294,9 @@ The DESTROY_OK flag allows anyone to `@destroy` it. This is good for "temporary" DESTROY_OK takes precedence over SAFE. -See also: [@destroy](#@destroy) + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) ## ENTER_OK @@ -255,7 +315,12 @@ If a thing is ENTER_OK, anyone can enter it (if they pass its `@lock/enter`), an ENTER_OK is often used in conjunction with AUDIBLE on vehicles and buildings. -See also: [enter](#enter), [give](#give), [@tel](#@tel), [@lock](#@lock) + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [give](/reference/sharpmush-help/penncmd/#give) +- [@tel](/reference/sharpmush-help/penncmd/#tel) +- [@lock](/reference/sharpmush-help/penncmd/#lock) ## FIXED @@ -263,7 +328,9 @@ See also: [enter](#enter), [give](#give), [@tel](#@tel), [@lock](#@lock) A FIXED exit cannot be unlinked. Only the owner can remove the FIXED flag. This flag is used to prevent accidental unlinking of important exits. -See also: [@unlink](#@unlink) + +### See Also +- [@unlink](/reference/sharpmush-help/penncmd/#unlink) ## FLOATING @@ -277,7 +344,13 @@ A FLOATING room is one that isn't linked to by any exits. Such rooms can only be A GAGGED player cannot speak, pose, emit, or whisper. They can still page and use commands. -See also: [say](#say), [pose](#pose), [@emit](#@emit), [whisper](#whisper), [page](#page) + +### See Also +- [say](/reference/sharpmush-help/penncmd/#say) +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [whisper](/reference/sharpmush-help/penncmd/#whisper) +- [page](/reference/sharpmush-help/penncmd/#page) ## GOING @@ -285,7 +358,9 @@ See also: [say](#say), [pose](#pose), [@emit](#@emit), [whisper](#whisper), [pag The GOING flag is used internally by the MUSH to mark objects which are scheduled for destruction (via `@destroy`). It cannot be set or cleared manually. -See also: [@destroy](#@destroy) + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) ## HALTED @@ -293,7 +368,10 @@ See also: [@destroy](#@destroy) A HALTED object cannot run its commands. Commands on the object are not even checked. The flag can be set with `@halt` and cleared with `@restart`. -See also: [@halt](#@halt), [@restart](#@restart) + +### See Also +- [@halt](/reference/sharpmush-help/penncmd/#halt) +- [@restart](/reference/sharpmush-help/penncmd/#restart) ## HAVEN @@ -303,7 +381,10 @@ A HAVEN room prevents people in it from paging each other or using communication A HAVEN player cannot be paged. They can still use channels and receive pages that they've requested with the "page/request" command. -See also: [page](#page), [channel](#channel) + +### See Also +- [page](/reference/sharpmush-help/penncmd/#page) +- [channel](/reference/sharpmush-help/pennchat/#channel) ## INHERIT @@ -317,7 +398,10 @@ The INHERIT flag is used internally by the MUSH. It cannot be set or cleared man If a room is set JUMP_OK, anyone can link exits to it, if they pass its `@lock/link`. This flag is often used in conjunction with LINK_OK. -See also: [@link](#@link), [LINK_OK](#LINK_OK) + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) ## KEEPALIVE @@ -331,7 +415,9 @@ The KEEPALIVE flag prevents you from being automatically disconnected after a pe Objects which are set LIGHT show up in the contents list of DARK rooms. They do not, however, show up if they are set DARK themselves. -See also: [DARK](#DARK) + +### See Also +- [DARK](/reference/sharpmush-help/pennflag/#dark) ## LINK_OK @@ -339,7 +425,10 @@ See also: [DARK](#DARK) If a room is set LINK_OK, anyone can make it their home, if they pass its `@lock/link`. This flag is often used in conjunction with JUMP_OK. -See also: [@link](#@link), [JUMP_OK](#JUMP_OK) + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [JUMP_OK](/reference/sharpmush-help/pennflag/#jumpok) ## MONITOR @@ -347,7 +436,10 @@ See also: [@link](#@link), [JUMP_OK](#JUMP_OK) When a player is set MONITOR, they receive notification whenever another player or object attempts to page them, even if the page fails (due to the player being HAVEN, for example). -See also: [page](#page), [HAVEN](#HAVEN) + +### See Also +- [page](/reference/sharpmush-help/penncmd/#page) +- [HAVEN](/reference/sharpmush-help/pennflag/#haven) ## MYOPIC @@ -363,7 +455,9 @@ When a player is set NOSPOOF, they see the dbref# and name of the object that tr The NOSPOOF prefix can be customized by setting the `@nospoof_message` config option. -See also: [@config](#@config) + +### See Also +- [@config](/reference/sharpmush-help/penncmd/#config) ## OPAQUE @@ -385,7 +479,12 @@ A PUPPET thing can be made to perform actions by its owner. For example, if you If a PUPPET is also set LISTEN, it will respond to what it hears according to its $-commands. -See also: [@force](#@force), [@pemit](#@pemit), [@remit](#@remit), [LISTEN](#LISTEN) + +### See Also +- [@force](/reference/sharpmush-help/penncmd/#force) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [LISTEN](/reference/sharpmush-help/pennconf/#listen) ## QUIET @@ -399,7 +498,10 @@ A QUIET object doesn't show the usual messages when someone enters or leaves it, A SAFE object cannot be destroyed with `@destroy`. Only a Wizard can remove the SAFE flag. DESTROY_OK takes precedence over SAFE. -See also: [@destroy](#@destroy), [DESTROY_OK](#DESTROY_OK) + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) +- [DESTROY_OK](/reference/sharpmush-help/pennflag/#destroyok) ## SHARED @@ -423,7 +525,10 @@ When someone looks at a TRANSPARENT exit, they see the description and contents If the exit is also set CLOUDY, they only see the destination's description, not its contents. -See also: [CLOUDY](#CLOUDY), [look](#look) + +### See Also +- [CLOUDY](/reference/sharpmush-help/pennflag/#cloudy) +- [look](/reference/sharpmush-help/penncmd/#look) ## UNFINDABLE @@ -431,7 +536,11 @@ See also: [CLOUDY](#CLOUDY), [look](#look) An UNFINDABLE object cannot be found with `@find`, `@search`, or `locate`. Only a Wizard can find UNFINDABLE objects. -See also: [@find](#@find), [@search](#@search), [locate](#locate) + +### See Also +- [@find](/reference/sharpmush-help/penncmd/#find) +- [@search](/reference/sharpmush-help/penncmd/#search) +- [locate](/reference/sharpmush-help/pennconf/#locate) ## UNINSPECTED @@ -446,14 +555,16 @@ The UNINSPECTED flag is used by some MUSHes to mark new players who haven't been The VERBOSE flag is similar to DEBUG, but shows less information. When an object is set VERBOSE, all command evaluation results will be shown to the object's owner, in the format: ``` -##dbref! <string to evaluate> => <evaluated string> +#dbref! <string to evaluate> => <evaluated string> ``` Objects run under this flag are computationally expensive, and can generate large amounts of spam, so this flag should only be set when needed, and cleared afterwards. -There's also a VERBOSE attribute flag, which only affects a single attribute; see [attribute flags](#attribute flags) for more information. +There's also a VERBOSE attribute flag, which only affects a single attribute; see [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) for more information. -See also: [DEBUG](#DEBUG) + +### See Also +- [DEBUG](/reference/sharpmush-help/pennflag/#debug) ## VISUAL @@ -461,7 +572,10 @@ See also: [DEBUG](#DEBUG) A VISUAL object's attributes can be examined by anyone in its location who passes its `@lock/visual`. This is often used in conjunction with VERBOSE or DEBUG for debugging. -See also: [examine](#examine), [@lock](#@lock) + +### See Also +- [examine](/reference/sharpmush-help/penncmd/#examine) +- [@lock](/reference/sharpmush-help/penncmd/#lock) ## WIZARD @@ -479,6 +593,9 @@ Wizards can: With great power comes great responsibility! -See also: [wizhelp](#wizhelp), [@admin](#@admin) + +### See Also +- [wizhelp](/reference/sharpmush-help/pennconf/#wizhelp) +- [@admin](/reference/sharpmush-help/penncmd/#admin) This concludes the comprehensive list of PennMUSH flags and their descriptions. \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/pennfunc.md b/src/content/docs/reference/sharpmush-help/pennfunc.md new file mode 100644 index 0000000..87af9f4 --- /dev/null +++ b/src/content/docs/reference/sharpmush-help/pennfunc.md @@ -0,0 +1,7920 @@ +--- +title: "Functions" +description: "SharpMUSH documentation for Functions" +--- + +## FUNCTIONS +## FUNCTION + Functions are specialized commands used to manipulate strings and other input. Functions take the general form: `[FUNCTION(<input>)]` + + The brackets are used to delimit and force evaluation of the function (or nested functions). The brackets can also be used to group functions for the purposes of string concatenation. In general, more than one pair of brackets is not required, but you can nest an arbitrary number of brackets. + + Examples: +``` +say first(rest(This is a nice day)) +You say, "is" +``` + + > @va me=This is a + > @vb me=nice day + > say first(rest(v(va) [v(vb)])) + You say, "is" + + See [functions2](/reference/sharpmush-help/pennfunc/#functions2) for more. +## FUNCTIONS2 + There are two types of functions, "built-in functions" and "global user functions", also known as "@functions". You can get a complete list of functions on this game with "@list/functions". + + Built-in functions are written in the game hardcode, while @functions are written in softcode, and then made global with the "@function" command. Both are used in exactly the same manner. For more information on @functions, see [@function](/reference/sharpmush-help/penncmd/#function). + + +### See Also +- [MUSHCODE](/reference/sharpmush-help/penntop/#mushcode) +- [FUNCTION LIST](/reference/sharpmush-help/pennfunc/#function-list) +## FUNCTION LIST +## FUNCTION TYPES + Several major variants of functions are available. The help topics are listed below, together with a quick summary of the function type and some examples of that type of function. + + Attribute functions: attribute-related manipulations (GET, UFUN) + Bitwise functions: manipulation of individual bits of numbers (SHL, BOR) + Boolean functions: produce 0 or 1 (false or true) answers (OR, AND) + Channel functions: get information about channels (CTITLE, CWHO) + Communication functions: send messages to objects (PEMIT, OEMIT) + Connection functions: get information about a player's connection (CONN) + Dbref functions: return dbref info related to objects (LOC, LEXITS) + HTML functions: output HTML tags for Pueblo and WebSocket clients + Information functions: find out something about objects (FLAGS, MONEY) + JSON functions: create and manipulate JSON objects (JSON, JSON_MAP) + List functions: manipulate lists (REVWORDS, FIRST) + Mail functions: manipulate @mail (MAIL, FOLDERSTATS) + Math functions: number manipulation, generic or integers only (ADD, DIV) + Regular expression functions: Regular expressions (REGMATCH, REGEDIT) + SQL functions: access SQL databases (SQL, SQLESCAPE) + String functions: string manipulation (ESCAPE, FLIP) + Time functions: formatting and display of time (TIME, CONVSECS) + Utility functions: general utilities (ISINT, COMP) + + The command "@list/functions" lists all functions on the game. + The command "@function" lists only the game's custom global functions defined via the @function command. + +## Attribute functions + These functions can access or alter information stored in attributes on objects. + +aposs() attrib_set() default() edefault() eval() +flags() get() grep() grepi() hasattr() +hasattrp() hasattrval() hasflag() lattr() lflags() +nattr() obj() owner() pfun() poss() +reglattr() regrep() regrepi() regxattr() set() +subj() udefault() ufun() ulambda() uldefault() +ulocal() v() wildgrep() wildgrepi() xattr() +xget() zfun() + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +## Bitwise functions + These functions treat integers as a sequence of binary bits (either 0 or 1) and manipulate them. + + For example, 2 is represented as '0010' and 4 as '0100'. If these two numbers are bitwise-or'ed together with BOR(), the result is 6, or (in binary) '0110'. These functions are useful for storing small lists of toggle (Yes/No) options efficiently. + +baseconv() band() bnand() bnot() bor() +bxor() shl() shr() + +## Boolean functions + Boolean functions all return 0 or 1 as an answer. + + Your MUSH may be configured to use traditional PennMUSH booleans, in which case non-zero numbers, non-negative db#'s, and strings are all considered "true" when passed to these functions. Alternatively, your MUSH may be using TinyMUSH 2.2 booleans, in which case only non-zero numbers are "true". Check @config tiny_booleans. + +and() cand() cor() eq() gt() +gte() lt() lte() nand() neq() +nor() not() or() t() xor() + + +### See Also +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [@config](/reference/sharpmush-help/penncmd/#config) +## Communication functions + Communication functions are side-effect functions that send a message to an object or objects. + +cemit() emit() lemit() message() nsemit() +nslemit() nsoemit() nspemit() nsprompt() nsremit() +nszemit() oemit() pemit() prompt() remit() +zemit() + + +### See Also +- [Channel functions](/reference/sharpmush-help/pennchat/#channel-functions) +- [Mail functions](/reference/sharpmush-help/pennmail/#mail-functions) +## Connection functions + Connection functions return information about the connections open on a game, or about specific connections. + +addrlog() cmds() conn() connlog() connrecord() +doing() height() host() hidden() idle() +ipaddr() lports() lwho() lwhoid() mwho() +mwhoid() nmwho() nwho() player() ports() +pueblo() recv() sent() ssl() terminfo() +width() xmwho() xmwhoid() xwho() xwhoid() +zmwho() zwho() +## Dbref functions + Dbref functions return a dbref or list of dbrefs related to some value on an object. + +children() con() entrances() exit() followers() +following() home() lcon() lexits() loc() +locate() lparent() lplayers() lsearch() lvcon() +lvexits() lvplayers() namelist() next() nextdbref() +num() owner() parent() pmatch() rloc() +rnum() room() where() zone() + + +### See Also +- [DBREF](/reference/sharpmush-help/pennconf/#dbref) +- [Information functions](/reference/sharpmush-help/pennfunc/#information-functions) +## Information functions + Information functions return values related to objects or the game. + +accname() alias() andflags() andlflags() andlpowers() +config() controls() csecs() ctime() elock() +findable() flags() fullalias() fullname() getpids() +hasattr() hasattrp() hasflag() haspower() hastype() +iname() lflags() lock() lockflags() lockowner() +locks() lpids() lstats() money() moniker() +msecs() mtime() mudname() mudurl() name() +nattr() nearby() objid() objmem() orflags() +orlflags() orlpowers() pidinfo() playermem() poll() +powers() quota() restarts() type() version() +visible() + + +### See Also +- [Dbref functions](/reference/sharpmush-help/pennfunc/#dbref-functions) +## List functions + List functions take at least one list of elements and return transformed lists or one or more members of those lists. Most of these functions can take an arbitrary `<delimiter>` argument to specify what delimits list elements; if none is provided, a space is used by default. + +elements() extract() filter() filterbool() first() +fold() grab() graball() index() itemize() +items() iter() last() ldelete() linsert() +lreplace() lockfilter() map() match() matchall() +member() mix() munge() namegrab() namegraball() +randword() remove() rest() revwords() setdiff() +setinter() setsymdiff() setunion() shuffle() sort() +sortby() sortkey() splice() step() table() +unique() wordpos() words() + + +### See Also +- [LISTS](/reference/sharpmush-help/penntop/#lists) +## Math functions + Math functions take one or more floating point numbers and return a numeric value. +abs() acos() add() asin() atan() +atan2() bound() ceil() cos() ctu() +dist2d() dist3d() e() exp() fdiv() +floor() fmod() fraction() ln() lmath() +log() max() mean() median() min() +mul() pi() power() root() round() +sign() sin() sqrt() stddev() sub() +tan() trunc() val() + + These functions operate only on integers (if passed floating point numbers, they will return an error or misbehave): +dec() div() floordiv() inc() mod() +remainder() + + Math functions are affected by a number of @config options, including the TinyMUSH compatability options null_eq_zero and tiny_math. + + +### See Also +- [Vector Functions](/reference/sharpmush-help/pennfunc/#vector-functions) +## Vector functions + These functions operate on n-dimensional vectors. A vector is a delimiter-separated list of numbers (space-separated, by default): + +vadd() vcross() vdim() vdot() vmag() +vmax() vmin() vmul() vsub() vunit() + + +### See Also +- [Math functions](/reference/sharpmush-help/pennfunc/#math-functions) +## Regular expression functions + These functions take a regular expression (regexp, or re) and match it against assorted things. + +regedit() regeditall() regeditalli() regediti() reglattr() +reglattrp() regmatch() regmatchi() regnattr() regnattrp() +regrab() regraball() regraballi() regrabi() regrep() +regrepi() reswitch() reswitchall() reswitchalli() reswitchi() +regxattr() regxattrp() + + +### See Also +- [string functions](/reference/sharpmush-help/pennfunc/#string-functions) +- [regexp](/reference/sharpmush-help/penntop/#regexp) +## SQL functions + These functions perform queries or other operations on an SQL database to which the MUSH is connected, if SQL support is available and enabled. + +sql() sqlescape() mapsql() + +## String functions + String functions take at least one string and return a transformed string, parts of a string, or a value related to the string(s). + +accent() after() align() alphamax() +alphamin() art() before() brackets() +capstr() case() caseall() cat() +center() chr() comp() cond() +condall() decode64() decompose() decrypt() +digest() edit() encode64() encrypt() +escape() flip() foreach() formdecode() +hmac() if() ifelse() lcstr() +left() lit() ljust() lpos() +merge() mid() ord() ordinal() +pos() regedit() regmatch() repeat() +right() rjust() scramble() secure() +space() spellnum() squish() strallof() +strcat() strdelete() strfirstof() strinsert() +stripaccents() stripansi() strlen() strmatch() +strreplace() switch() tr() trim() +ucstr() urldecode() urlencode() wrap() + + + +### See Also +- [STRINGS](/reference/sharpmush-help/penntop/#strings) +## Time functions + These functions return times or format times. + +convsecs() convutcsecs() convtime() convutctime() ctime() +etime() etimefmt() isdaylight() mtime() restarttime() +secs() starttime() stringsecs() time() timecalc() +timefmt() timestring() utctime() uptime() + + +### See Also +- [TIMEZONES](/reference/sharpmush-help/pennfunc/#timezones) +## Utility functions + These functions don't quite fit into any other category. + +allof() ansi() atrlock() beep() benchmark() +checkpass() clone() create() die() dig() +endtag() firstof() functions() fn() html() +ibreak() ilev() inum() isdbref() isint() +isnum() isobjid() isregexp() isword() itext() +letq() localize() link() list() listq() +lnum() lset() null() numversion() objeval() +open() pcreate() r() rand() s() +scan() set() setq() setr() slev() +soundex() soundslike() speak() stext() suggest() +tag() tagwrap() tel() testlock() textentries() +textfile() unsetq() valid() wipe() @@() +uptime()` + +## @@() +## NULL() +`@@(<expression>)` +`null(<expression>[, ... , <expression>])` + + The @@() function does nothing and returns nothing. It does not evaluate its argument. It could be used for commenting, perhaps. + + The null() function is similar, but does evaluate its argument(s), so side-effects can occur within a null(). Useful for eating the output of functions when you don't use that output. + + +### See Also +- [@@](/reference/sharpmush-help/penncmd/) +## ABS() +`abs(<number>)` + + Returns the absolute value of a number. + + Examples: +``` +say abs(-4) +You say, "4" +``` + + > say abs(2) + You say, "2" + + +### See Also +- [sign()](/reference/sharpmush-help/pennfunc/#sign) +## ACCENT() +`accent(<string>, <template>)` + + The accent() function will return `<string>`, with characters in it possibly changed to accented ones according to `<template>`. Both arguments must be the same size. + + Whether or not the resulting string is actually displayed correctly is client-dependent. Some OSes uses different character sets than the one assumed (Unicode and ISO 8859-1), and some clients strip these 8-bit characters. + + For each character in `<string>`, the corresponding character of `<template>` is checked according to the table in [accents](/reference/sharpmush-help/pennfunc/#accents), and a replacement done. If either the current `<string>` or `<template>` characters aren't in the table, the `<string>` character is passed through unchanged. + + See [accent2](/reference/sharpmush-help/pennfunc/#accent2) for some examples. + + +### See Also +- [stripaccents()](/reference/sharpmush-help/pennfunc/#stripaccents) +- [NOACCENTS](/reference/sharpmush-help/pennconf/#noaccents) +- [@nameaccent](/reference/sharpmush-help/penncmd/#nameaccent) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +- [ACCENTS](/reference/sharpmush-help/pennfunc/#accents) +## ACCENTS + Below is the table of possible accents which can be used with accent() and @nameformat. + + Accent Template String + Name Description Character Character + -------------------------------------------------------------- + grave Backward slant ` A,E,I,O,U,a,e,i,o,u + above letter (ƀ) + acute Forward slant ' A,E,I,O,U,Y,a,e,i,o,u,y + above letter (Ɓ) + tilde Wavy line above ~ A,N,O,a,n,o + letter (Ƒ) + circumflex carat above ^ A,E,I,O,U,a,e,i,o,u + letter (Ƃ) + umlaut Two dots above : A,E,I,O,U,,a,e,i,o,u,y + diaeresis letter (Ƅ) + ring Small circle above o A,a + letter (ƅ) + cedilla Small tail below , C,c + letter (Ƈ) + + Continued in 'HELP ACCENTS2' +## ACCENTS2 + These are non-accent special characters, mostly punctuation and non-roman letters. + + Template String + Description Character Character + -------------------------------------------------------------- + Upside-down ? (Āæ) u ? + Upside-down ! (Ā”) u ! + << quote mark (Ā«) " < + >> quote mark (Ā») " > + German sharp s (ß) B s + Capital thorn (ƞ) | P + Lower-case thorn (ƞ) | p + Capital eth (Ɛ) - D + Lower-case eth (ư) & o + + See 'HELP ACCENTS3' for examples +## ACCENT2 +## ACCENTS3 + Some examples of accent() and their expected outputs: + + > think accent(Aule, ---:) +`Aul(e-with-diaeresis)` + AulĆ« + + > think accent(The Nina was a ship, The Ni~a was a ship) + The Ni(n-with-~)a was a ship + The NiƱa was a ship + + > think accent(Khazad ai-menu!, Khaz^d ai-m^nu!) + Khaz(a-with-^)d ai-m(e-with-^)nu! + KhazĆ¢d ai-mĆŖnu +## ACCNAME() +`accname(<object>)` + + accname() returns the name of `<object>`, applying the object's + @nameaccent, if any. + + +### See Also +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [fullname()](/reference/sharpmush-help/pennfunc/#fullname) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +- [ACCENTS](/reference/sharpmush-help/pennfunc/#accents) +## ACOS() +`acos(<cosine>[, <angle type>])` + + Returns the angle that has the given `<cosine>` (arc-cosine), with the angle expressed in the given `<angle type>`, or radians by default. + + See 'HELP ANGLES' for more on the `<angle type>`. + + +### See Also +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## ADD() +`add(<number1>, <number2>[, ... , <numberN>])` + + Returns the sum of the given numbers. + + +### See Also +- [MATH FUNCTIONS](/reference/sharpmush-help/pennfunc/#math-functions) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## AFTER() +`after(<string1>, <string2>)` + + Returns the portion of `<string1>` that occurs after `<string2>`. If `<string2>` isn't in `<string1>`, the function returns nothing. This is case-sensitive. + + Examples: +``` +say after(foo bar baz,bar) +You say, " baz" +``` + + > say after(foo bar baz,ba) + You say, "r baz" + + +### See Also +- [before()](/reference/sharpmush-help/pennfunc/#before) +- [rest()](/reference/sharpmush-help/pennfunc/#rest) +## ALIGN() +## LALIGN() +`align(<widths>, <col>[, ... , <colN>[, <filler>[, <colsep>[, <rowsep>]]]])` +`lalign(<widths>, <colList>[, <delim>[, <filler>[, <colsep>[, <rowsep>]]]])` + + Creates columns of text, each column designated by `<col>` arguments. Each `<col>` is individually wrapped inside its own column, allowing for easy creation of book pages, newsletters, or the like. In lalign(), `<colList>` is a `<delim>`-separated list of the columns. + + `<widths>` is a space-separated list of column widths. '10 10 10' for the widths argument specifies that there are 3 columns, each 10 spaces wide. You can alter the behavior of a column in multiple ways. (Check [align2](/reference/sharpmush-help/pennfunc/#align2) for more details) + + `<filler>` is a single character that, if given, is the character used to fill empty columns and remaining spaces. `<colsep>`, if given, is inserted between every column, on every row. `<rowsep>`, if given, is inserted between every line. By default, `<filler>` and `<colsep>` are a space, and `<rowsep>` is a newline. + + Continued in '[align2](/reference/sharpmush-help/pennfunc/#align2)' +## ALIGN2 + You can modify column behavior within align(). The basic format is: + + [justification](/reference/sharpmush-help/pennconf/#justification)Width[options](/reference/sharpmush-help/pennconf/#options)[(ansi)] + + Justification: Placing one of these characters before the width alters the spacing for this column (e.g: <30). Defaults to < (left-justify). + `< Left-justify - Center-justify >` Right-justify + _ Full-justify = Paragraph-justify + + Other options: Adding these after the width will alter the column's behaviour in some situtations + `.` Repeat for as long as there is non-repeating text in another column. + \` When this column runs out of text, merge with the column to the left + `'` When this column runs out of text, merge with the column to the right + `$` nofill: Don't use filler after the text. If this is combined with merge-left, the column to its left inherits the 'nofill' when merged. + `x` Truncate each (%r-separated) row instead of wrapping at the colwidth + `X` Truncate the entire column at the end of the first row instead of wrapping + `#` Don't add a `<colsep>` after this column. If combined with merge-left, the column to its left inherits this when merged. + + Ansi: Place ansi characters (as defined in [ansi()](/reference/sharpmush-help/pennfunc/#ansi)) within ()s to define a column's ansi markup. + + See '[align3](/reference/sharpmush-help/pennfunc/#align3)' for examples. + +### See Also +- [center()](/reference/sharpmush-help/pennfunc/#center) +- [ljust()](/reference/sharpmush-help/pennfunc/#ljust) +- [rjust()](/reference/sharpmush-help/pennfunc/#rjust) +- [table()](/reference/sharpmush-help/pennfunc/#table) +## ALIGN3 + Examples: +``` + + > &line me=align(<3 10 20$,([ljust(get(%0/sex),1,,1)]), name(%0),name(loc(%0))) + > th iter(lwho(),u(line,##),%b,%r) + (M) Walker Tree + (M) Ashen-Shug Apartment 306 + ar + (F) Jane Doe Nowhere + + > &line me=align(<3 10X 20X$,([ljust(get(%0/sex),1,,1)]), name(%0),name(loc(%0))) + > th iter(lwho(),u(line,##),%b,%r) + (M) Walker Tree + (M) Ashen-Shug Apartment 306 + (F) Jane Doe Nowhere +``` + + See '[align4](/reference/sharpmush-help/pennfunc/#align4)' for more examples. +## ALIGN4 + > &haiku me = Alignment function,%rIt justifies your writing,%rBut the words still suck.%rLuke + + > th [align(5 -40 5,,[repeat(-,40)]%r[u(haiku)]%r[repeat(-,40)],,%b,+)] + + +----------------------------------------+ + + Alignment function, + + + It justifies your writing, + + + But the words still suck. + + + Luke + + +----------------------------------------+ + + See '[align5](/reference/sharpmush-help/pennfunc/#align5)' for more examples. +## ALIGN5 + > &dropcap me=%b_______%r|__%b%b%b__|%r%b%b%b|%b|%r%b%b%b|_| + > &story me=%r'was the night before Christmas, when all through the house%rNot a creature was stirring, not even a mouse.%rThe stockings were hung by the chimney with care,%rIn hopes that St Nicholas soon would be there. + > th align(9'(ch) 68, u(dropcap), u(story)) + + _______ + |__ __| 'was the night before Christmas, when all through the house + | | Not a creature was stirring, not even a mouse. + |_| The stockings were hung by the chimney with care, + In hopes that St Nicholas soon would be there. + + The dropcap 'T' will be in ANSI cyan-highlight, and merges with the 'story' + column. + + > th align(>15 60,Walker,Staff & Developer,x,x) + xxxxxxxxxWalkerxStaff & Developerxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + > th align(>15 60$,Walker,Staff & Developer,x,x) + xxxxxxxxxWalkerxStaff & Developer +## ALLOF() +`allof(<expr>[, ... , <exprN>], <osep>)` + + Evaluates every `<expr>` argument (including side-effects) and returns the results of those which are true, in a list separated by `<osep>`. The output separator argument is required, and can be a string of any length (including an empty string; use %b for a space). + + The meaning of true or false depends on configuration options as explained in the 'BOOLEAN VALUES' help topics. + + > &s me=Bats are similar to Rats which are afraid of Cats + > say allof(grab(v(s),rats),grab(v(s),mats),grab(v(s),bats),) + You say, "Rats Bats" + + > say allof(#-1,#101,#2970,,#-3,0,#319,null(This Doesn't Count),|) + You say, "#101|#2970|#319" + + > say allof(foo, 0, #-1, bar, baz,) + You say, "foobarbaz" + > say allof(foo, 0, #-1, bar, baz,%b) + You say, "foo bar baz" + + +### See Also +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [strallof()](/reference/sharpmush-help/pennfunc/#strallof) +- [filter()](/reference/sharpmush-help/pennfunc/#filter) +## ALPHAMAX() +`alphamax(<word>[, ... , <wordN>])` + + Takes any number of `<word>` arguments, and returns the one which is lexicographically biggest. That is, the `<word>` would be last in alphabetical order. + + This is equivilent to last(sort(`<word>` ... `<wordN>`,a)). + + +### See Also +- [alphamin()](/reference/sharpmush-help/pennfunc/#alphamin) +- [max()](/reference/sharpmush-help/pennfunc/#max) +## ALPHAMIN() +`alphamin(<word>[, ... , <wordN>])` + + Takes any number of `<word>` arguments, and returns the one which is lexicographically smallest. That is, the word that would be first in alphabetical order. + + This is equivilent to first(sort(`<word>` ... `<wordN>`,a)). + + +### See Also +- [alphamax()](/reference/sharpmush-help/pennfunc/#alphamax) +- [min()](/reference/sharpmush-help/pennfunc/#min) +## AND() +## CAND() +`and(<boolean1>, <boolean2>[, ... , <booleanN>])` +`cand(<boolean1>, <boolean2>[, ... , <booleanN>])` + + These functions take any number of boolean values, and return 1 if all are true, and 0 otherwise. and() will always evaluate all its arguments (including side effects), while cand() stops evaluation after the first false argument. + + +### See Also +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [nand()](/reference/sharpmush-help/pennfunc/#nand) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [xor()](/reference/sharpmush-help/pennfunc/#xor) +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## ANDFLAGS() +## ANDLFLAGS() +`andflags(<object>, <string of flag letters>)` +`andlflags(<object>, <list of flag names>)` + + These functions return 1 if `<object>` has all of the given flags, and 0 if it does not. andflags() takes a string of single flag letters, while andlflags() takes a space-separated list of flag names. In both cases, a ! before the flag means "not flag". + + If there is a syntax error like a ! without a following flag, '#-1 INVALID FLAG' is returned. Unknown flags are treated as being not set. + + Example: Check to see if %# is set Wizard and Dark, but not Ansi. + > say andflags(%#, WD!A) + > say andlflags(%#, wizard dark !ansi) + + +### See Also +- [orflags()](/reference/sharpmush-help/pennfunc/#orflags) +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [lflags()](/reference/sharpmush-help/pennfunc/#lflags) +## ANDLPOWERS() +`andlpowers(<object>, <list of powers>)` + + This function returns 1 if `<object>` has all the powers in a specified list, and 0 if it does not. The list is a space-separated list of power names. A '!' preceding a flag name means "not power". + + Thus, ANDLPOWERS(me, no_quota no_pay) would return 1 if I was powered no_quota and no_pay. ANDLPOWERS(me, poll !guest) would return 1 if I had the poll power but not the guest power. + + If there is a syntax error like a ! without a following flag, '#-1 INVALID POWER' is returned. Unknown powers are treated as being not set. + + +### See Also +- [powers()](/reference/sharpmush-help/pennfunc/#powers) +- [orlpowers()](/reference/sharpmush-help/pennfunc/#orlpowers) +- [POWERS LIST](/reference/sharpmush-help/pennconf/#powers-list) +- [@power](/reference/sharpmush-help/penncmd/#power) +## ANSI() +`ansi(<codes>[ ... <codesN>], <string>)` + + This allows you to mark up a string using ANSI terminal effects, 16-color codes, and 256 XTERM colors (specified as color names or hex values). + + The old-style `<ansi-codes>` are listed in "help ansi2". + Each block of space-separated `<codes>` can be one or more old-style ANSI codes, as listed in "help ansi2", or a foreground and/or background color. Background colors are prefixed with a "/". Each color can be one of: + + * +`<colorname>` (for a list of valid names, see [colors()](/reference/sharpmush-help/pennfunc/#colors)) + * a hexcode, optionally in angle brackets (#000000, `<#ff0055>`, etc) + * a list of red, green and blue values from 0-255, in angle brackets (`<0 0 0>`, `<255 0 85>`, etc) + * a number from 0-255; this is the same as using "+xterm`<number>`", for Rhost compatability. + + For example, "ansi(+orange/#0000ff,Test)" would color "Test" in orange, on a blue background. In the event that your client does not support those colors, PennMUSH will downgrade the color to the closest fit that your client can understand. + + Codes are parsed from left to right so, with later codes overriding earlier ones. So, for example: +``` +ansi(y /+green B <#ffffff>, test) +would show white text on an ANSI-blue background. +``` + + See [ansi3](/reference/sharpmush-help/pennfunc/#ansi3) for more examples. + +### See Also +- [ANSI](/reference/sharpmush-help/pennflag/#ansi) +- [COLOR](/reference/sharpmush-help/pennflag/#color) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) +- [colorstyle](/reference/sharpmush-help/penncmd/#colorstyle) +- [colors()](/reference/sharpmush-help/pennfunc/#colors) +## ANSI2 + Old-style valid color codes are: + + f - flash F - not flash + h - hilite H - not hilite + u - underscore U - not underscore + i - inverse I - not inverse + n - normal + + d - default foreground D - default background + x - black foreground X - black background + r - red foreground R - red background + g - green foreground G - green background + y - yellow foreground Y - yellow background + b - blue foreground B - blue background + m - magenta foreground M - magenta background + c - cyan foreground C - cyan background + w - white foreground W - white background + + For example, "ansi(fc, Test)" would hilight "Test" in flashing cyan. Default foreground and background use the client's default color for fore and back. +## ANSI3 + + Bright yellow text on a blue background: + > think ansi(yB, foo) + + Orange text on an ANSI-green background: + > think ansi(G+orange, bar) + + Underlined pink text on a purple background + > think ansi(u+lightsalmon/#a020f0, ugly) + + ANSI-blue text on a bisque background + > think ansi(+yellow/+bisque b, the 'b' overrides the earlier '+yellow') +## APOSS() +## %a +`aposs(<object>)` + + Returns the absolute possessive pronoun - his/hers/its/theirs - for an object. The %a substitution returns the absolute possessive pronoun of the enactor. + + +### See Also +- [obj()](/reference/sharpmush-help/pennfunc/#obj) +- [poss()](/reference/sharpmush-help/pennfunc/#poss) +- [subj()](/reference/sharpmush-help/pennfunc/#subj) +## ART() +`art(<string>)` + + This function returns the proper article, "a" or "an", based on whether or not `<string>` begins with a vowel. +## ASIN() +`asin(<sine>[, <angle type>])` + + Returns the angle with the given `<sine>` (arc-sine), with the angle expressed in the given `<angle type>`, or radians by default. + + See 'HELP ANGLES' for more on the angle type. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## ATAN() +## ATAN2() +`atan(<tangent>[, <angle type>])` +`atan2(<number1>, <number2>[, <angle type>])` + + Returns the angle with the given `<tangent>` (arc-tangent), with the angle expressed in the given `<angle type>`, or radians by default. + + atan2(x, y) is like atan(fdiv(x, y)), except y can be 0, and the signs of both arguments are used in determining the sign of the result. It is useful in converting between cartesian and polar coordinates. + + See 'HELP ANGLES' for more on the angle type. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## ATRLOCK() +`atrlock(<object>/<attrib>[, [on|off]])` + + When given a single `<object>`/`<attribute>` pair as an argument, returns 1 if the attribute is locked, 0 if unlocked, and #-1 if the attribute doesn't exist or can't be read by the function's caller. + + When given a second argument of "on" (or "off"), attempts to lock (or unlock) the specified attribute, as per @atrlock. + + A locked attribute is one which has the "locked" attribute flag, so this function is roughly equivilent to: + +`hasattr(<object>/<attrib>, locked)` +`set(<object>/<attribute>, [!]locked)` + + except that the attribute's owner is also changed when you lock it via atrlock(). + + +### See Also +- [@atrlock](/reference/sharpmush-help/penncmd/#atrlock) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +- [hasflag()](/reference/sharpmush-help/pennfunc/#hasflag) +## ATTRIB_SET() +`attrib_set(<object>/<attrib>[, <value>])` + + Sets or clears an attribute. With a `<value>`, it sets the attribute, without one, it clears the attribute. This is an easier-to-read replacement for the old set(`<object>`, `<attrib>`:`<value>`) notation, and a less destructive replacement for wipe() that won't destroy entire attribute trees in one shot. + + If there is a second argument, then attrib_set() will create an attribute, even if the second argument is empty (in which case attrib_set() will create an empty attribute). If the empty_attrs configuration option is off, the attribute will be set to a single space. This means that attrib_set(me/foo,%0) will _always_ create an attribute. + + +### See Also +- [set()](/reference/sharpmush-help/pennfunc/#set) +- [@set](/reference/sharpmush-help/penncmd/#set) +## BAND() +`band(<integer>, <integer>[, ... , <integerN>])` + + Does a bitwise AND of all its arguments, returning the result (a number with only the bits set in every argument set in it). + + +### See Also +- [BITWISE FUNCTIONS](/reference/sharpmush-help/pennfunc/#bitwise-functions) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## BASECONV() +`baseconv(<number>, <from base>, <to base>)` + + Converts `<number>`, which is in base `<from base>` into base `<to base>`. The bases can be between 2 (binary) and 64, inclusive. + + Numbers 36 and under use the standard numbers: + + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + All bases over 36 use base64 url string: + + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" + + In base 63 and base 64, - is always treated as a digit. Using base64 as a 'from' will also treat + as 62 and / as 63. +## BEEP() +`beep([<number>])` + + Returns `<number>` "alert" bell characters. `<number>` must be in the range 1 to 5, or, if unspecified, defaults to 1. This function may only be used by royalty and wizards. + +## BEFORE() +`before(<string1>, <string2>)` + + Returns the portion of `<string1>` that occurs before `<string2>`. If `<string2>` isn't in `<string1>`, `<string1>` is returned. This is case-sensitive. + + Examples: +``` +say before(foo bar baz,bar) +You say, "foo" +say before(foo bar baz,r) +You say, "foo ba" +say before(foo bar baz,a) +You say, "foo b" +``` + + +### See Also +- [after()](/reference/sharpmush-help/pennfunc/#after) +- [first()](/reference/sharpmush-help/pennfunc/#first) +## BENCHMARK() +`benchmark(<expression>, <number>[, <sendto>])` + + Evaluates `<expression>` `<number>` times, and returns the average, minimum, and maximum time it took to evaluate `<expression>` in microseconds. If a `<sendto>` argument is given, benchmark() instead pemits the times to the object `<sendto>`, and returns the result of the last evaluation of `<expression>`. + + Example: +``` +think benchmark(iter(lnum(1,100), ##), 200) +Average: 520.47 Min: 340 Max: 1382 +think benchmark(iter(lnum(1,100), %i0), 200) +Average: 110.27 Min: 106 Max: 281 +``` +## BRACKETS() +`brackets(<string>)` + + Returns a count of the number of left and right square brackets, parentheses, and curly braces in the string, in that order, as a space-separated list of numbers. This is useful for finding missing or extra brackets in MUSH code. `<string>` is evaluated. + + Example: +``` +@desc me=This is [ansi(h,a test)] of the { brackets() function. +think brackets(v(desc)) +1 1 2 2 1 0 +``` +## BNAND() +`bnand(<integer1>, <integer2>)` + + Returns `<integer1>` with every bit that was set in `<integer2>` cleared. + + +### See Also +- [BITWISE FUNCTIONS](/reference/sharpmush-help/pennfunc/#bitwise-functions) +## BNOT() +`bnot(<integer>)` + + Returns the bitwise complement of `<integer>`. Every bit set in it is cleared, and every clear bit is set. + + +### See Also +- [BITWISE FUNCTIONS](/reference/sharpmush-help/pennfunc/#bitwise-functions) +## BOR() +`bor(<integer>, <integer>[, ... , <integerN>])` + + Does a bitwise OR of all its arguments, returning the result. (A number with a bit set if that bit appears in any of its arguments). + + +### See Also +- [BITWISE FUNCTIONS](/reference/sharpmush-help/pennfunc/#bitwise-functions) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## BOUND() +`bound(<number>, <lower bound>, <higher bound>)` + + bound() returns `<number>` if it is between `<lower bound>` and `<higher bound>`. If it's lower than `<lower bound>`, `<lower bound>` is returned. If it's higher than `<higher bound>`, `<higher bound>` is returned. + + If you just want to know whether `<number>` is within the range of `<lower>` to `<higher>`, consider using lte(`<lower>`, `<number>`, `<higher>`) instead to get a boolean result. + + +### See Also +- [ceil()](/reference/sharpmush-help/pennfunc/#ceil) +- [floor()](/reference/sharpmush-help/pennfunc/#floor) +- [round()](/reference/sharpmush-help/pennfunc/#round) +- [trunc()](/reference/sharpmush-help/pennfunc/#trunc) +## BXOR() +`bxor(<integer>, <integer>[, ... , <integerN>])` + + Does a bitwise XOR of all its arguments, returning the result. (A number with a bit set if it's set in only one of its arguments). + + +### See Also +- [BITWISE FUNCTIONS](/reference/sharpmush-help/pennfunc/#bitwise-functions) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## CAPSTR() +`capstr(<string>)` + + Returns `<string>` with the first character capitalized. + + Example: +``` +think capstr(foo bar baz) +Foo bar baz +``` + + +### See Also +- [lcstr()](/reference/sharpmush-help/pennfunc/#lcstr) +- [ucstr()](/reference/sharpmush-help/pennfunc/#ucstr) +## CAT() +## STRCAT() +`cat(<string>[, ... , <stringN>])` +`strcat(<string1>[, ... , <stringN>])` + + These functions concatenate multiple strings together. cat() adds a space between each string; strcat() does not. + + Example: +``` +say cat(foo bar, baz blech) +You say, "foo bar baz blech" +say strcat(foo bar, baz blech) +You say, "foo barbaz blech" +``` +## CENTER() +`center(<string>, <width>[, <fill>[, <rightfill>]])` + + This function will center `<string>` within a field `<width>` characters wide, using the `<fill>` string for padding on the left side of the string, and `<rightfill>` for padding on the right side. `<rightfill>` defaults to the mirror-image of `<fill>` if not specified. `<fill>` defaults to a space if neither `<fill>` nor `<rightfill>` are specified. + + If `<string>` divides `<width>` into uneven portions, the left side will be one character shorter than the right side. + + Examples: +``` +say center(X,5,-) +You say, "--X--" +``` + + > say center(X,5,-=) + You say, "-=X=-" + + > say center(.NEAT.,15,-,=) + You say, "----.NEAT.=====" + + > say center(hello,16,12345) + You say, "12345hello543215" + + +### See Also +- [align()](/reference/sharpmush-help/pennfunc/#align) +- [ljust()](/reference/sharpmush-help/pennfunc/#ljust) +- [rjust()](/reference/sharpmush-help/pennfunc/#rjust) +## CHECKPASS() +`checkpass(<player>, <string>)` + + Returns 1 if `<string>` matches `<player>`'s password, and 0 otherwise. If `<player>` has no password, this function will always return 1. + + This function can only be used by wizards. + + +### See Also +- [@password](/reference/sharpmush-help/penncmd/#password) +- [@newpassword](/reference/sharpmush-help/penncmd/#newpassword) +## CHR() +## ORD() +`chr(<number>)` +`ord(<character>)` + + ord() returns the numerical value of the given character. chr() returns the character with the given numerical value. + + Examples: +``` +say ord(A) +You say, "65" +say chr(65) +You say, "A" +``` +## CLONE() +`clone(<object>[, <new name>[, <dbref>[, preserve]]])` + + This function clones `<object>`, as per @clone, and returns the dbref number of the clone, or #-1 if the object could not be cloned. + + The clone will have the same name as the original object unless you give a `<new name>` for it. Normally, the clone will be created with the first available dbref, but wizards and objects with the pick_dbref power may give the `<dbref>` of a garbage object to use instead. + + If the optional fourth argument is the string preserve, acts as @clone/preserve. + Note: If @create or @clone is restricted or disabled, clone() will also be restricted/disabled. + + +### See Also +- [@clone](/reference/sharpmush-help/penncmd/#clone) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [dig()](/reference/sharpmush-help/pennfunc/#dig) +- [open()](/reference/sharpmush-help/pennfunc/#open) +## CMDS() +`cmds(<player|descriptor>)` + + Returns the number of commands issued by a player during this connection as indicated by WHO. + + You must be a Wizard, Royalty or See_All to use this function on anyone but yourself. + + +### See Also +- [CONNECTION FUNCTIONS](/reference/sharpmush-help/pennfunc/#connection-functions) +## SENT() +`sent(<player|descriptor>)` + + Returns the number of characters sent by a player during this connection as indicated by SESSION. + + You must be a Wizard, Royalty or See_All to use this function on anyone but yourself. + + +### See Also +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +## RECV() +`recv(<player|descriptor>)` + + Returns the number of characters received by a player during this connection as indicated by SESSION. + + You must be a Wizard, Royalty or See_All to use this function on anyone but yourself. + + +### See Also +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +## COLORS() +`colors()` +`colors(<wildcard>)` +`colors(<colors>, <format>)` + + With no arguments, colors() returns an unsorted, space-separated list of colors that PennMUSH knows the name of. You can use these colors in ansi(+`<colorname>`,text). The colors "xterm0" to "xterm255" are not included in the list, but can also be used in ansi(). + + With one argument, returns an unsorted, space-separated list of colors that match the wildcard pattern `<wildcard>`. + + With two arguments, colors() returns information about specific colors. `<colors>` can be any string accepted by the ansi() function's first argument. `<format>` must be one of: + + hex, x: return a hexcode in the format #rrggbb. + rgb, r: return the RGB components as a list (0 0 0 - 255 255 255) + xterm256, d: return the number of the xterm color closest to the given `<color>`. + xterm256x,h: return the number of the xterm color in base 16. + 16color, c: return the letter of the closest ANSI color code (possibly including 'h' for highlight fg colors). + name: return a list of names of all the colors exactly matching the given colors, or '#-1 NO MATCHING COLOR NAME' if there is no exact match with a named color. + auto: returns the colors in the same format(s) they were given in. + + It can be used for working out how certain colors will downgrade to people using clients which aren't fully color-capable. + + `<format>` can also include the word "styles", in which case all ANSI styling options (f, u, i and h) present in `<colors>` are included in the output. + + See [colors2](/reference/sharpmush-help/pennfunc/#colors2) for examples. + +### See Also +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [valid()](/reference/sharpmush-help/pennfunc/#valid) +- [colorstyle](/reference/sharpmush-help/penncmd/#colorstyle) +## colors2 + + Examples: +``` +think colors(*yellow*) +greenyellow yellowgreen lightgoldenrodyellow lightyellow yellow lightyellow1 lightyellow2 lightyellow3 lightyellow4 yellow1 yellow2 yellow3 yellow4 +``` + + > think colors(+yellow, hex) + #ffff00 + + > think colors(+yellow, xterm256) + 226 + + > think colors(+yellow, 16color) + yh + + > think colors(/+yellow, 16color) + Y + + > think colors(#ffff00, name) + yellow yellow1 + + > think colors(iuB+red, hex styles) + ui#ff0000/#0000ee + + > think colors(+blue huyG/+black, auto) + hy/+black + +## COMP() +`comp(<value1>, <value2>[, <type>])` + + comp() compares two values. It returns 0 if they are the same, -1 if `<value1>` is less than/precedes alphabetically `<value2>`, and 1 otherwise. + + By default the comparison is a case-sensitive lexicographic (string) comparison. By giving the optional `<type>`, the comparison can be specified: + + `<type>` Comparison + A Maybe case-sensitive lexicographic (default) + I Always case-insensitive lexicographic + D Dbrefs of valid objects + N Integers + F Floating point numbers + + Whether or not the a sort type is case-sensitive or not depends on the particular MUSH and its environment. + +### See Also +- [strmatch()](/reference/sharpmush-help/pennfunc/#strmatch) +- [eq()](/reference/sharpmush-help/pennfunc/#eq) +## CON() +`con(<object>)` + + Returns the dbref of the first object in the `<object>`'s inventory. + + You can get the complete contents of any container you may examine, regardless of whether or not objects are dark. You can get the partial contents (obeying DARK/LIGHT/etc.) of your current location or the enactor (%#). You CANNOT get the contents of anything else, regardless of whether or not you have objects in it. + + +### See Also +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [next()](/reference/sharpmush-help/pennfunc/#next) +## COND() +## CONDALL() +## NCOND() +## NCONDALL() +`cond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])` +`condall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])` +`ncond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])` +`ncondall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])` + + cond() evaluates `<cond>`s until one returns a true value. Should none return true, `<default>` is returned. + + condall() returns all `<expr>`s for those `<cond>`s that evaluate to true, or `<default>` if none are true. + + ncond() and ncondall() are identical to cond(), except it returns `<expr>`s for which `<cond>`s evaluate to false. + + Examples: +``` +say cond(0,This is false,#-1,This is also false,#123,This is true) +You say, "This is true" +``` + + > say ncond(0,This is false,#-1,This is also false,#123,This is true) + You say, "This is false" + + > say ncondall(0,This is false,#-1,This is also false,#123,This is true) + You say, "This is falseThis is also false" + + +### See Also +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [allof()](/reference/sharpmush-help/pennfunc/#allof) +## CONFIG() +`config([<option>])` + + With no arguments, config() returns a list of config option names. If `<option>` is given, config() returns the value of the given option Boolean configuration options will return values of "Yes" or "No". + + Example: +``` +think config(money_singular) +Penny +``` + +## CONN() +`conn(<player|descriptor>)` + + This function returns the number of seconds a player has been connected. `<player>` should be the full name of a player or a dbref. You can also use a `<descriptor>` to get connection information for a specific connection when a player is connected more than once. Wizards can also specify the descriptor of a connection which is still at the login screen. + + This function returns -1 for invalid `<player|descriptor>`s, offline players and players who are dark, if the caller is not able to see them. + + +### See Also +- [CONNECTION FUNCTIONS](/reference/sharpmush-help/pennfunc/#connection-functions) +## CONTROLS() +`controls(<object>, <victim>[/<attribute>])` + + With no `<attribute>`, this function returns 1 if `<object>` controls `<victim>`, or 0, if it does not. With an `<attribute>`, it will return 1 if `<object>` could successfully set `<attribute>` on `<victim>` (or alter `<attribute>`, if it already exists). If one of the objects does not exist, it will return #-1 ARGN NOT FOUND (where N is the argument which is the invalid object). If `<attribute>` is not a valid attribute name, it will return #-1 BAD ATTR NAME. You must control `<object>` or `<victim>`, or have the See_All power, to use this function. + + +### See Also +- [visible()](/reference/sharpmush-help/pennfunc/#visible) +- [CONTROL](/reference/sharpmush-help/penntop/#control) +## CONVSECS() +## CONVUTCSECS() +`convsecs(<seconds>[, <timezone>])` +`convutcsecs(<seconds>)` + + This function converts `<seconds>` (the number of seconds which have elapsed since midnight on January 1, 1970 UTC) to a time string. Because it's based on UTC, but returns local time, convsecs(0) is not going to be "Thu Jan 1 00:00:00 1970" unless you're in the UTC (GMT) timezone. + + If a `<timezone>` argument is given, the return value is based on that timezone instead of the MUSH server's local time. See [timezones](/reference/sharpmush-help/pennfunc/#timezones) for more information on valid timezones. + + If Extended convtime() is supported (see @config compile), negative values for `<seconds>` representing dates prior to 1970 are allowed. + + convutcsecs(`<seconds>`) is an alias for convsecs(`<seconds>`, utc). + + Examples: +``` +say secs() +You say, "709395750" +``` + + > say convsecs(709395750) + You say, "Wed Jun 24 10:22:54 1992" + + > say convutcsecs(709395750) + You say, "Wed Jun 24 14:22:30 1992" + + +### See Also +- [convtime()](/reference/sharpmush-help/pennfunc/#convtime) +- [time()](/reference/sharpmush-help/pennfunc/#time) +- [timefmt()](/reference/sharpmush-help/pennfunc/#timefmt) +## CONVTIME() +## CONVUTCTIME() +`convtime(<time string>,[<timezone>])` +`convutctime(<time string>)` + + This functions converts a time string to the number of seconds since Jan 1, 1970 GMT. A time string is of the format: + Ddd MMM DD HH:MM:SS YYYY + where Ddd is the day of the week, MMM is the month, DD is the day of the month, HH is the hour in 24-hour time, MM is the minutes, SS is the seconds, and YYYY is the year. If you supply an incorrectly formatted string, it will return #-1. + + convutctime() and convtime() with a second argument of 'utc' assume the timestring is based on UTC time. Other time zones can be specified too. If no `<timezone>` is given, the server's timezone is used. + + If the extended convtime() is supported (See @config compile), more formats for the date are enabled, including ones missing the day of week and year, and a 'Month Day Year' format. In this case, convtime() can also handle dates prior to 1970 (in which case a negative number will be returned). + + Example: +``` +say time() +You say, "Wed Jun 24 10:22:54 1992" +``` + + > say convtime(Wed Jun 24 10:22:54 1992) + You say, "709395774" + + +### See Also +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [time()](/reference/sharpmush-help/pennfunc/#time) +- [timezones](/reference/sharpmush-help/pennfunc/#timezones) +## COS() +`cos(<angle>[, <angle type>])` + + Returns the cosine of `<angle>`. Angle must be in the given angle type, or radians by default. + + Examples: +``` +say cos(90, d) +You say, "0" +``` + + > say cos(1.570796) + You say, "0" + + See 'HELP ANGLES' for more on the angle type. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## PCREATE() +`pcreate(<name>, <password>[, <dbref>])` + + Creates a player with a given `<name>` and `<password>`. This function can only be used by wizards. + + The optional third argument can be used to specify a garbage object to use for the new player. + + +### See Also +- [@pcreate](/reference/sharpmush-help/penncmd/#pcreate) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [dig()](/reference/sharpmush-help/pennfunc/#dig) +- [open()](/reference/sharpmush-help/pennfunc/#open) +## CREATE() +`create(<object>[, <cost>[, <dbref>]])` + + This function creates an object with name `<object>` for `<cost>` pennies, and returns the dbref number of the created object. It returns #-1 on error. + + Wizards may also specify a `<dbref>`; if this refers to a garbage object, the new object is created with this dbref. + + +### See Also +- [@create](/reference/sharpmush-help/penncmd/#create) +- [pcreate()](/reference/sharpmush-help/pennfunc/#pcreate) +- [dig()](/reference/sharpmush-help/pennfunc/#dig) +- [open()](/reference/sharpmush-help/pennfunc/#open) +## CTIME() +## CSECS() +`ctime(<object>[, <utc>])` +`csecs(<object>)` + + ctime() returns the date and time that `<object>` was created. The time returned is in the server's local timezone, unless `<utc>` is true, in which case the time is in the UTC timezone. + + csecs() returns the time as the number of seconds since the epoch. Anyone can get the creation time of any object in the game. + + +### See Also +- [mtime()](/reference/sharpmush-help/pennfunc/#mtime) +- [time()](/reference/sharpmush-help/pennfunc/#time) +- [secs()](/reference/sharpmush-help/pennfunc/#secs) +- [objid()](/reference/sharpmush-help/pennfunc/#objid) +## ANGLES + + In any function which accepts an angle type, the argument can be one of 'd' for degrees, 'r' for radians, or 'g' for gradians. Gradians are not used often, but it's included for completeness. + + As a refresher, there are 180 degrees in pi radians in 200 gradians. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## CTU() +`ctu(<angle>, <from>, <to>)` + + Converts between the different ways to measure angles. `<from>` controls what the angle is treated as, and `<to>` what form it is turned into. See HELP ANGLES for more information. + + Example: +``` +say 90 degrees is [ctu(90, d, r)] radians +You say, "90 degrees is 1.570796 radians" +``` + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## DEC() +`dec(<integer>)` +`dec(<string-ending-in-integer>)` + + dec() returns the given `<integer>` minus 1. If given a string that ends in an integer, it decrements only the final integer portion. That is: + + > think dec(3) + 2 + + > think dec(hi3) + hi2 + + > think dec(1.3.3) + 1.3.2 + + > think dec(1.3) + 1.2 + + Note especially the last example, which will trip you up if you use floating point numbers with dec() and expect it to work like sub(). + + If the null_eq_zero @config option is on, using dec() on a string which does not end in an integer will return `<string>`-1. When null_eq_zero is turned off, it will return an error. + + +### See Also +- [inc()](/reference/sharpmush-help/pennfunc/#inc) +- [sub()](/reference/sharpmush-help/pennfunc/#sub) +## DECOMPOSE() +`decompose(<string>)` + + decompose() works like escape() with the additional caveat that it inserts parse-able characters to recreate `<string>` exactly after one parsing. It takes care of multiple spaces, '%r's, and '%t's. + + Example: +``` +think decompose(This is \[a [ansi(y,test)]\][space(3)]) +This is \[a%b[ansi(y,test)]\] %b%b +``` + + +### See Also +- [@decompile2](/reference/sharpmush-help/penncmd/#decompile2) +- [escape()](/reference/sharpmush-help/pennfunc/#escape) +- [secure()](/reference/sharpmush-help/pennfunc/#secure) +- [] +## DEFAULT() +`default([<obj>/]<attr>[, ... ,[<objN>]/<attrN>], <default>)` + + This function returns the value of the first possible `<obj>`/`<attr>`, as if retrieved via the get() function, if the attribute exists and is readable by you. Otherwise, it evaluates `<default>`, and returns that. Note that `<default>` is only evaluated if none of the given attributes exist or can be read. Note further than an empty attribute counts as an existing attribute. + + This is useful for code that needs to return the value of an attribute, or an error message or default case, if that attribute does not exist. + + Examples: +``` +&TEST me=apple orange banana +say default(me/Test, No fruits!) +You say "apple orange banana" +``` + + > &TEST ME + > say default(me/Test, No fruits!) + You say "No fruits!" + + +### See Also +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [edefault()](/reference/sharpmush-help/pennfunc/#edefault) +- [udefault()](/reference/sharpmush-help/pennfunc/#udefault) +- [uldefault()](/reference/sharpmush-help/pennfunc/#uldefault) +- [strfirstof()](/reference/sharpmush-help/pennfunc/#strfirstof) +## STRDELETE() +## DELETE() +`strdelete(<string>, <first>, <len>)` + + Return a modified `<string>`, with `<len>` characters starting after the character at position `<first>` deleted. In other words, it copies `<first>` characters, skips `<len>` characters, and then copies the remainder of the string. If `<len>` is negative, deletes characters leftwards from `<first>`. Characters are numbered starting at 0. + + Examples: +``` +say strdelete(abcdefgh, 3, 2) +You say, "abcfgh" +``` + + > say strdelete(abcdefgh, 3, -2) + You say, "abefgh" + + delete() is an alias for strdelete(), for backwards compatability. + + +### See Also +- [strreplace()](/reference/sharpmush-help/pennfunc/#strreplace) +- [strinsert()](/reference/sharpmush-help/pennfunc/#strinsert) +- [mid()](/reference/sharpmush-help/pennfunc/#mid) +- [ldelete()](/reference/sharpmush-help/pennfunc/#ldelete) +## DIE() +`die(<number of times to roll die>, <number of sides on die>[, <show>])` + + This function simulates rolling dice. It "rolls" a die with a given number of sides, a certain number of times, and adds the results. For example, DIE(2, 6) would roll "2d6" - two six-sided dice, generating a result in the range 2-12. The maximum number of dice this function will roll in a single call is 700. If `<show>` is true, the result will be a space-seperated list of the individual rolls rather than their sum. + + Examples: +``` +think die(3, 6) +6 +think die(3, 6, 1) +5 2 1 +``` + +### See Also +- [rand()](/reference/sharpmush-help/pennfunc/#rand) +## DIG() +`dig(<name>[, <exit to>[, <exit from>[, <room dbref>, <to dbref>, <from dbref>]]])` + + This function digs a room called `<name>`, and optionally opens and links `<exit to>` and `<exit from>`, like the normal @dig command. It returns the dbref number of the new room. + + Wizards and objects with the pick_dbref power can supply optional fourth through sixth arguments to specify garbage objects to use for the new room and exits. + + +### See Also +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [open()](/reference/sharpmush-help/pennfunc/#open) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [pcreate()](/reference/sharpmush-help/pennfunc/#pcreate) +## DIGEST() +## MD5 +## SHA1 +## CHECKSUM +## HASH +`digest(list)` +`digest(<algorithm>, <string>)` + + Returns a checksum (hash, digest, etc.) of `<string>` using the given `<algorithm>`. The result is a unique large number represented in base 16. + + Typically at least the following algorithms are supported: + + md4 md5 ripemd160 sha1 sha224 sha256 sha384 sha512 whirlpool + + Depending on the host's OpenSSL version and how it was configured, there might be more (or less) available. digest(list) returns the methods a particular server understands if the OpenSSL library version being used is recent enough (1.0.0 and higher), or '#-1 LISTING NOT SUPPORTED' on older versions. For portable code, stick with MD5, SHA1 and the SHA2 family. + + Example: +``` +think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r) +... +MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2 +MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8 +MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc +RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873 +SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 +SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db +... +``` + + +### See Also +- [encode64()](/reference/sharpmush-help/pennfunc/#encode64) +- [encrypt()](/reference/sharpmush-help/pennfunc/#encrypt) +- [hmac()](/reference/sharpmush-help/pennfunc/#hmac) +## DIST2D() +`dist2d(<x1>, <y1>, <x2>, <y2>)` + + Returns the distance between two points in the Cartesian plane that have coordinates (`<x1>`, `<y1>`) and (`<x2>`, `<y2>`). + + +### See Also +- [dist3d()](/reference/sharpmush-help/pennfunc/#dist3d) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## DIST3D() +`dist3d(<x1>, <y1>, <z1>, <x2>, <y2>, <z2>)` + + Returns the distance between two points in space, with coordinates (`<x1>`, `<y1>`, `<z1>`) and (`<x2>`, `<y2>`, `<z2>`). + + +### See Also +- [dist2d()](/reference/sharpmush-help/pennfunc/#dist2d) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## DIV() +## FLOORDIV() +## FDIV() +`div(<number1>, <number2>[, ... , <numberN>])` +`fdiv(<number1>, <number2>[, ... , <numberN>])` +`floordiv(<number1>, <number2>[, ... , <numberN>])` + + These functions divide `<number1>` by `<number2>` (and, for each subsequent argument, divide the previous result by `<numberN>`) and return the final result. + + div() returns the integer part of the quotient. floordiv() returns the largest integer less than or equal to the quotient; for positive numbers, they are identical, but for negative numbers they may differ. fdiv() returns the floating-point quotient. + + Examples: + + div(13,4) ==> 3 and floordiv(13,4) ==> 3 + div(-13,4) ==> -3 but floordiv(-13,4) ==> -4 + div(13,-4) ==> -3 but floordiv(13,-4) ==> -4 + div(-13,-4) ==> 3 and floordiv(-13,-4) ==> 3 + + fdiv(13,4) ==> 3.25 fdiv(-13,4) ==> -3.25 + fdiv(13,-4) ==> -3.25 fdiv(-13,-4) ==> 3.25 + + Note that add(mul(div(%0,%1),%1),remainder(%0,%1)) always yields %0, and add(mul(floordiv(%0,%1),%1),modulo(%0,%1)) also always yields %0. + + +### See Also +- [modulo()](/reference/sharpmush-help/pennfunc/#modulo) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## DOING() +`doing(<player|descriptor>)` + + When given the name of a player or descriptor, doing() returns the player's @doing. If no matching player or descriptor is found, or the descriptor is not yet connected to a player, an empty string is returned. + + +### See Also +- [@poll](/reference/sharpmush-help/penncmd/#poll) +- [@doing](/reference/sharpmush-help/penncmd/#doing) +- [poll()](/reference/sharpmush-help/pennfunc/#poll) +## E() +## EXP() +`e([<number>])` + + With no argument, returns the value of "e" (2.71828182845904523536, rounded to the game's float_precision setting). + + If a `<number>` is given, it returns e to the power of `<number>`. + + exp() is an alias for e(). + +### See Also +- [power()](/reference/sharpmush-help/pennfunc/#power) +- [log()](/reference/sharpmush-help/pennfunc/#log) +## EDEFAULT() +`edefault([<obj>/]<attr>, <default case>)` + + This function returns the evaluated value of `<obj>`/`<attr>`, as if retrieved via the get_eval() function, if the attribute exists and is readable by you. Otherwise, it evaluates `<default case>`, and returns that. `<default case>` is only evaluated if the attribute does not exist or cannot be read. + + Example: +``` +&TEST me=You have lost [rand(10)] marbles. +say edefault(me/Test,You have no marbles.) +You say "You have lost 6 marbles." +``` + + > &TEST me + > say edefault(me/Test,You have no marbles.) + You say "You have no marbles." + + +### See Also +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [eval()](/reference/sharpmush-help/pennfunc/#eval) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [default()](/reference/sharpmush-help/pennfunc/#default) +- [udefault()](/reference/sharpmush-help/pennfunc/#udefault) +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +## EDIT() +`edit(<string>, <search>, <replace>[, ... , <searchN>, <replaceN>])` + + For each given `<search>` and `<replace>` pair, edit() replaces all occurrences of `<search>` in `<string>` with the corresponding `<replace>`. + + If `<search>` is a caret (^), `<replace>` is prepended. + If `<search>` is a dollar sign ($), `<replace>` is appended. + If `<search>` is an empty string, `<replace>` is inserted between every character, and before the first and after the last. + If `<replace>` is an empty string, `<search>` is deleted from the string. + + Example: +``` +say edit(this is a test,^,I think%b,$,.,a test,an exam) +You say "I think this is an exam." +``` + + edit() can not replace a literal single ^ or $. Use regedit() for that. + + +### See Also +- [@edit](/reference/sharpmush-help/penncmd/#edit) +- [regedit()](/reference/sharpmush-help/pennfunc/#regedit) +## ELEMENTS() +`elements(<list of words>, <list of numbers>[, <delim>[, <osep>]])` + + This function returns the words in `<list of words>` that are in the positions specified by `<list of numbers>`. The `<list of words>` are assumed to be space-separated, unless a `<delim>` is given. If `<osep>` is given, the matching words are separated by `<osep>`, otherwise by `<delim>`. + + If any of the `<list of numbers>` is negative, it counts backwards from the end of the list of words, with -1 being the last word, -2 the word before last, and so on. + + Examples: +``` +say elements(Foo Ack Beep Moo Zot,2 4) +You say "Ack Moo" +``` + + > say elements(Foof|Ack|Beep|Moo,3 1,|) + You say "Beep|Foof" + + > say elements(The last word is foo, -1) + You say "foo" + + +### See Also +- [extract()](/reference/sharpmush-help/pennfunc/#extract) +- [index()](/reference/sharpmush-help/pennfunc/#index) +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +## ELOCK() +`elock(<object>[/<locktype>], <victim>)` + + elock() returns 1 if the `<victim>` would pass the @lock/`<locktype>` on `<object>`, and 0 if it would fail. Any locktype can be given, including user-defined "user:" @locks. If no `<locktype>` is given, it defaults to the Basic lock. + + You must be able to examine the lock, which means either that you must control `<object>`, it must be @set VISUAL, or the `<locktype>` lock must be @lset VISUAL. + + Examples: +``` +@lock/drop Dancing Slippers=#0 +think elock(Dancing Slippers/drop, Princess) +0 +``` + + > @lock/user:test map==*Fred|=*George + > think elock(map/test,*Snape) + 0 + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [testlock()](/reference/sharpmush-help/pennfunc/#testlock) +- [lockfilter()](/reference/sharpmush-help/pennfunc/#lockfilter) +- [@lset](/reference/sharpmush-help/penncmd/#lset) +## EMIT() +## NSEMIT() +`emit(<message>)` +`nsemit(<message>)` + + Sends a message to the room, as per @emit. + + nsemit() works like @nsemit. + + +### See Also +- [pemit()](/reference/sharpmush-help/pennfunc/#pemit) +- [remit()](/reference/sharpmush-help/pennfunc/#remit) +- [lemit()](/reference/sharpmush-help/pennfunc/#lemit) +- [oemit()](/reference/sharpmush-help/pennfunc/#oemit) +- [zemit()](/reference/sharpmush-help/pennfunc/#zemit) +## ENCODE64() +## DECODE64() +## base64 +`encode64(<string>)` +`decode64(<string>)` + + encode64() returns `<string>` encoded using base-64 format. + + decode64() converts a base-64 encoded `<string>` back to its original form. + + +### See Also +- [encrypt()](/reference/sharpmush-help/pennfunc/#encrypt) +- [digest()](/reference/sharpmush-help/pennfunc/#digest) +## ENCRYPT() +## DECRYPT() +`encrypt(<string>, <password>[, <encode>])` +`decrypt(<string>, <password>[, <encoded>])` + + encrypt() returns an encrypted string produced by a simple password-based encrypted algorithm. Good passwords are long passwords. This is not high-security encryption. + + If the optional `<encode>` argument is true, the resulting string is further encoded in base-64 so that it only contains alphanumeric characters. + + decrypt() decrypts a string encrypted with encrypt(). The `<encoded>` argument indicates that the encrypted string was base-64 encoded. + + +### See Also +- [encode64()](/reference/sharpmush-help/pennfunc/#encode64) +- [digest()](/reference/sharpmush-help/pennfunc/#digest) +## ENTRANCES() +`entrances([<object>[, <type>[, <begin>[, <end>]]]])` + + With no arguments, the entrances() function returns a list of all exits, things, players, and rooms linked to your location, like @entrances. You can specify an object other than your current location with `<object>`. You can limit the type of objects found by specifying one or more of the following for `<type>`: + a all (default) + e exits + t things + p players + r rooms + + You can also limit the range of the dbrefs searched by giving `<begin>` and `<end>`. If you control `<object>`, or have the Search or See_All powers, all objects linked to `<object>` are returned. Otherwise, only objects you can examine will be included. + + +### See Also +- [lsearch()](/reference/sharpmush-help/pennfunc/#lsearch) +- [@entrances](/reference/sharpmush-help/penncmd/#entrances) +## EQ() +`eq(<number1>, <number2>[, ... , <numberN>])` + + Takes two or more `<number>`s, and returns 1 if they are all equal, and 0 otherwise. + + +### See Also +- [neq()](/reference/sharpmush-help/pennfunc/#neq) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## ESCAPE() +`escape(<string>)` + + The escape() function "escapes out" potentially "dangerous" characters, preventing function evaluation in the next pass of the parser. It returns `<string>` after adding the escape character ('\') at the beginning of the string, and before the following characters: + + % ; [ ] { } \ ( ) , ^ $ + + This function prevents code injection in strings entered by players. It is only needed when `<string>` will be passed through a command or function which will evaluate it again, which can usually be avoided. Since the function preserves the original string, it is, in most cases, a better choice than secure(), but decompose() is often better still. + + +### See Also +- [decompose()](/reference/sharpmush-help/pennfunc/#decompose) +- [secure()](/reference/sharpmush-help/pennfunc/#secure) +- [] +## EVAL() +## GET_EVAL() +`eval(<object>, <attribute>)` +`get_eval(<object>/<attribute>)` + + eval() and get_eval() are similar to ufun(), in that they evaluate the given `<attribute>` on `<object>`. However, they change the enactor (%#) to the object executing the eval (%!). It does not modify the stack (%0-%9), so the attribute being evaled sees the same values for them that the calling code does. Unless you need this behavior, it is better to use u() instead, which hides the caller's stack. + + Example: +``` +&TEST Foo=%b%b%b-[name(me)] (%n) +&CMD Foo=$test: @emit ufun(me/test) ; @emit eval(me, test) +test +-Foo (Mike) +-Foo (Foo) +``` + + +### See Also +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [u()](/reference/sharpmush-help/pennfunc/#u) +- [xget()](/reference/sharpmush-help/pennfunc/#xget) +- [edefault()](/reference/sharpmush-help/pennfunc/#edefault) +## EXIT() +`exit(<object>)` + + Returns the dbref of the first exit in room `<object>`. + + You can get the complete exit list of any room you may examine, regardless of whether or not exits are dark. You can get the partial exit list (obeying DARK/LIGHT/etc.) of your current location or the enactor (%#). You CANNOT get the exit list of anything else, regardless of whether or not you have objects in it. + + +### See Also +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [next()](/reference/sharpmush-help/pennfunc/#next) +## EXTRACT() +`extract(<list>[, <first>[, <length>[, <delimiter>]]])` + + This function returns `<length>` elements of `<list>`, counting from the `<first>`th element. If `<length>` is not specified, the default is 1, so extract(`<list>`,3) acts like elements(`<list>`,3). If `<first>` is not specified, the default is the 1, so extract(`<list>`) acts like first(`<list>`). + + If `<first>` is negative, extract() will begin counting backwards from the end of `<list>`, so -1 starts at the last element, -2 the element before last, and so on. + + If `<length>` is negative, extract() will return up to and including the `<length>`th element from the right, so -1 will extract up to the last element, -2 up to the element before last, and so on. + + Examples: +``` +think extract(This is a test string,3,2) +a test +``` + + > think extract(Skip the first and last elements, 2, -2) + the first and last + + > think extract(Get just the last three elements,-3, 3) + last three elements + + +### See Also +- [index()](/reference/sharpmush-help/pennfunc/#index) +- [elements()](/reference/sharpmush-help/pennfunc/#elements) +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +## FILTER() +## FILTERBOOL() +`filter([<obj>/]<attr>, <list>[, <delimiter>[, <osep>[, ..., <argN>]]])` +`filterbool([<obj>]/<attr>, <list>[, <delimiter>[, <osep>[, ..., <argN>]]])` + + These functions returns the elements of `<list>` for which a user-defined function evaluates to "1" (for filter()), or to a boolean true value (for filterbool()). That function is specified by the first argument (just as with the ufun() function), and the element of the list being tested is passed to that user-defined function as %0. Up to 29 further `<arg>`s can be specified, and will be available in the function as v(1) to v(30). + + `<delimiter>` defaults to a space, and `<osep>` defaults to `<delimiter>`. + + filter(`<obj>`/`<attr>`, `<list>`) is roughly equivalent to squish(iter(`<list>`, switch(ufun(`<obj>`/`<attr>`, %i0),1,%i0,))) though the filter() version is much more efficient. + + Example: +``` +&IS_ODD test=mod(%0,2) +say filter(test/is_odd, 1 2 3 4 5 6) +You say, "1 3 5" +``` + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [allof()](/reference/sharpmush-help/pennfunc/#allof) +- [lockfilter()](/reference/sharpmush-help/pennfunc/#lockfilter) +- [boolean values](/reference/sharpmush-help/penntop/#boolean-values) +## FINDABLE() +`findable(<object>, <victim>)` + + This function returns 1 if `<object>` can locate `<victim>`, or 0 if it cannot. If one of the objects does not exist, it will return #-1 ARGN NOT FOUND (where N is the argument which is the invalid object). + + The object executing the function needs to be see_all or control both `<object>` and `<victim>`. + + +### See Also +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [loc()](/reference/sharpmush-help/pennfunc/#loc) +## FIRST() +`first(<list>[, <delimiter>])` + + Returns the first element of a list. + + +### See Also +- [before()](/reference/sharpmush-help/pennfunc/#before) +- [rest()](/reference/sharpmush-help/pennfunc/#rest) +- [last()](/reference/sharpmush-help/pennfunc/#last) +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [strfirstof()](/reference/sharpmush-help/pennfunc/#strfirstof) +## FIRSTOF() +`firstof(<expr>[, ... , <exprN>], <default>)` + + Returns the first evaluated `<expr>` that is true. If no `<expr>` arguments are true, `<default>` is returned. + + The meaning of true or false is dependent on configuration options as explained in the 'BOOLEAN VALUES' help topics. + + This function evaluates arguments one at a time, stopping as soon as one is true. + + Examples: +``` +say firstof(0,2) +You say, "2" +``` + + > say firstof(10,11,0) + You say, "10" + + > say firstof(grab(the cat,mommy),grab(in the hat,daddy),#-1 Error) + You say, "#-1 Error" + + > say firstof(get(%#/royal cheese),#-1 This Has No Meaning,0,) + You say, "" + + +### See Also +- [allof()](/reference/sharpmush-help/pennfunc/#allof) +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [strfirstof()](/reference/sharpmush-help/pennfunc/#strfirstof) +- [filter()](/reference/sharpmush-help/pennfunc/#filter) +## FLAGS() +`flags()` +`flags([<object>[/<attribute>]])` + + With no arguments, flags() returns a string consisting of the flag letters for each flag on the MUSH. Note that some flags have no letter, and mutlple flags may have the same letter (and so will appear multiple times). + + If an `<object>` is given, flags() returns 'P', 'T', 'R' or 'E', depending on whether `<object>` is a player, thing, room, or exit, followed by the flag letter for each flag set on `<object>`. + + With an `<object>`/`<attribute>`, the flag letters for each flag set on the given `<attribute>` are returned. + + Examples: +``` +@create Test +@set Test=no_command puppet +think flags(Test) +Tnp +``` + + > think flags(me/describe) + $vp + + +### See Also +- [lflags()](/reference/sharpmush-help/pennfunc/#lflags) +- [list()](/reference/sharpmush-help/pennfunc/#list) +## LFLAGS() +`lflags()` +`lflags(<object>[/<attribute>])` + + With an argument, lflags() returns a space-separated list consisting of the names of all the flags attached to `<object>`, or `<object>`'s `<attribute>`. + + Given no arguments, this function returns a space-separated list of all flag names known to the server, as per @list/flags. + + Examples: +``` +@create Test +@set Test=no_command puppet +think flags(Test) +NO_COMMAND PUPPET +``` + + > think flags(me/describe) + NO_COMMAND VISUAL + + +### See Also +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [list()](/reference/sharpmush-help/pennfunc/#list) +## FLIP() +## REVERSE() +`flip(<string>)` + + flip() reverses a string. reverse() is an alias for flip(). + + Example: +``` +say flip(foo bar baz) +You say, "zab rab oof" +``` + + +### See Also +- [revwords()](/reference/sharpmush-help/pennfunc/#revwords) +## FMOD() +`fmod(<number>, <divisor>)` + + Similar to remainder() but may take floating point arguments. The return value is `<number>` - n * `<divisor>`, where n is the quotient of `<number>` / `<divisor>`, rounded towards zero. The result has the same sign as `<number>` and a magnitude less than the magnitude of `<divisor>`. + + Example: +``` +think fmod(6.1,2.5) +1.1 +``` + +### See Also +- [fdiv()](/reference/sharpmush-help/pennfunc/#fdiv) +- [div()](/reference/sharpmush-help/pennfunc/#div) +- [mod()](/reference/sharpmush-help/pennfunc/#mod) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## FOLD() +`fold([<obj>/]<attr>, <list>[, <base case>[, <delimiter>]])` + + This function "folds" a list through the user-defined function, set in the specified `<obj>`/`<attribute>`. + + If no `<base case>` is provided, fold() passes the first element of `<list>` as %0, and the second element of `<list>` as %1, to the user-defined function. The user-defined function is then called again, with the result of the first evaluation being %0, and the next (third) element of the list as %1. This is repeated until all the elements of the list have been used. The result of the last call of `<obj>`/`<attr>` is returned. + + If a base case is provided, it is passed as %0, and the first element of list is passed as %1, to the user-defined function. The process for the no-base-case fold() is then used. + + The number of times `<attr>` has been called is passed as %2, starting from 0. + + Note that it's not possible to pass a `<delimiter>` to fold without also giving a `<base case>`; see the examples for a way around this. + + See [fold2](/reference/sharpmush-help/pennfunc/#fold2) for examples. +## FOLD2 + + Examples: +``` +&REP_NUM test=%0[repeat(%1,%1)] +say fold(test/rep_num,1 2 3 4 5) +You say, "122333444455555" +say fold(test/rep_num,1 2 3 4 5,List:) +You say, "List:122333444455555" +``` + + > &ADD_NUMS test=add(%0,%1) + > say fold(test/add_nums,1 2 3 4 5) + You say, "15" + + If your list uses a delimiter, you need to give a `<base case>`. This can be a problem for dynamically generated lists. One solution is to use a register and pop the first element off the list. For example: +``` +&GEN_LIST test=lnum(1,rand(5,10),|) +&ADD_NUMS test=add(%0,%1) +say letq(fl, u(gen_list), fold(test/add_nums, rest(%q<fl>,|), first(%q<fl>,|), |)) +You say, "36" +``` + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +## FOLLOWERS() +`followers(<object>)` + + Returns the list of things and players following object. You must control `<object>`. + + +### See Also +- [following()](/reference/sharpmush-help/pennfunc/#following) +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +## FOLLOWING() +`following(<object>)` + + Returns the list of things and players that the object is following. You must control `<object>`. + + +### See Also +- [followers()](/reference/sharpmush-help/pennfunc/#followers) +- [follow](/reference/sharpmush-help/penncmd/#follow) +- [unfollow](/reference/sharpmush-help/penncmd/#unfollow) +## FOREACH() +`foreach([<object>/]<attribute>, <string>[, <start>[, <end>]])` + + This function is similar to map(), but instead of calling the given `<object>`/`<attribute>` for each word in a list, it is called for each character in `<string>`. + + For each character in `<string>`, `<object>`/`<attribute>` is called, with the character passed as %0, and its position in the string as %1 (the first character has position 0). The results are concatenated. + + If `<start>` is given, everything before the first occurrence of `<start>` is copied as-is, without being passed to the `<object>`/`<attribute>`. If `<end>` is given, everything after the first occurrence of `<end>` is copied as-is. The `<start>` and `<end>` characters themselves are not copied. + + See [foreach2](/reference/sharpmush-help/pennfunc/#foreach2) for examples. +## FOREACH2 + + Examples: +``` +&add_one me=add(%0,1) +say foreach(add_one, 54321) +You say, "65432" +say [foreach(add_one, This is #0# number, #, #)] +You say, "This is 1 number" +``` + + > &upper me=ucstr(%0) + > say foreach(upper, quiet quiet >shout`< quiet, >`, <) + You say, "quiet quiet SHOUT quiet" + + > &is_alphanum me=regmatch(%0, \[\[:alnum:\](/reference/sharpmush-help/pennconf/#alnum)\])%b + > say foreach(is_alphanum,jt1o+) + You say, "1 1 1 1 0 " + + +### See Also +- [map()](/reference/sharpmush-help/pennfunc/#map) +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +## FRACTION() +`fraction(<number>[, <whole>])` + + This function returns a fraction representing the floating-point `<number>`. Since not all numbers can be expressed as a fraction, dividing the numerator by the denominator of the results will not always return the original `<number>`, but something close to it. + + If `<whole>` is true, and `<number>` is greater than 1.0 (or less than -1.0), the return value will be a whole number followed by the fraction representation of the decimal. + + Examples: +``` +think fraction(.75) +3/4 +``` + + > think fraction(pi()) + 348987/111086 + + > think fraction(2) + 2 + + > think fraction(2.75) + 11/4 + + > think fraction(2.75, 1) + 2 3/4 +## FULLNAME() +`fullname(<object>)` + + fullname() returns the full name of object `<object>`. It is identical to name() except that for exits, fullname() returns the complete exit name, including all aliases. + + Example: +``` +say fullname(south) +You say, "South;sout;sou;so;s" +``` + + +### See Also +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +- [alias()](/reference/sharpmush-help/pennfunc/#alias) +- [fullalias()](/reference/sharpmush-help/pennfunc/#fullalias) +## FUNCTIONS() +`functions([<type>])` + + Returns a space-separated list of the names of functions. If `<type>` is "local", only @functions are listed. If "builtin", only builtin functions. If "all" or omitted, both are returned. + + +### See Also +- [list()](/reference/sharpmush-help/pennfunc/#list) +- [config()](/reference/sharpmush-help/pennfunc/#config) +## GET() +## XGET() +`get(<object>/<attribute>)` +`xget(<object>, <attribute>)` + + These functions return the string stored in an `<object>`'s `<attribute>` attribute, without evaluating it. You must be able to examine the attribute. get() and xget() are identical, apart from the argument separator. + + Example: +``` +&test me=This is [a test]. +think get(me/test) +This is [a test]. +``` + + +### See Also +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +- [visible()](/reference/sharpmush-help/pennfunc/#visible) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [default()](/reference/sharpmush-help/pennfunc/#default) +- [udefault()](/reference/sharpmush-help/pennfunc/#udefault) +## GETPIDS() +`getpids(<object>[/<attribute>])` + + Returns a space-separated list of semaphore queue process ids waiting on the given `<object>` and semaphore `<attribute>`. If `<attribute>` is not given, pids for all semaphores on the object are returned. + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [lpids()](/reference/sharpmush-help/pennfunc/#lpids) +- [pidinfo()](/reference/sharpmush-help/pennfunc/#pidinfo) +- [SEMAPHORES](/reference/sharpmush-help/penntop/#semaphores) +## GRAB() +## REGRAB() +## REGRABI() +`grab(<list>, <pattern>[, <delimiter>])` +`regrab(<list>, <regexp>[, <delimiter>])` +`regrabi(<list>, <regexp>[, <delimiter>])` + + These functions return the first word in `<list>` which matches the pattern. For grab(), `<pattern>` is a wildcard pattern ([wildcards](/reference/sharpmush-help/penntop/#wildcards)). For regrab() and regrabi(), the pattern is a regular expression. regrabi() is case-insensitive. `<delimiter>` defaults to a space. + + Basically, this is a much more efficient way to do: +`elements(<list>, match(<list>, <pattern>[, <delimiter>])[, <delimiter>])` + or the regular expression variation thereof. + + +### See Also +- [graball()](/reference/sharpmush-help/pennfunc/#graball) +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [extract()](/reference/sharpmush-help/pennfunc/#extract) +- [elements()](/reference/sharpmush-help/pennfunc/#elements) +- [regmatch()](/reference/sharpmush-help/pennfunc/#regmatch) +## GRABALL() +## REGRABALL() +## REGRABALLI() +`graball(<list>, <pattern>[, <delim>[, <osep>]])` +`regraball(<list>, <regexp>[, <delim>[, <osep>]])` +`regraballi(<list>, <regexp>[, <delim>[, <osep>]])` + + These functions work identically to the grab() and regrab()/regrabi() functions, except they return all matches, not just the first: They return all words in the `<list>` which match `<pattern>`. If none match, an empty string is returned. `<delim>` defaults to a space, and `<osep>` defaults to `<delim>`. + + Examples: +``` +say graball(This is a test of a test,test) +You say "test test" +say graball(This|is|testing|a|test,tes*,|) +You say "testing|test" +say regraball(This is testing a test,s$) +You say "This is" +``` + + +### See Also +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [matchall()](/reference/sharpmush-help/pennfunc/#matchall) +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +- [regmatch()](/reference/sharpmush-help/pennfunc/#regmatch) +## GREP() +## REGREP() +## WILDGREP() +## GREPI() +## REGREPI() +## WILDGREPI() +## PGREP() +`grep(<object>, <attrs>, <substring>)` +`wildgrep(<object>, <attrs>, <pattern>)` +`regrep(<object>, <attrs>, <regexp>)` +`grepi(<object>, <attrs>, <substring>)` +`regrepi(<object>, <attrs>, <regexp>)` +`wildgrepi(<object>, <attrs>, <pattern>)` +`pgrep(<object>, <attrs>, <substring>)` + + These functions return a list of attributes on `<object>` containing `<substring>`, matching the wildcard `<pattern>`, or matching the regular expression `<regexp>`. `<attrs>` is a wildcard pattern for attribute names to search. + + Parsing _does_ occur before this function is invoked. Therefore, "special" characters will need to be escaped out. + + grep()/wildgrep()/regrep() are case-sensitive. + grepi()/wildgrepi()/regrepi() are case-insensitive. + + pgrep() works like grep(), but also checks attributes inherited from parents. + + +### See Also +- [@grep](/reference/sharpmush-help/penncmd/#grep) +- [lattr()](/reference/sharpmush-help/pennfunc/#lattr) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## GT() +`gt(<number1>, <number2>[, ... , <numberN>])` + + Takes two or more numbers, and returns 1 if and only if each number is greater than the number after it, and 0 otherwise. + + +### See Also +- [gte()](/reference/sharpmush-help/pennfunc/#gte) +- [lt()](/reference/sharpmush-help/pennfunc/#lt) +- [lte()](/reference/sharpmush-help/pennfunc/#lte) +- [eq()](/reference/sharpmush-help/pennfunc/#eq) +- [neq()](/reference/sharpmush-help/pennfunc/#neq) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## GTE() +`gte(<number1>, <number2>[, ... , <numberN>])` + + Takes two or more numbers, and returns 1 if and only if each number is greater than or equal to the number after it, and 0 otherwise. + + +### See Also +- [gt()](/reference/sharpmush-help/pennfunc/#gt) +- [lt()](/reference/sharpmush-help/pennfunc/#lt) +- [lte()](/reference/sharpmush-help/pennfunc/#lte) +- [eq()](/reference/sharpmush-help/pennfunc/#eq) +- [neq()](/reference/sharpmush-help/pennfunc/#neq) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## HASATTR() +## HASATTRP() +## HASATTRVAL() +## HASATTRPVAL() +`hasattr(<object>, <attribute>)` +`hasattrp(<object>, <attribute>)` +`hasattrval(<object>, <attribute>)` +`hasattrpval(<object>, <attribute>)` + + The hasattr*() functions check to see if `<object>` has a given attribute. They return #-1 if the object does not exist or the attribute can't be examined by the player. Otherwise, they return 1 if the attribute is present and 0 if it is not. + + hasattr() checks to see if `<attribute>` exists on `<object>` only. + + hasattrp() also checks for `<attribute>` on `<object>`'s parent/ancestor. + + hasattrval() only returns 1 if `<attribute>` exists and is non-empty. An "empty" attr is one containing a null value (if the empty_attrs config option is on), or one containing a single space (if the option is off). + + hasattrpval() is like hasattrval() but also checks parents. + + All four functions will also work with one argument in the form of `<object>`/`<attribute>`. + + +### See Also +- [visible()](/reference/sharpmush-help/pennfunc/#visible) +- [lattr()](/reference/sharpmush-help/pennfunc/#lattr) +## HASFLAG() +`hasflag(<object>[/<attrib>], <flag>)` + + With no `<attrib>`, hasflag() returns 1 if `<object>` has the `<flag>` flag set. If `<attrib>` is specified, the attribute is checked for the `<flag>` attribute flag instead. If the flag is not present, 0 is returned. + + hasflag() will accept a full flag name ("Wizard") or a flag letter ("W"). You can check the flags of any object, whether you control them or not. + + Example: +``` +think hasflag(me, wizard) +1 +``` + + +### See Also +- [orlflags()](/reference/sharpmush-help/pennfunc/#orlflags) +- [andlflags()](/reference/sharpmush-help/pennfunc/#andlflags) +- [orflags()](/reference/sharpmush-help/pennfunc/#orflags) +- [andflags()](/reference/sharpmush-help/pennfunc/#andflags) +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [lflags()](/reference/sharpmush-help/pennfunc/#lflags) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) +- [@flag](/reference/sharpmush-help/penncmd/#flag) +- [haspower()](/reference/sharpmush-help/pennfunc/#haspower) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +## HASPOWER() +`haspower(<object>, <power>)` + + Returns 1 if `<object>` has the named power, and 0 if it does not. + + You can check the powers of any object, whether you control it or not. + + +### See Also +- [@power](/reference/sharpmush-help/penncmd/#power) +- [powers list](/reference/sharpmush-help/pennconf/#powers-list) +- [hasflag()](/reference/sharpmush-help/pennfunc/#hasflag) +## HASTYPE() +`hastype(<object>, <type list>)` + + Returns 1 if `<object>` belongs to one of the types given in `<type list>`, and 0 otherwise. Valid types are PLAYER, THING, ROOM, EXIT and GARBAGE. + + Example: +``` +@create Test Object +think hastype(test object, PLAYER EXIT) +0 +think hastype(test object, PLAYER THING) +1 +``` + + +### See Also +- [TYPES](/reference/sharpmush-help/penntop/#types) +- [type()](/reference/sharpmush-help/pennfunc/#type) +## HIDDEN() +`hidden(<player|descriptor>)` + + If you can see hidden players, this function returns 1 if `<player>` (or the player connected to `<descriptor>`) is hidden, and 0 otherwise. If you cannot see hidden players, hidden() returns #-1. + + +### See Also +- [@hide](/reference/sharpmush-help/penncmd/#hide) +## HOME() +`home(<object>)` + + Returns the object's 'home', where it is @link'd to. This is the home for a player or thing, the drop-to of a room, or source of an exit. + + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +## HOST() +## HOSTNAME() +`host(<player|descriptor>)` + + Returns the hostname a player is connected from, as shown on the wizard WHO. This may be more reliable that get(`<player>`/lastsite) if the player has multple connections from different locations, and the function is called with a descriptor argument. + + The caller can use the function on himself, but using on any other player requires privileged power such as Wizard, Royalty or SEE_ALL. + + hostname() is an alias for host(). + + +### See Also +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +- [ipaddr()](/reference/sharpmush-help/pennfunc/#ipaddr) +- [ports()](/reference/sharpmush-help/pennfunc/#ports) +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +## IDLE() +## IDLESECS() +`idle(<player|descriptor>)` + + This function returns the number of seconds a player has been idle, much as WHO does. `<player name>` must be the full name of a player, or a player's dbref. You can also specify a `<descriptor>`, useful if a player is connected multiple times, or for connections which are still at the login screen. Players who are not connected have an idle time of "-1", as do dark wizards, when idle() is used on them by a non-priv'ed player. + + idlesecs() is an alias for idle(). + + +### See Also +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +- [conn()](/reference/sharpmush-help/pennfunc/#conn) +## IF() +## IFELSE() +`if(<condition>, <true expression>[, <false expression>])` +`ifelse(<condition>, <true expression>, <false expression>)` + + These functions evaluate the `<condition>` and return `<true expression>` if the `<condition>` is true, or `<false expression>` (if provided) if the `<condition>` is false. Only the returned `<expression>` is evaluated. + + +### See Also +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [switch()](/reference/sharpmush-help/pennfunc/#switch) +- [@if](/reference/sharpmush-help/penncmd/#if) +- [@break](/reference/sharpmush-help/penncmd/#break) +- [cond()](/reference/sharpmush-help/pennfunc/#cond) +## INAME() +`iname(<object>)` + + iname() returns the name of `<object>`, as it would appear if you were inside it. It is identical to name() except that if the object has a NAMEFORMAT or NAMEACCENT attribute, it is used. + + You must be see_all, control `<object>`, or be inside it to use this function. + + +### See Also +- [@nameformat](/reference/sharpmush-help/penncmd/#nameformat) +- [@nameaccent](/reference/sharpmush-help/penncmd/#nameaccent) +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [fullname()](/reference/sharpmush-help/pennfunc/#fullname) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +## INC() +`inc(<integer>)` +`inc(<string-ending-in-integer>)` + + inc() returns the integer plus 1. If given a string that ends in an integer, it increments only the final integer portion. That is: + + Examples: +``` +think inc(3) +4 +``` + + > think inc(hi3) + hi4 + + > think inc(1.3.3) + 1.3.4 + + Note especially the last example, which will trip you up if you use floating point numbers with inc() and expect it to work like add(). + + If the null_eq_zero @config option is on, using inc() on a string which does not end in an integer will return `<string>`1. When null_eq_zero is turned off, it will return an error. + + +### See Also +- [dec()](/reference/sharpmush-help/pennfunc/#dec) +- [add()](/reference/sharpmush-help/pennfunc/#add) +- [sub()](/reference/sharpmush-help/pennfunc/#sub) +## INDEX() +`index(<list>, <character>, <first>, <length>)` + + This function is similar to extract(), except that it requires four arguments, while extract() uses defaults for its arguments if they aren't given. The function returns `<length>` items starting from the `<first>` position. Trailing spaces are trimmed. + + Examples: +``` +say index(Cup of Tea | Mug of Beer | Glass of Wine, |, 2, 1) +You say, "Mug of Beer" +``` + + > say index(%rtoy boat^%rblue tribble^%rcute doll^%rred ball,^,2,2) + You say, " + blue tribble^ + cute doll" + + +### See Also +- [extract()](/reference/sharpmush-help/pennfunc/#extract) +- [elements()](/reference/sharpmush-help/pennfunc/#elements) +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +## INSERT() +## LINSERT() +`linsert(<list>, <position>, <new item>[, <delim>])` + + If `<position>` is a positive integer, this inserts `<new item>` BEFORE the item at `<position>` from the left in `<list>`. That means that `<new item>` then becomes the `<position>`th element of `<list>`. + + If `<position>` is a negative integer, this inserts `<new item>` AFTER the item at the absolute value of `<position>` from the RIGHT in `<list>`. This is the same as reversing the list before inserting `<new item>`, and then reversing it again into correct order. For example, when `<position>` is -1, `<new item>` will be the last in the list; when `<position>` is -2, `<new item>` will be the second item from the right, and so on. + + If a `<delim>` is not given, a space is assumed. Null items are counted when determining position, as in 'items()'. + + Examples: +``` +say linsert(This is a string,4,test) +You say, "This is a test string" +say linsert(one|three|four,2,two,|) +You say, "one|two|three|four" +say linsert(meep bleep gleep,-3,GOOP) +You say, "meep GOOP bleep gleep" +``` + + insert() is an alias for linsert(), for backwards compatability. + + +### See Also +- [lreplace()](/reference/sharpmush-help/pennfunc/#lreplace) +- [ldelete()](/reference/sharpmush-help/pennfunc/#ldelete) +- [strinsert()](/reference/sharpmush-help/pennfunc/#strinsert) +## ISDAYLIGHT() +`isdaylight([<secs>[, <timezone>]])` + + Returns 1 if it's daylight savings in the specified timezone at the given time. Defaults to the host server's time zone and current time if not specified. + + +### See Also +- [timezones](/reference/sharpmush-help/pennfunc/#timezones) +- [secs()](/reference/sharpmush-help/pennfunc/#secs) +## ISDBREF() +## ISOBJID() +`isdbref(<string>)` +`isobjid(<string>)` + + isobjid() returns 1 if `<string>` is the object id of an existing object. If `<string>` is not a full objid, or is the objid of a garbage object, it returns 0. + + isdbref() functions the same, but will also return 1 if `<string>` is the dbref of an existing (or garbage) object. + + Examples: +``` +@stats +100 objects = 20 rooms, 20 exits, 20 things, 20 players, 20 garbage. +The next object to be created will be #33. +``` + + > think isdbref(#33) + 1 + > think isobjid(#33:1234567890) + 0 + + > think csecs(#1) + 1324654503 + > think isdbref(#1) + 1 + > think isobjid(#) + 0 + > think isdbref(#1:1324654503) + 1 + > think isobjid(#1:1324654503) + 1 + > think isobjid(#1:9876543210) + 0 + + +### See Also +- [DBREFS](/reference/sharpmush-help/penntop/#dbrefs) +- [OBJECT IDS](/reference/sharpmush-help/penntop/#object-ids) +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [objid()](/reference/sharpmush-help/pennfunc/#objid) +## ISINT() +`isint(<string>)` + + Returns 1 if its argument is an integer, and 0 otherwise. Integers can begin with a '+' or '-' sign, but the rest of the string must be digits. + + +### See Also +- [isnum()](/reference/sharpmush-help/pennfunc/#isnum) +## ISNUM() +`isnum(<string>)` + + This function returns 1 if `<string>` is a number, and 0 if it is not. Numbers can begin with a '-' sign (for negatives), but the rest of the characters in the string must be digits, and an optional decimal point. + + +### See Also +- [isint()](/reference/sharpmush-help/pennfunc/#isint) +## ISREGEXP() +`isregexp(<string>)` + + This function returns 1 if `<string>` is a valid regular expression, and 0 if it is not. + + +### See Also +- [REGEXP](/reference/sharpmush-help/penntop/#regexp) +## ISWORD() +`isword(<string>)` + + This function returns 1 if every character in `<string>` is a letter, or 0, if any character isn't a letter. Case does not matter. + +## ITEMS() +`items(<list>, <delim>)` + + items() counts the number of items in a list using an arbitrary `<delim>`. Null items are counted, so: + +`items(X|X,|) => 2 (2 X items)` +`items(X||X,|) => 3 (2 X items and 1 null item)` +`items(X X,%b) => 2 (2 X items)` +`items(X%b%bX,%b) => 3 (2 X items and 1 null item)` +`items(,|) => 1 (a single null item)` + + Another way to think about this is that items() counts the number of times `<delim>` appears in `<list>`, and adds 1. + + +### See Also +- [words()](/reference/sharpmush-help/pennfunc/#words) +## ITEMIZE() +## ELIST() +`itemize(<list>[, <delim>[, <conjunction>[, <punctuation>]]])` +`elist(<list>[, <conjunction>[, <delim>[, <osep>[, <punctuation>]]]])` + + These functions take the elements of `<list>` (separated by `<delim>` or a space by default), and: + If there's just one, return it. + If there's two, return `<e1>` `<conjunction>` `<e2>` + If there's more than two, return `<e1>``<punc>` `<e2>``<punc>` ... `<conj>` `<en>` + + elist() uses `<osep>` after `<punc>`/`<conj>` instead of a space. + The default `<conjunction>` is "and", default punctuation is ",". + Examples: +``` +say itemize(eggs) * [itemize(eggs bacon)] +You say, "eggs * eggs and bacon" +say itemize(eggs bacon spam) +You say, "eggs, bacon, and spam" +say itemize(eggs bacon spam, ,&,;) +You say, "eggs; bacon; & spam" +``` +## ITER() +## PARSE() +`iter(<list>, <pattern>[, <delimiter>[, <output separator>]])` + + For each word in `<list>`, iter() evaluates `<pattern>` once, and returns a list of the results of those evaluations. Words in `<list>` are separated by `<delimiter>`, if given, and spaces if not. Words in the resulting list are separated by the given `<ouput separator>`, or a space if no output separator is given. + + Prior to each evaluation, every occurrence of the string "##" in `<pattern>` is replaced with the current word from `<list>`. However, because this replacement occurs before evaluation, it cannot be used well in nested iter()s, and should not be used on user input or untrusted `<list>`s, as the word will be evaluated. Instead, you can use the %iX substitution, or the itext() function. The substitution '%iL' refers to the outermost iter of the current expression, and is intended to replace ##. + + The string "#@" will be replaced with the position of the current word in `<list>`. Like "##", the replacement occurs before substitution. Use the inum() function for nested iter()s. + + If you nest iter()s, ## and #@ refer to the first/outermost iter(). The ilev() function can be used to get the current iter() nesting level. + + parse() is an alias for iter(). + + See [iter2](/reference/sharpmush-help/pennfunc/#iter2) for examples. + +### See Also +- [itext()](/reference/sharpmush-help/pennfunc/#itext) +- [inum()](/reference/sharpmush-help/pennfunc/#inum) +- [ilev()](/reference/sharpmush-help/pennfunc/#ilev) +- [ibreak()](/reference/sharpmush-help/pennfunc/#ibreak) +- [map()](/reference/sharpmush-help/pennfunc/#map) +- [@dolist](/reference/sharpmush-help/penncmd/#dolist) +## ITER2 + Examples: +``` +say iter(This is a test string., strlen(%i0)) +You say, "4 2 1 4 7" +``` + + > say iter(lnum(5), mul(add(%i0,#@),2)) + You say, "2 6 10 14 18" + + > say iter(lexits(here), name(%i0) (owned by [name(owner(%i0))])) + You say, "South (owned by Claudia) North (owned by Roy)" + + > &STRLEN_FN me=strlen(%0) + > say iter(This is a test string., u(STRLEN_FN, %i0)) + You say, "4 2 1 4 7" + + Since this example just evaluates another attribute for each element of the list, it can be done more efficiently using map(): + > say map(strlen_fun, This is a test string.) + + > say iter(lnum(3), %i0, ,%r) + You say, "0 + 1 + 2" + + An example of why using ## instead of %i0 can be insecure, and lead to unintended evaluation: + > say iter((1\,1),add##) + You say, "2" + > say iter((1\,1),add%i0) + You say, "add(1,1)" +## IBREAK() +`ibreak([<level>])` + + The ibreak() function stops an iter() from running at the end of the current loop. When used in nested iter()s, you can give a `<level>` to specify how many iter()s to break from. iter() will stop evaluating at the end of the current loop, and NOT immediately after ibreak() is called. + + Examples: +``` +say iter(1 2 3 4 5,switch(%i0,3,ibreak())Test %i0!) +You say, "Test 1! Test 2! Test 3!" +``` + + > say iter(1 2 3 4 5,switch(%i0,3,ibreak(),Test %i0!)) + You say, "Test 1! Test 2! " + + > say iter(a b c, iter(1 2 3, switch(%i0%i1, 2c, ibreak(2), %$0))) + You say, "1a 2a 3a 1b 2b 3b 1c " + + +### See Also +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [itext()](/reference/sharpmush-help/pennfunc/#itext) +- [inum()](/reference/sharpmush-help/pennfunc/#inum) +- [ilev()](/reference/sharpmush-help/pennfunc/#ilev) +## ILEV() +## ITEXT() +## INUM() +## %i +## %i0 +`ilev()` +`itext(<n>)` + %i`<n>` +`inum(<n>)` + + These functions return the equivilent of ## (itext) or #@ (inum) for iter() and @dolist, where an `<n>`=0 returns to the current iter or @dolist, `<n>`=1 refers to the iter()/@dolist which the current iter() or @dolist is nested in, etc. An `<n>` of "L" can be used to refer to the outermost iter()/@dolist. %i`<n>` is an alias for itext(`<n>`), where `<n>` can be from 0 to 9 (or "L"). + + ilev() returns the current nesting depth, or -1 when used outside an iter() or @dolist. Thus, itext(ilev()) will return the outermost ##, equivilent to %iL. + + See [itext2](/reference/sharpmush-help/pennfunc/#itext2) for examples. + +### See Also +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [ibreak()](/reference/sharpmush-help/pennfunc/#ibreak) +- [@dolist](/reference/sharpmush-help/penncmd/#dolist) +## ITEXT2 + + Examples: +``` +say iter(red blue green, iter(fish shoe, #@:##)) +You say, "1:red 1:red 2:blue 2:blue 3:green 3:green" +``` + + > say iter(red blue green, iter(fish shoe, inum(ilev()):[itext(1)])) + You say, "1:red 1:red 2:blue 2:blue 3:green 3:green" + + > say iter(red blue green,iter(fish shoe, inum(0):[itext(0)])) + You say, "1:fish 2:shoe 1:fish 2:shoe 1:fish 2:shoe" + + > say iter(red blue green,iter(fish shoe, %i1:%i0)) + You say, "red:fish red:shoe blue:fish blue:shoe green:fish green:shoe" + + > @dolist red blue green=say iter(fish shoe, %i1:%i0) + You say, "red:fish red:shoe" + You say, "blue:fish blue:shoe" + You say, "green:fish green:shoe" + + +### See Also +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [@dolist](/reference/sharpmush-help/penncmd/#dolist) +## IPADDR() +`ipaddr(<player|descriptor>)` + + Returns the IP address of the connected player or descriptor. This may be more reliable than get(`<player>`/lastip) if the player has multple connections from different locations, and the function is called with a descriptor argument. + + The caller can use the function on himself, but using on any other player requires privileged power such as Wizard, Royalty or SEE_ALL. + + +### See Also +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +- [hostname()](/reference/sharpmush-help/pennfunc/#hostname) +- [ports()](/reference/sharpmush-help/pennfunc/#ports) +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +## LAST() +`last(<list>[, <delimiter>])` + + Returns the last element of a list. Elements in `<list>` are separated by `<delimiter>`, if given, or by a space if not. + + +### See Also +- [first()](/reference/sharpmush-help/pennfunc/#first) +- [rest()](/reference/sharpmush-help/pennfunc/#rest) +- [before()](/reference/sharpmush-help/pennfunc/#before) +- [after()](/reference/sharpmush-help/pennfunc/#after) +## LATTR() +## LATTRP() +## REGLATTR() +## REGLATTRP() +`lattr(<object>[/<attribute pattern>][, <output separator>])` +`lattrp(<object>[/<attribute pattern>][, <output separator>])` +`reglattr(<object>[/<regexp>][, <output separator>])` +`reglattrp(<object>[/<regexp>][, <output separator>])` + + lattr() returns a list of all the attributes on `<object>` which you can see, and which match the wildcard `<attribute pattern>`. If no `<attribute pattern>` is given, it defaults to "*". Note that this does not include branches in attribute trees; you must use the "**" wildcard to include those. + + The resulting list will be separated by `<output separator>`, or a space if no separator is given. + + reglattr() returns attributes whose names match the regexp `<regexp>`. The match is not case-sensitive (as attribute names are always upper-case), and the "`" branch separator has no special meaning in the pattern. + + lattrp() and reglattrp() also include attributes inherited from parents. + + When returning large numbers of attributes, the results may be truncated due to buffer limits. In these cases, you can use nattr() and xattr() to retrieve the results in smaller pieces. + + +### See Also +- [nattr()](/reference/sharpmush-help/pennfunc/#nattr) +- [xattr()](/reference/sharpmush-help/pennfunc/#xattr) +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +- [examine](/reference/sharpmush-help/penncmd/#examine) +- [grep()](/reference/sharpmush-help/pennfunc/#grep) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## NATTR() +## NATTRP() +## ATTRCNT() +## ATTRPCNT() +## REGNATTR() +## REGNATTRP() +`nattr(<object>[/<attribute pattern>])` +`nattrp(<object>[/<attribute pattern>])` +`regnattr(<object>[/<regexp>])` +`regnattrp(<object>[/<regexp>])` + + nattr() returns the number of attributes on `<object>` that you can see which match the given `<attribute pattern>`. It is considerably faster than words(lattr()) and doesn't suffer from buffer length constraints. It's designed primarily for statistical purposes. `<attribute pattern>` defaults to "*", which does not include branches in attribute trees; use "**" if you need to count attribute trees. + + regnattr() matches attribute names against the regular expression `<regexp>`. + + nattrp() and regnattrp() also count matching attributes on the parent. + + attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively. + + +### See Also +- [lattr()](/reference/sharpmush-help/pennfunc/#lattr) +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +- [xattr()](/reference/sharpmush-help/pennfunc/#xattr) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## LCON() +`lcon(<object>[, <type>])` + + Returns a list of the dbrefs of objects which are located in `<object>`. + + You can get the complete contents of any object you may examine, regardless of whether or not objects are dark. You can get the partial contents (obeying DARK/LIGHT/etc.) of your current location or the enactor (%#). You CANNOT get the contents of anything else, regardless of whether or not you have objects in it. + + When used on exits, this function returns #-1. + + For compatability with other codebases, a `<type>` can be given to limit the results. Valid `<type>`s are: + player - equivalent to lplayers(`<object>`) + connect - equivalent to lvplayers(`<object>`) + thing (or object) - equivalent to lthings(`<object>`) + listen - return only listening objects + puppet - return only THINGs set PUPPET + + +### See Also +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [lplayers()](/reference/sharpmush-help/pennfunc/#lplayers) +- [lthings()](/reference/sharpmush-help/pennfunc/#lthings) +- [con()](/reference/sharpmush-help/pennfunc/#con) +- [next()](/reference/sharpmush-help/pennfunc/#next) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +## LCSTR() +## LCSTR2() +`lcstr(<string>)` +`lcstr2(<string>)` + + Returns `<string>` with all letters converted to lowercase. + + If the MUSH is compiled with ICU Unicode support, lcstr2() does the same thing except the returned string might be a different length, and ansi colors and other markup are stripped. + + Example: +``` +say lcstr(Foo BAR bAz) +You say, "foo bar baz" +``` + + +### See Also +- [capstr()](/reference/sharpmush-help/pennfunc/#capstr) +- [ucstr()](/reference/sharpmush-help/pennfunc/#ucstr) +## LDELETE() +`ldelete(<list>, <position(s)>[, <delimiter>[, <osep>]])` + + This function deletes the element(s) of `<list>` at the given `<position(s)>`. Elements of `<list>` are separated by `<delimiter>`, which defaults to a space. Null items are counted, as in 'items()'. Elements of `<position(s)>` must be numeric, and are always separated by a space, not by `<delimiter>`. Elements of the returned list are separated by `<osep>`, which defaults to the `<delimiter>`. + + If a `<position>` is negative, ldelete() counts backwards from the end of the list; a position of -1 deletes the last element, -2 the element before last, and so on. + + All position calculations are performed on the original list. That is, ldelete(a b c, -1 -1) will return "a b", not "a", and ldelete(a b c, -1 -2) returns "a", not "b". + + Examples: +``` +say ldelete(This is a long test string,4) +You say, "This is a test string" +say ldelete(lemon|orange|pear|apple,2 3,|) +You say, "lemon|apple" +say ldelete(foo bar baz boing,3,,%b~%b) +You say, "foo ~ bar ~ boing" +``` + + +### See Also +- [strdelete()](/reference/sharpmush-help/pennfunc/#strdelete) +- [remove()](/reference/sharpmush-help/pennfunc/#remove) +- [linsert()](/reference/sharpmush-help/pennfunc/#linsert) +## LEFT() +`left(<string>, <length>)` + + Returns the first `<length>` characters from `<string>`. + + +### See Also +- [right()](/reference/sharpmush-help/pennfunc/#right) +- [mid()](/reference/sharpmush-help/pennfunc/#mid) +- [ljust()](/reference/sharpmush-help/pennfunc/#ljust) +## NSLEMIT() +## LEMIT() +`lemit(<message>)` +`nslemit(<message>)` + + lemit() emits a message in the caller's outermost room, as per @lemit. + + nslemit() like @nslemit. + + +### See Also +- [@lemit](/reference/sharpmush-help/penncmd/#lemit) +- [remit()](/reference/sharpmush-help/pennfunc/#remit) +## LETQ() +`letq([<reg1>, <value1>[, ... , <regN>, <valueN>], <expr>)` + + letq() saves the current values of the given q-`<reg>`isters, sets them to new `<value>`s, evaluates `<expr>` and then restores the saved registers. It does not restore registers that are not listed. None of the values can see the updated contents of the registers -- they are only visible to `<expr>`. + + It returns the result of `<expr>`. + + Examples: +``` +think setr(A, 1):[letq(A, 2, %qA)]:%qA +1:2:1 +think setr(A, 1)[setr(B,1)]:[letq(A, 2, %qA[setr(B,2)])]:%qA%qB +11:22:12 +``` + + +### See Also +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [setr()](/reference/sharpmush-help/pennfunc/#setr) +- [unsetq()](/reference/sharpmush-help/pennfunc/#unsetq) +- [listq()](/reference/sharpmush-help/pennfunc/#listq) +- [localize()](/reference/sharpmush-help/pennfunc/#localize) +- [ulocal()](/reference/sharpmush-help/pennfunc/#ulocal) +- [r()](/reference/sharpmush-help/pennfunc/#r) +## LEXITS() +`lexits(<room>)` + + Returns a list of the dbrefs of exits in a room. + + You can get the complete exit list of any room you may examine, regardless of whether or not exits are dark. You can get the partial exit list (obeying DARK/LIGHT/etc.) of your current location or the enactor (%#). You CANNOT get the exit list of anything else, regardless of whether or not you have objects in it. + + +### See Also +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [exit()](/reference/sharpmush-help/pennfunc/#exit) +- [next()](/reference/sharpmush-help/pennfunc/#next) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## LJUST() +`ljust(<string>, <length>[, <fill>[, <truncate?>]])` + + This function returns `<string>`, padded with the string `<fill>` until it's `<length>` characters long. `<fill>` can be more than one character in length, and defaults to a single space. + + If `<string>` is longer than `<length>`, it will be returned unaltered, unless `<truncate?>` is true, in which case only the first `<length>` characters of `<string>` are returned. + + Examples: +``` +say ljust(foo,6) +You say, "foo " +``` + + > say %r0[ljust(foo,6,-)]7%r01234567 + You say, " + 0foo---7 + 01234567" + + > say ljust(foo,12,=+) + You say, "foo=+=+=+=+=" + + > say ljust(This is too long,9,,1) + You say, "This is t" + + +### See Also +- [align()](/reference/sharpmush-help/pennfunc/#align) +- [center()](/reference/sharpmush-help/pennfunc/#center) +- [rjust()](/reference/sharpmush-help/pennfunc/#rjust) +- [left()](/reference/sharpmush-help/pennfunc/#left) +## LINK() +`link(<object>, <destination>[, <preserve>])` + + This function links `<object>` to `<destination>`. While normally used on exits, it has all of the other capabilities of @link as well. It returns #-1 or 0 on failure, 1 on success. If the optional third argument is true, acts like @link/preserve. + + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [open()](/reference/sharpmush-help/pennfunc/#open) +## LIST() +`list(<option>[, <type>])` + + This is the function-equivilent of the @list command, and lists some useful information about the MUSH. `<option>` can be one of: + + motd : Returns the current @motd + wizmotd : Returns the current @motd/wizard. Wiz/Roy only. + downmotd : Returns the current @motd/down. Wiz/Roy only. + fullmotd : Returns the current @motd/full. Wiz/Roy only. + functions : Returns a list of all built-in functions and @functions. + commands : Returns a list of all built-in commands and @commands. + attribs : Returns all standard attributes. + locks : Returns the built-in lock types. Similar to llocks(). + flags : Returns all flags. Similar to lflags(). + powers : Returns all @powers. + + "commands"/"functions" return both built-in and local commands/functions by default. You can specify a `<type>` of either "builtin", "local" or "all" to limit this if you wish. + + +### See Also +- [@list](/reference/sharpmush-help/penncmd/#list) +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [lflags()](/reference/sharpmush-help/pennfunc/#lflags) +- [config()](/reference/sharpmush-help/pennfunc/#config) +- [functions()](/reference/sharpmush-help/pennfunc/#functions) +- [@listmotd](/reference/sharpmush-help/penncmd/#listmotd) +- [@motd](/reference/sharpmush-help/penncmd/#motd) +`llocks()` +## LIT() +`lit(<string>)` + + This function returns `<string>` literally - without even squishing spaces, and without evaluating *anything*. This can be useful for writing ASCII maps with spaces or whatever. + + It can be a bit tricky to get a literal string with spaces into an attrib, however, since spaces are usually squished in setting an attribute. This example illustrates how to make it work: + + > @va me=$test: think {[lit(near far)]} + Set. + > ex me/va + VA [#1]: $test: think {[lit(near far)]} + > test + near far + + Leaving out the {}'s will not work in the above. + + +### See Also +- [decompose()](/reference/sharpmush-help/pennfunc/#decompose) +## LMATH() +`lmath(<op>, <list>[, <delim>])` + + This function performs generic math operations on `<list>`, returning the result. Each element of the list is treated as one argument to an operation, so that lmath(`<op>`, 1 2 3) is equivalent to `<op>`(1, 2, 3). Using @function, one can easily write ladd, lsub, etc as per TinyMUSH. + + Supported `<op>`'s are: + add and band bor bxor dist2d dist3d div eq fdiv gt gte lt lte max mean median min modulo mul nand neq nor or remainder stddev sub xor + + Examples: +``` +think lmath(add, 1|2|3, |) +6 +``` + + > think lmath(max, 1 2 3) + 3 + + > &FUN_FACTORIAL me=lmath(mul,lnum(1,%0)) + > think u(fun_factorial,5) + 120 +## LN() +`ln(<number>)` + + Returns the natural log of `<number>`. This is equivilent to log(`<number>`, e). + + +### See Also +- [log()](/reference/sharpmush-help/pennfunc/#log) +## LNUM() +`lnum(<number>)` +`lnum(<start number>, <end number>[, <output separator>[, <step>]])` + + With one argument, lnum returns a list of numbers, from 0 to `<number - 1>`. For example, lnum(4) returns the list "0 1 2 3". This is useful for creating loops. + + With two arguments, the numbers range from the first to the second argument. For example, lnum(1,4) => 1 2 3 4 + + With three arguments, the output is separated by the separator given in the third argument. lnum(1,4,|) => 1|2|3|4 + + A fourth argument dictates the step. By default, the step is 1. + lnum(1,10,%b,2) -> 1 3 5 7 9 + lnum(0,10,%b,2) -> 0 2 4 6 8 10 + +## LOC() +`loc(<object>)` + + For things and players, loc() returns the dbref of the object which contains `<object>`. For rooms, it returns the drop-to, if one is set, or #-1 otherwise. For exits, it returns the destination (the source is an exits home()). This will be #-1 for unlinked exits, #-2 for variable exits, and #-3 for exits @linked to "home". + + You must be able to examine `<object>`, or be near it, for this function to work. A special case exists when `<object>` is a player: As long as `<object>` is not set UNFINDABLE, and you are allowed to use the @whereis command, you can get `<object>`'s location. + + You can also get the location of the enactor using the %L substitution, whether you are near to/can examine it or not. + + +### See Also +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [rloc()](/reference/sharpmush-help/pennfunc/#rloc) +- [home()](/reference/sharpmush-help/pennfunc/#home) +- [where()](/reference/sharpmush-help/pennfunc/#where) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [room()](/reference/sharpmush-help/pennfunc/#room) +- [@link](/reference/sharpmush-help/penncmd/#link) + UNFINDABLE, @whereis +## LOCALIZE() +`localize(<code>)` + + localize() saves the q-registers, evaluates its argument, and restores the registers afterwards. It has the same effect as ulocal(), but doesn't require setting the code into an attribute. + + Examples: +``` +say setr(0, Outside)-[setr(0, Inside)]-%q0 +You say, "Outside-Inside-Inside" +``` + + > &INSIDE me=setr(0,Inside) + > say setr(0, Outside)-[ulocal(INSIDE)]-%q0 + You say, "Outside-Inside-Outside" + + > say setr(0, Outside)-[localize(setr(0, Inside))]-%q0 + You say, "Outside-Inside-Outside" + + +### See Also +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [setr()](/reference/sharpmush-help/pennfunc/#setr) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [ulocal()](/reference/sharpmush-help/pennfunc/#ulocal) +- [uldefault()](/reference/sharpmush-help/pennfunc/#uldefault) +## LOCATE() +`locate(<looker>, <name>, <parameters>)` + + This function attempts to find an object called `<name>`, relative to the object `<looker>`. It's similar to the num() function, but you can be more specific about which type of object to find, and where to look for it. When attempting to match objects near to `<looker>` (anything but absolute, player name or "me" matches), you must control `<looker>`, have the See_All power or be nearby. + + `<parameters>` is a string of characters which control the type of the object to find, and where (relative to `<looker>`) to look for it. + + You can control the preferred types of the match with: + N - No type (this is the default) + E - Exits + L - Prefer an object whose Basic @lock `<looker>` passes + P - Players + R - Rooms + T - Things + F - Return #-1 if what's found is of a different type than the preferred one. + X - Never return #-2. Use the last dbref found if the match is ambiguous. + + If type(s) are given, locate() will attempt to find an object with one of the given types first. If none are found, it will attempt to find any type of object, unless 'F' is specified, in which case it will return #-1. + + See [locate2](/reference/sharpmush-help/pennfunc/#locate2). +## LOCATE2 + + You can control where to look with: + a - Absolute match (match `<name>` against any dbref) + c - Exits in the room `<looker>` + e - Exits in `<looker>`'s location + h - If `<name>` is "here", return `<looker>`'s location + i - Match `<name>` against the names of objects in `<looker>`'s inventory + l - Match `<name>` against the name of `<looker>`'s location + m - If `<name>` is "me", return `<looker>`'s dbref + n - Match `<name>` against the names of objects in `<looker>`'s location + p - If `<name>` begins with a *, match the rest against player names + z - English-style matching (my 2nd book) of `<name>` (see [matching](/reference/sharpmush-help/penntop/#matching)) + * - All of the above (try a complete match). Default when no match parameters are given. + y - Match `<name>` against player names whether it begins with a * or not + x - Only match objects with the exact name `<name>`, no partial matches + s - Only match objects which `<looker>` controls. You must control `<looker>` or have the See_All power. + + Just string all the parameters together. Spaces are ignored, so you can use spaces between paramaters for clarity if you wish. + + See [locate3](/reference/sharpmush-help/pennfunc/#locate3) for examples. + +### See Also +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [pmatch()](/reference/sharpmush-help/pennfunc/#pmatch) +- [room()](/reference/sharpmush-help/pennfunc/#room) +- [where()](/reference/sharpmush-help/pennfunc/#where) +- [rloc()](/reference/sharpmush-help/pennfunc/#rloc) +- [findable()](/reference/sharpmush-help/pennfunc/#findable) +## LOCATE3 + + Examples: +``` +Find the dbref of the player whose name matches %0, or %#'s dbref if %0 is "me". +think locate(%#, %0, PFym) +'PF' matches objects of type 'player' and nothing else, 'm' checks for the string "me", and 'y' matches the names of players. +``` + + Find the dbref of an object near %# called %0, including %# himself and his location. Prefer players or things, but accept rooms or exits if no players or things are found. + > think locate(%#, %0, PThmlni) + This prefers 'P'layers or 'T'hings, and compares %0 against the strings "here" and "me", and the names of %#'s location, his neighbours, and his inventory. +## LOCK() +`lock(<object>[/<locktype>][, <new value>])` + + lock() returns the text string equivalent of the @lock on `<object>`. `<locktype>` can be any valid switch for @lock ("Enter", "user:foo", etc) and defaults to "Basic". You must be able to examine the lock. + + If a `<new value>` is given, lock() attempts to change the lock as @lock would first. You must control the object. + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [elock()](/reference/sharpmush-help/pennfunc/#elock) +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +- [llocks()](/reference/sharpmush-help/pennfunc/#llocks) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +- [lockfilter()](/reference/sharpmush-help/pennfunc/#lockfilter) +## LLOCKS() +## LOCKS() +`llocks([<object>])` +`locks(<object>)` + +`llocks() and locks() both list @locks set on <object>, including user-defined locks (prefixed with USER:)` + + If no object is given, llocks() returns all the predefined lock types available. + + Example: +``` +@lock me==me +@lock/use me==me +@lock/user:itsme me==me +th llocks(me) +Basic USER:ITSME Use +``` + + +### See Also +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +## LOCKFILTER() +`lockfilter(<key>, <dbrefs>[, <delim>])` + + lockfilter() goes through `<dbrefs>` and tests them all against the lock `<key>`, returning a list of all dbrefs that pass the `<key>`. + + `<key>` is evaluated from the caller's perspective. + + This is equivilent to filter(#lambda/testlock(`<key>`, %%0), `<dbrefs>`) but much more efficient, as the lock `<key>` is only parsed/compiled once. + + `<delim>` defaults to a space, and is the delimiter of `<dbrefs>` and the list returned by lockfilter(). + + Examples: +``` +Get all male players with a name starting with 'W'. +think iter(lockfilter(NAME^W*&SEX:M*,lwho()),name(%i0)) +Walker WalkerBot Wilco +``` + + List all wizroys online: + > think iter(lockfilter(FLAG^WIZARD|FLAG^ROYALTY,lwho()),name(%i0)) + Sketch Viila Tanaku Raevnos Zebranky Cheetah Walker + + List all players with an IC age > 20. + > think lockfilter(age:>20,lwho()) + #123 #456 #789 + Note: You can escape the first character of `<key>` using double back slashes, for example, if you are checking for an attribute named +FOO to have the value of BAR on all connected players: + > think map(#apply/name,lockfilter(\\+FOO:BAR,lwho())) + Mike Walker Qon + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [elock()](/reference/sharpmush-help/pennfunc/#elock) +- [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys) +- [filter()](/reference/sharpmush-help/pennfunc/#filter) +- [testlock()](/reference/sharpmush-help/pennfunc/#testlock) +## LOCKFLAGS() +`lockflags(<object>[/<locktype>])` +`lockflags()` + + If an `<object>` is given, lockflags() returns a string consisting of the one-character abbreviations for all the lock flags on `<object>`'s `<locktype>` lock, or Basic lock if no locktype is given. You must be able to examine the lock. + + Given no arguments, this function returns a string consisting of all the flag letters the server knows. + + +### See Also +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [llocks()](/reference/sharpmush-help/pennfunc/#llocks) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +## LLOCKFLAGS() +`llockflags(<object>[/<locktype>])` +`llockflags()` + + If an `<object>` is given, llockflags() returns a space-separated list of the lock flags on `<object>`'s `<locktype>` lock, or Basic lock if no locktype is given. You must be able to examine the lock. + + Given no arguments, this function returns a space-separated list of all the names of all lock flags known to the server. + + +### See Also +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [llocks()](/reference/sharpmush-help/pennfunc/#llocks) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +## LOCKOWNER() +`lockowner(<object>[/<locktype>])` + + This function returns the dbref of the player who owns the `<locktype>` lock on `<object>`, or the Basic lock if no `<locktype>` is given. You must be able to examine the lock to use this function. + + +### See Also +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lset()](/reference/sharpmush-help/pennfunc/#lset) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [llocks()](/reference/sharpmush-help/pennfunc/#llocks) +## LSET() +`lset(<object>/<locktype>,[!]<flag>)` + + This functions sets or clears flags on locks. + + See [@lset](/reference/sharpmush-help/penncmd/#lset) for more information on what flags are available. + + +### See Also +- [lockflags()](/reference/sharpmush-help/pennfunc/#lockflags) +- [llockflags()](/reference/sharpmush-help/pennfunc/#llockflags) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +## LOG() +`log(<number>[, <base>])` + + Returns the logarithm (base 10, or the given base) of `<number>`. `<base>` can be a floating-point number, or 'e' for the natural logarithm. + + +### See Also +- [ln()](/reference/sharpmush-help/pennfunc/#ln) +## LPARENT() +`lparent(<object>)` + + This function returns a list consisting of `<object>`'s dbref (as per num()), the dbref of its parent, grandparent, greatgrandparent, etc. The list will not, however, show parents of objects which the player is not privileged to examine. Ancestor objects are not included. + + +### See Also +- [parent()](/reference/sharpmush-help/pennfunc/#parent) +- [children()](/reference/sharpmush-help/pennfunc/#children) +- [PARENTS](/reference/sharpmush-help/penntop/#parents) +- [ANCESTORS](/reference/sharpmush-help/penntop/#ancestors) +## LPLAYERS() +`lplayers(<object>)` + + This function returns the dbrefs of all players, connected or not, in `<object>`. DARK wizards aren't listed to mortals or those without the see_all power. You must be in `<object>` or control it to use this function. + + +### See Also +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [lthings()](/reference/sharpmush-help/pennfunc/#lthings) +## LTHINGS() +`lthings(<object>)` + + This function returns the dbrefs of all things, dark or not, in `<object>`. You must be in `<object>` or control it to use this function. + + +### See Also +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +## LPOS() +`lpos(<string>, <character>)` + + This function returns a list of the positions where `<character>` appears in `<string>`, with the first character of the string being 0. Note that this differs from the pos() function, but is consistent with other string functions like mid() and strdelete(). + + If `<character>` is a null argument, space is used. If `<character>` is not found anywhere in `<string>`, an empty list is returned. + + Example: +``` +say lpos(a-bc-def-g, -) +You say, "1 4 8" +``` + + +### See Also +- [pos()](/reference/sharpmush-help/pennfunc/#pos) +- [member()](/reference/sharpmush-help/pennfunc/#member) +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [wordpos()](/reference/sharpmush-help/pennfunc/#wordpos) +## LSEARCH() +## NLSEARCH() +## SEARCH() +## NSEARCH() +## LSEARCHR() +## CHILDREN() +## NCHILDREN() +`lsearch(<player>[, ... , <classN>, <restrictionN>])` +`nlsearch(<player>[, ... , <classN>, <restrictionN>])` +`lsearchr(<player>[, ... , <classN>, <restrictionN>])` +`children(<object>)` +`nchildren(<object>)` + + This function is similar to the @search command, except it returns just a list of dbref numbers. The function must have at least three arguments. You can specify "all" or `<player>` for the `<player>` field; for mortals, only objects they can examine are included. If you do not want to restrict something, use "none" for `<class>` and `<restriction>`. + + The possible `<class>`es and `<restriction>`s are the same as those accepted by @search. lsearch() can accept multiple class/restriction pairs, and applies them in a boolean "AND" fashion, returning only dbrefs that fulfill all restrictions. See [@search](/reference/sharpmush-help/penncmd/#search) for information about them. + + children() is exactly the same as lsearch([me|all](/reference/sharpmush-help/pennconf/#meall), parent, `<object>`), using "all" for See_All/Search players and "me" for others. + + nlsearch(...) and nchildren(...) return the count of results that would be returned by lsearch() or children() with the same args. + + See [lsearch2](/reference/sharpmush-help/pennfunc/#lsearch2). +## LSEARCH2 +## SEARCH2 + + If `<class>` is one of the eval classes (EVAL, EEXITS, EROOMS, ETHINGS or EPLAYERS), note that any brackets, percent signs, or other special characters should be escaped, as the code in `<restriction>` will be evaluated twice - once as an argument to lsearch(), and then again for each object looked at in the search. Before the per-object evaluation, the string "##" is replaced with the object dbref. + + lsearch() is free unless it includes either an eval-class search or an elock search that contains an eval or indirect lock. Otherwise, it costs find_cost pennies to perform the lsearch. + + lsearchr() is like an lsearch() run through revwords(). Results are returned from highest dbref to lowest. search() is an alias for lsearch(). + + See [lsearch3](/reference/sharpmush-help/pennfunc/#lsearch3) for examples. + + +### See Also +- [@search](/reference/sharpmush-help/penncmd/#search) +- [@find](/reference/sharpmush-help/penncmd/#find) +- [lparent()](/reference/sharpmush-help/pennfunc/#lparent) +- [stats()](/reference/sharpmush-help/pennfunc/#stats) +## LSEARCH3 +## SEARCH3 + lsearch() Examples: + + lsearch(all, flags, Wc) <-- lists all connected wizards. + lsearch(me, type, room) <-- lists all rooms owned by me. + lsearch(me, type, room, flag, W) <-- lists Wizard rooms owned by me. + lsearch(me, type, room, 100, 200) <-- same, but only w/db# 100-200 + lsearch(all, eplayer, \[eq(money(##),100)\]) <-- lists all players with 100 coins. + lsearch(all, type, player, elock, (FLAG^WIZARD|FLAG^ROYALTY)&!FLAG^IC) ^-- list all wiz and roy players that are not IC. + lsearch(all, type, player, elock, sex:m*) <- lists all players with an @sex beginning with 'm' + lsearch(me, elock, !desc:*) <-- lists all objects you own that don't have an @desc set +## LSTATS() +## STATS() +`lstats([<player>])` + + This function returns the breakdown of objects in the database, in a format similar to "@stats". If `<player>` is "all" (the default), a breakdown is done for the entire database. Otherwise, the breakdown is returned for that particular player. + + Only wizards and those with the Search power can LSTATS() other players. The list returned is in the format: + `<Total objects>` `<Rooms>` `<Exits>` `<Things>` `<Players>` `<Garbage>` + + stats() is an alias for lstats(). + +### See Also +- [nsearch()](/reference/sharpmush-help/pennfunc/#nsearch) +## LT() +`lt(<number1>, <number2>[, ... , <numberN>])` + + Takes two or more numbers, and returns 1 if and only if each number is less than the number after it, and 0 otherwise. + + Examples: +``` +th lt(1,2) +1 +th lt(1,2,3) +1 +th lt(1,3,2) +0 +``` + + +### See Also +- [lte()](/reference/sharpmush-help/pennfunc/#lte) +- [gt()](/reference/sharpmush-help/pennfunc/#gt) +- [gte()](/reference/sharpmush-help/pennfunc/#gte) +- [lnum()](/reference/sharpmush-help/pennfunc/#lnum) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## LTE() +`lte(<number1>, <number2>[, ... , <numberN>])` + + Takes two or more numbers, and returns 1 if and only if each number is less than or equal to the number after it, and 0 otherwise. + + +### See Also +- [lt()](/reference/sharpmush-help/pennfunc/#lt) +- [gt()](/reference/sharpmush-help/pennfunc/#gt) +- [gte()](/reference/sharpmush-help/pennfunc/#gte) +- [lnum()](/reference/sharpmush-help/pennfunc/#lnum) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## LVCON() +`lvcon(<object>)` + + This function returns the dbrefs of all objects that are inside `<object>` and visible (non-dark). You must be in `<object>` or control it to use this function. + + +### See Also +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## LVEXITS() +`lvexits(<room>)` + + This function returns the dbrefs of all visible (non-dark) exits from `<room>`. You must be in the room or control it to use this function. + + +### See Also +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +## LVPLAYERS() +`lvplayers(<object>)` + + This function returns the dbrefs of all connected and non-dark players in an object. You must be in the object or control it to use this function. + + +### See Also +- [lplayers()](/reference/sharpmush-help/pennfunc/#lplayers) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## LVTHINGS() +`lvthings(<object>)` + + This function returns the dbrefs of all non-dark things inside an object. You must be in the object or control it to use this function. + + +### See Also +- [lthings()](/reference/sharpmush-help/pennfunc/#lthings) +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## LWHO() +## LWHOID() +`lwho([<viewer>[, <status>]])` +`lwhoid([<viewer>[, <status>]])` + + lwho() returns a list of the dbref numbers for all currently-connected players. When mortals use this function, the dbref numbers of hidden wizards or royalty do NOT appear on the dbref list. + + If a `<viewer>` is given, and used by a See_All object, lwho() returns the output of lwho() from `<viewer>`'s point of view. + + `<status>` can be used to include "#-1" dbrefs for unconnected ports, and must be one of "all", "online" (the default) or "offline". It is primarily useful when using a `<status>` with lports(), to make the dbrefs and ports match up. Only See_All players can see offline dbrefs. + + lwhoid() returns a list of objid's instead. + + +### See Also +- [mwho()](/reference/sharpmush-help/pennfunc/#mwho) +- [nwho()](/reference/sharpmush-help/pennfunc/#nwho) +- [xwho()](/reference/sharpmush-help/pennfunc/#xwho) +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +## MAP() +`map([<object>/]<attribute>, <list>[, <delim>[, <osep>]])` + + This function works much like ITER(). The given `<attribute>` is evaluated once for each element of `<list>`, and the results of the evaluations are returned. For each evaluation, the current list element is passed to the attribute as %0, and its position in the list as %1. Elements of `<list>` are separated by `<delim>`, or a space if none is given, and the results are returned separated by `<osep>`, if given, or the delimiter otherwise. + + This is roughly equivilent to, though slightly more efficient than: +`iter(<list>, ulambda(<object>/<attribute>, %i0, inum(0)), <delim>, <osep>)` + + Examples: +``` +×_two me=mul(%0,2) +``` + + > say map(times_two, 5 4 3 2 1) + You say, "10 8 6 4 2" + + > say map(times_two,1;2;3;4;5,;) + You say, "2;4;6;8;10" + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [@dolist](/reference/sharpmush-help/penncmd/#dolist) +## ELEMENT() +## MATCH() +## MATCHALL() +`match(<list>, <pattern>[, <delimiter>])` +`matchall(<list>, <pattern>[, <delimiter>[, <output separator>]])` + + match() returns the index of the first element of `<list>` which matches the wildcard pattern `<pattern>`. The first word has an index of 1. If no matches are found, 0 is returned. element() is an alias for match(). + + matchall() is similar, but returns the indexes of all matching elements. If no elements match, an empty string is returned. + + In both cases, elements of `<list>` are separated by `<delimiter>`, if it's given, or a space otherwise. The results of matchall() are separated by `<ouput separator>`, if given, and `<delimiter>` if not. + + To get the matching elements, instead of the indexes of where they appear in the list, use grab()/graball(). To see if a single string matches a wildcard pattern, use strmatch(). + + See [match2](/reference/sharpmush-help/pennfunc/#match2) for examples. + +### See Also +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +- [strmatch()](/reference/sharpmush-help/pennfunc/#strmatch) +- [member()](/reference/sharpmush-help/pennfunc/#member) +- [reglmatch()](/reference/sharpmush-help/pennfunc/#reglmatch) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## MATCH2 + Examples: +``` +say match(I am testing a test, test*) +You say, "3" +``` + + > say matchall(I am testing a test, test*) + You say, "3 5" + + > say match(foo bar baz boing, sprocket) + You say, "0" + + >say matchall(foo bar baz boing, sprocket) + You say, "" +## REGLMATCH() +## REGLMATCHI() +## REGLMATCHALL() +## REGLMATCHALLI() +`reglmatch(<list>, <regexp>[, <delimiter>])` +`reglmatchi(<list>, <regexp>[, <delimiter>])` +`reglmatchall(<list>, <regexp>[, <delimiter>[, <output separator>]])` +`reglmatchalli(<list>, <regexp>[, <delimiter>[, <output separator>]])` + + These functions are the regexp versions of match() and matchall(). reglmatch() returns the position of the first element in `<list>` which matches the regular expression `<regexp>`. reglmatchi() does the same thing, but case-insensitively. + + reglmatchall() returns the positions of all elements in `<list>` which match `<regexp>`. reglmatchalli() is case-insensitive. + + In all cases, the elements of `<list>` are separated by `<delimiter>`, which defaults to a space. The elements outputted by reglmatchall() are separated by `<output separator>`, if one is given, or by `<delimiter>` if not. + + See [reglmatch2](/reference/sharpmush-help/pennfunc/#reglmatch2) for examples. + +### See Also +- [regmatch()](/reference/sharpmush-help/pennfunc/#regmatch) +- [regrab()](/reference/sharpmush-help/pennfunc/#regrab) +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [REGEXP SYNTAX](/reference/sharpmush-help/penntop/#regexp-syntax) +## REGLMATCH2 + Examples: +``` + + > say reglmatch(I am testing a test, test) + You say, "3" + + > say reglmatch(I am testing a test, test$) + You say, "5" + + > say reglmatchall(I am testing a test, test, , |) + You say, "3|5" +``` +## MAX() +`max(<number1>, <number2>[, ... , <numberN>])` + + This function returns the largest number in its list of arguments. It can take any number of arguments. + + +### See Also +- [min()](/reference/sharpmush-help/pennfunc/#min) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +- [bound()](/reference/sharpmush-help/pennfunc/#bound) +- [alphamax()](/reference/sharpmush-help/pennfunc/#alphamax) +## AVG() +## MEAN() +`mean(<number1>, <number2>[, ... , <numberN>])` + + Returns the mean (arithmetic average) of its arguments. + + avg() is an alias for mean(), for Rhost compatibility. + + +### See Also +- [median()](/reference/sharpmush-help/pennfunc/#median) +- [stddev()](/reference/sharpmush-help/pennfunc/#stddev) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## MEDIAN() +`median(<number>, <number>[, ... , <numberN>)` + + Returns the median (the middlemost numerically) of its arguments. + + +### See Also +- [mean()](/reference/sharpmush-help/pennfunc/#mean) +- [stddev()](/reference/sharpmush-help/pennfunc/#stddev) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## MEMBER() +`member(<list>, <word>[, <delimiter>])` + + member() returns the position where `<word>` first occurs in `<list>`. If `<word>` is not present in `<list>`, it returns 0. Elements of `<list>` are `<delimiter>`-separated, or space-separated if no `<delimiter>` is given. + + member() is case-sensitive, and does not perform wildcard matching. If you need to do a wildcard match, use match(). To compare two strings (instead of a word and list elements), consider comp(). + + +### See Also +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [grab()](/reference/sharpmush-help/pennfunc/#grab) +- [comp()](/reference/sharpmush-help/pennfunc/#comp) +- [strmatch()](/reference/sharpmush-help/pennfunc/#strmatch) +## MERGE() +`merge(<string1>, <string2>, <characters>)` + + This function merges `<string1>` and `<string2>`, depending on `<characters>`. If a character in `<string1>` is the same as one in `<characters>`, it is replaced by the character in the corresponding position in `<string2>`. The two strings must be of the same length. + + Example: +``` +say merge(AB--EF,abcdef,-) +You say, "ABcdEF" +``` + + Spaces need to be treated specially. An empty argument is considered to equal a space, for `<characters>`. + + Example: +``` +say merge(AB[space(2)]EF,abcdef,) +You say, "ABcdEF" +``` + + +### See Also +- [splice()](/reference/sharpmush-help/pennfunc/#splice) +- [tr()](/reference/sharpmush-help/pennfunc/#tr) +## MESSAGE() +`message(<recipients>, <message>, [<object>/]<attribute>[, <arg0>[, ... , <arg9>][, <switches>]])` + + message() is the function form of @message/silent, and sends a message, formatted through an attribute, to a list of objects. See [@message](/reference/sharpmush-help/penncmd/#message) for more information. + + `<switches>` is a space-separated list of one or more of "nospoof", "spoof", "oemit" and "remit", and makes message() behaviour as per @message/`<switches>`. For backwards-compatability reasons, all ten `<arg>` arguments must be given (even if empty) to use `<switches>`. + + Examples: +``` +&formatter #123 +think message(me, Default> foo bar baz, #123/formatter, foo bar baz) +Foo Bar Baz +&formatter #123=Formatted> [iter(%0,capstr(%i0))] +think message(me, Default> foo bar baz, #123/formatter, foo bar baz) +Formatted> Foo Bar Baz +``` + + > think message(here, default, #123/formatter, backwards compatability is annoying sometimes,,,,,,,,,,remit) + Formatted> Backwards Compatability Is Annoying Sometimes + + +### See Also +- [@message](/reference/sharpmush-help/penncmd/#message) +- [oemit()](/reference/sharpmush-help/pennfunc/#oemit) +- [remit()](/reference/sharpmush-help/pennfunc/#remit) +- [speak()](/reference/sharpmush-help/pennfunc/#speak) +## MID() +`mid(<string>, <first>, <length>)` + + mid() returns `<length>` characters from `<string>`, starting from the `<first>` character. If `<length>` is positive, it counts forwards from the `<first>` character; for negative `<length>`s, it counts backwards. Note that the first character in `<string>` is numbered 0, not 1. + + Examples: +``` +say mid(testing, 2, 2) +You say, "st" +say mid(testing, 2, -2) +You say, "es" +``` + + +### See Also +- [left()](/reference/sharpmush-help/pennfunc/#left) +- [right()](/reference/sharpmush-help/pennfunc/#right) +- [strdelete()](/reference/sharpmush-help/pennfunc/#strdelete) +## MIN() +`min(<number1>, <number2>[, ... , <numberN>])` + + This function returns the smallest number in its list of arguments. It can take any number of arguments. + + +### See Also +- [max()](/reference/sharpmush-help/pennfunc/#max) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +- [bound()](/reference/sharpmush-help/pennfunc/#bound) +- [alphamin()](/reference/sharpmush-help/pennfunc/#alphamin) +## MIX() +`mix([<object>/]<attribute>, <list1>, <list2>[, ... , <list30>, <delim>])` + + This function is similar to MAP(), except that it takes the elements of up to 30 lists, one by one, and passes them to the user-defined function as %0, %1, up to %9, respectively, for elements of `<list1>` to `<list30>`. Use v() to access elements 10 or higher. If the lists are of different sizes, the shorter ones are padded with empty elements. `<delim>` is used to separate elements; if it is not specified, it defaults to a space. If using more than 2 lists, the last argument must be a delimiter. + + See [mix2](/reference/sharpmush-help/pennfunc/#mix2) for examples. +## MIX2 + Examples of mix(): + + > &add_nums me=add(%0, %1) + > say mix(add_nums,1 2 3 4 5, 2 4 6 8 10) + You say, "3 6 9 12 15" + + > &lengths me=strlen(%0) and [strlen(%1)]. + > say mix(lengths, some random, words) + You say, "4 and 5. 6 and 0." + + > &add_nums me=lmath(add, %0 %1 %2) + > say mix(add_nums, 1:2:3, 4:5:6, 7:8:9, :) + You say, "12:15:18" + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [map()](/reference/sharpmush-help/pennfunc/#map) +- [step()](/reference/sharpmush-help/pennfunc/#step) +## MOD() +## MODULO() +## MODULUS() +## REMAINDER() +`modulo(<number>, <number>[, ..., <numberN>])` +`remainder(<number>, <number>[, ..., <numberN>])` + + remainder() returns the remainder of the integer division of the first number by the second (and subsequent) number(s) (ie, the remainder from calling div() with the same arguments). + + modulo() returns the modulo of the given numbers (from calling floordiv() with the same arguments). + + For positive numbers, these are the same, but they may be different for negative numbers: + + modulo(13,4) ==> 1 and remainder(13,4) ==> 1 + modulo(-13,4) ==> 3 but remainder(-13,4) ==> -1 + modulo(13,-4) ==> -3 but remainder(13,-4) ==> 1 + modulo(-13,-4) ==> -1 and remainder(-13,-4) ==> -1 + + remainder()s result always has the same sign as the first argument. modulo()s result always has the same sign as the second argument. + + mod() and modulus() are aliases for modulo(). + + +### See Also +- [div()](/reference/sharpmush-help/pennfunc/#div) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## MONEY() +`money(<integer>)` +`money(<object>)` + + If given an integer, money() returns the appropriate name (either singular or plural) for that amount of money, as set in the money_singular and money_plural @config options. + + Otherwise, it returns the amount of money `<object>` has. If `<object>` has the no_pay power, the value of the 'max_pennies' @config option is returned. `<object>` must have the power itself, rather than inheriting it from its owner, in this case. + + Examples: +``` +say money(Javelin) +You say, "150" +``` + + > say money(1) + You say, "Penny" + + > say money(2) + You say, "Pennies" + + > &counter CvC=$count *: @say %0 [money(%0)]. Ah.. ah.. ah. + > count 2 + Count von Count says, "2 Pennies. Ah.. ah.. ah." + + +### See Also +- [score](/reference/sharpmush-help/penncmd/#score) +## MTIME() +## MSECS() +`mtime(<object>[, <utc?>])` +`msecs(<object>)` + + mtime() returns the date and time that one of `<object>`'s attributes or locks was last added, deleted, or modified. The time returned is in the server's local timezone, unless `<utc?>` is true, in which case the time is in the UTC timezone. + + msecs() returns the time as the number of seconds since the epoch. + + Only things, rooms, and exits have modification times. You must be able to examine an object to see its modification time. + + +### See Also +- [ctime()](/reference/sharpmush-help/pennfunc/#ctime) +- [time()](/reference/sharpmush-help/pennfunc/#time) +- [secs()](/reference/sharpmush-help/pennfunc/#secs) +- [convtime()](/reference/sharpmush-help/pennfunc/#convtime) +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +## MUDNAME() +## MUDURL() +`mudname()` +`mudurl()` + + These functions return the name of the MUSH and the MUSH's website address, as set in the 'mud_name' and 'mud_url' @config options. + + Example: +``` +say mudname() +You say, "TestMUSH" +say mudurl() +You say, "http://www.testmush.com" +``` + + +### See Also +- [config()](/reference/sharpmush-help/pennfunc/#config) +## MUL() +`mul(<number1>, <number2>[, ... , <numberN>])` + + Returns the product of some numbers. + + +### See Also +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +- [div()](/reference/sharpmush-help/pennfunc/#div) +- [fdiv()](/reference/sharpmush-help/pennfunc/#fdiv) +## MUNGE() +`munge([<object>/]<attribute>, <list1>, <list2>[, <delimiter>[, <osep>]])` + + This function takes two lists of equal length. It passes the entirety of `<list1>` to the user-defined function as %0, and the delimiter as %1. Then, this resulting list is matched with elements in `<list 2>`, and the rearranged `<list2>` is returned. + + This is useful for doing things like sorting a list, and then returning the corresponding elements in the other list. If a resulting element from the user-defined function doesn't match an element in the original `<list1>`, a corresponding element from `<list2>` does not appear in the final result. The elements are matched using an exact, case-sensitive comparision. + + `<delimiter>` defaults to a space, and `<osep>` defaults to `<delimiter>`. + + See [munge2](/reference/sharpmush-help/pennfunc/#munge2) for examples. +## MUNGE2 + For example: Consider attribute PLACES, which contains "Fort Benden Ista", and another attribute DBREFS contains the dbrefs of the main JUMP_OK location of these areas, "#20 #9000 #5000". We want to return a list of dbrefs, corresponding to the names of the places sorted alphabetically. The places sorted this way would be "Benden Fort Ista", so we want the final list to be "#9000 #20 #5000". The functions, using munge(), are simple: + + > &sort me=sort(%0) + > say munge(sort, v(places), v(dbrefs)) + You say, "#9000 #20 #5000" + + See [munge3](/reference/sharpmush-help/pennfunc/#munge3) for another example. +## MUNGE3 + Another common task that munge() is well suited for is sorting a list of dbrefs of players by order of connection. This example uses #apply to avoid the need for the sort attribute, and also unlike the other example, it builds the list to sort on out of the list to return. + + > &faction_members me=#3 #12 #234 + > say munge(#apply/sort, map(#apply/conn, v(faction_members)), v(faction_members)) + You say, "#12 #234 #3" + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +## MWHO() +## MWHOID() +`mwho()` +`mwhoid()` + + mwho() returns a list of the dbref numbers for all current-connected, non-hidden players. It's exactly the same as lwho() used by a mortal, and is suitable for use on privileged global objects who need an unprivileged who-list. In some cases, lwho(`<viewer>`) may be preferable to mwho(), as it includes hidden players for `<viewer>`s who can see them. + + mwhoid() returns a list of objids instead. + + +### See Also +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [nwho()](/reference/sharpmush-help/pennfunc/#nwho) +## ALIAS() +## FULLALIAS() +`alias(<object>[, <new alias>])` +`fullalias(<object>)` + + alias() returns the first of `<object>`'s aliases. fullalias() returns all the aliases set for `<object>`. Note that, while any object can have an alias set, they are only meaningful for players and exits. + + With two arguments, alias() attempts to change the alias for `<object>` to `<new alias>`, as per @alias. + + Examples: +``` +ex *Noltar/ALIAS +ALIAS [#7$v]: $;No;Nol;Noli;Nolt +say alias(*Noltar) +You say, "$" +say fullalias(*Noltar) +You say, "$;No;Nol;Noli;Nolt" +``` + + +### See Also +- [fullname()](/reference/sharpmush-help/pennfunc/#fullname) +## NAME() +`name(<object>[, <new name>])` + + name() returns the name of object `<object>`. For exits, name() returns only the displayed name of the exit. + + With two arguments, name() attempts to rename `<object>` to `<new name>`, as per @name. + + +### See Also +- [fullname()](/reference/sharpmush-help/pennfunc/#fullname) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +- [alias()](/reference/sharpmush-help/pennfunc/#alias) +- [moniker()](/reference/sharpmush-help/pennfunc/#moniker) +## MONIKER() +## CNAME() +`moniker(<object>)` + + Returns `<object>`'s accented name, with the color template from its @moniker applied. moniker() always returns the colored name, even if monikers are disabled via @config. + + +### See Also +- [MONIKERS](/reference/sharpmush-help/penntop/#monikers) +- [@moniker](/reference/sharpmush-help/penncmd/#moniker) +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [MONIKER](/reference/sharpmush-help/pennconf/#moniker) +- [iname()](/reference/sharpmush-help/pennfunc/#iname) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +## NAMELIST() +`namelist(<player-list>[, [<object>/]<attribute>])` + + namelist() takes a list of players of the form used by the page command and returns a corresponding list of dbrefs. Invalid and ambiguous names return the dbrefs #-1 and #-2, respectively. + + If an `<object>`/`<attribute>` is given, the specified attribute will be called once for each invalid name, with the name as %0 and the dbref returned (#-1 for an unmatched name, #-2 for an ambiguous one) as %1. + + Example: +``` +&test me=pemit(%#,Bad name "%0") +say namelist(#1 Javelin "ringo spar" bogus, test) +Bad name "bogus" +You say, "#1 #7 #56 #-1" +``` + + +### See Also +- [namegrab()](/reference/sharpmush-help/pennfunc/#namegrab) +- [name()](/reference/sharpmush-help/pennfunc/#name) +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [pmatch()](/reference/sharpmush-help/pennfunc/#pmatch) +## NAMEGRAB() +## NAMEGRABALL() +`namegrab(<dbref list>, <name>)` +`namegraball(<dbref list>, <name>)` + + The namegrab() function returns the first dbref in the list that would match `<name>` as if you were checking num() or locate(). An exact match has priority over partial matches. + + namegraball() returns all dbrefs whose names would be matched by `<name>`. + + Examples: #0 = Room Zero, #1 = One, #2 = Master Room + > say namegrab(#0 #1 #2,room) + You say, "#0" + > say namegrab(#0 #1 #2,master room) + You say, "#2" + > say namegraball(#0 #1 #2,room) + You say, "#0 #2" + + +### See Also +- [namelist()](/reference/sharpmush-help/pennfunc/#namelist) +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +## NAND() +## NCAND() +`nand(<boolean1>[, ... , <booleanN>])` +`ncand(<boolean1>[, ... , <booleanN>])` + + These functions return 1 if at least one of their arguments are false, and 0 if all are true. nand() always evaluates all of its arguments, while ncand() stops evaluating after the first false value. + + Equivalent to not(and()) and not(cand()), but more efficient. + + +### See Also +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +- [and()](/reference/sharpmush-help/pennfunc/#and) +- [cand()](/reference/sharpmush-help/pennfunc/#cand) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [nor()](/reference/sharpmush-help/pennfunc/#nor) +## NEARBY() +`nearby(<object 1>, <object 2>)` + + Returns 1 if `<object 1>` is "nearby" `<object 2>`, and 0 otherwise. "Nearby" means the objects are in the same location, or that one is located inside the other. You must control at least one of the objects; if you don't, or if one of the objects can't be found, nearby() returns #-1. + + +### See Also +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [findable()](/reference/sharpmush-help/pennfunc/#findable) +## NEQ() +`neq(<number1>, <number2>[, ... , <numberN>])` + + Returns 0 if all the given `<number>`s are the same, and 1 otherwise. Basically the same as [not(eq(`<number1>`, `<number2>`[, ... , `<numberN>`]))] but more efficient. + + +### See Also +- [eq()](/reference/sharpmush-help/pennfunc/#eq) +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## NEXT() +`next(<object>)` + + If `<object>` is an exit, then next() will return the next exit in `<object>`'s source room. If `<object>` is a thing or a player, then next() will return the next object in the contents list of `<object>`'s location. Otherwise, it returns a #-1. #-1 is also used to denote that there are no more exits or objects after `<object>`. + + You can get the complete contents of any container you may examine, regardless of whether or not objects are dark. You can get the partial contents (obeying DARK/LIGHT/etc.) of your current location or the enactor (%#). You CANNOT get the contents of anything else, regardless of whether or not you have objects in it. These rules apply to exits, as well. + + +### See Also +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [con()](/reference/sharpmush-help/pennfunc/#con) +- [exit()](/reference/sharpmush-help/pennfunc/#exit) +## NEXTDBREF() +`nextdbref()` + + This function returns the next dbref on the free list; when the next object is @created (or @dug, or @opened, or @pcreated, etc.), it will have this dbref. + + +### See Also +- [@stats](/reference/sharpmush-help/penncmd/#stats) +- [stats()](/reference/sharpmush-help/pennfunc/#stats) +## NOR() +## NCOR() +`nor(<boolean1>[, ... , <booleanN>])` +`ncor(<boolean1>[, ... , <booleanN>])` + + These functions return 1 if all their arguments are false, and 0 if any are true. nor() always evaluates all arguments, while ncor() stops evaluating after the first true value. + + Equivalent to not(or()) and not(cor()), but more efficient. + + +### See Also +- [and()](/reference/sharpmush-help/pennfunc/#and) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [xor()](/reference/sharpmush-help/pennfunc/#xor) +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [nand()](/reference/sharpmush-help/pennfunc/#nand) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## NOT() +`not(<boolean>)` + + not() returns 1 if `<boolean>` is false, and 0 if it's true. + + The definition of truth and falsehood depends on configuration settings; see [boolean values](/reference/sharpmush-help/penntop/#boolean-values) for details. + + +### See Also +- [Boolean Functions](/reference/sharpmush-help/pennfunc/#boolean-functions) +- [t()](/reference/sharpmush-help/pennfunc/#t) +- [and()](/reference/sharpmush-help/pennfunc/#and) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [nor()](/reference/sharpmush-help/pennfunc/#nor) +- [xor()](/reference/sharpmush-help/pennfunc/#xor) +## NUM() +`num(<object>)` + + Returns the dbref number of `<object>`. `<object>` must reference a valid object, as per [matching](/reference/sharpmush-help/penntop/#matching). + + +### See Also +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [pmatch()](/reference/sharpmush-help/pennfunc/#pmatch) +## NVCON() +## NCON() +`ncon(<object>)` +`nvcon(<object>)` + + These functions return a the number of objects inside `<object>`. They are identical to words(lcon(`<object>`)) and words(lvcon(`<object>`)), respectively, but are more efficient and do not suffer from buffer constraints. + + +### See Also +- [nexits()](/reference/sharpmush-help/pennfunc/#nexits) +- [nplayers()](/reference/sharpmush-help/pennfunc/#nplayers) +- [xcon()](/reference/sharpmush-help/pennfunc/#xcon) +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +## NVEXITS() +## NEXITS() +`nexits(<room>)` +`nvexits(<room>)` + + These functions return a count of the exits in a room. They are equivilent to words(lexits(`<room>`)) and words(lvexits(`<room>`)) respectively, though are more efficient, and don't suffer from buffer constraints. + + +### See Also +- [ncon()](/reference/sharpmush-help/pennfunc/#ncon) +- [nplayers()](/reference/sharpmush-help/pennfunc/#nplayers) +- [xexits()](/reference/sharpmush-help/pennfunc/#xexits) +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## NVPLAYERS() +## NPLAYERS() +`nplayers(<object>)` +`nvplayers(<object>)` + + These functions return a count of the players in `<object>`. They are equivilent to words(lplayers(`<object>`)) and words(lvplayers(`<object>`)) respectively, though are more efficient and do not suffer from buffer constraints. + + +### See Also +- [ncon()](/reference/sharpmush-help/pennfunc/#ncon) +- [nexits()](/reference/sharpmush-help/pennfunc/#nexits) +- [xplayers()](/reference/sharpmush-help/pennfunc/#xplayers) +- [lplayers()](/reference/sharpmush-help/pennfunc/#lplayers) +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +## NVTHINGS() +## NTHINGS() +`nthings(<object>)` +`nvthings(<object>)` + + These functions return a count of the things in a container. They are equivilent to words(lthings(`<object>`)) and words(lvthings(`<object>`)) respectively, though are more efficient and do not suffer from buffer constraints. + + +### See Also +- [ncon()](/reference/sharpmush-help/pennfunc/#ncon) +- [nexits()](/reference/sharpmush-help/pennfunc/#nexits) +- [xthings()](/reference/sharpmush-help/pennfunc/#xthings) +- [lthings()](/reference/sharpmush-help/pennfunc/#lthings) +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +## NMWHO() +## NWHO() +`nwho([<viewer>])` +`nmwho()` + + nwho() returns a count of all currently-connected players. When mortals use this function, hidden players are NOT counted. See_All players can specify a `<viewer>` to get a count of the number of players that `<viewer>` can see is online. + + nmwho() returns a count of all currently connected, non-hidden players. It's exactly the same as nwho() used by a mortal, and is suitable for use on privileged global objects that always need an unprivileged count of who is online. + + These functions are equivilent to words(lwho([`<viewer>`])) and words(mwho()), but are more efficient, and don't suffer from buffer constraints. + + +### See Also +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [mwho()](/reference/sharpmush-help/pennfunc/#mwho) +- [xwho()](/reference/sharpmush-help/pennfunc/#xwho) +- [xmwho()](/reference/sharpmush-help/pennfunc/#xmwho) +## OBJ() +## %o +`obj(<object>)` + + Returns the objective pronoun - him/her/it - for an object. The %o substitution will return the objective pronoun of the enactor. + + +### See Also +- [subj()](/reference/sharpmush-help/pennfunc/#subj) +- [poss()](/reference/sharpmush-help/pennfunc/#poss) +- [aposs()](/reference/sharpmush-help/pennfunc/#aposs) +## OBJEVAL() +`objeval(<object>, <expression>)` + + Allows you to evaluate `<expression>` from the viewpoint of `<object>`. If side-effect functions are enabled, you must control `<object>`; if not, you must either control `<object>` or have the see_all power. If `<object>` does not exist or you don't meet one of the criterion, the expression evaluates with your privileges. + + +### See Also +- [s()](/reference/sharpmush-help/pennfunc/#s) +## OBJID() +`objid(<object>)` + + This function returns the object id of `<object>`, a value which uniquely identifies it for the life of the MUSH. The object id is the object's dbref, a colon character, and the object's creation time, in seconds since the epoch, equivilent to [num(`<object>`)]:[csecs(`<object>`)] + + The object id can be used nearly anywhere the dbref can, and ensures that if an object's dbref is recycled, the new object won't be mistaken for the old object. + + The substitution %: returns the object id of the enactor. + + +### See Also +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [csecs()](/reference/sharpmush-help/pennfunc/#csecs) +- [ctime()](/reference/sharpmush-help/pennfunc/#ctime) +- [ENACTOR](/reference/sharpmush-help/penntop/#enactor) +## OBJMEM() +`objmem(<object>)` + + This function returns the amount of memory, in bytes, being used by the object. It can only be used by players with Search powers. + + +### See Also +- [playermem()](/reference/sharpmush-help/pennfunc/#playermem) +## OEMIT() +## NSOEMIT() +`oemit([<room>/]<object> [... <object>], <message>)` +`nsoemit([<room>/]<object> [... <object>], <message>)` + + Sends `<message>` to all objects in `<room>` (default is the location of `<object>`(s)) except `<object>`(s), as per @oemit. + + nsoemit() works like @nsoemit. + +## OPEN() +`open(<exit name>[, <destination>[, <source>[, <dbref>]]])` + + This function attempts to open an exit named `<exit name>`. The exit will be opened in the room `<source>`, if given, or the caller's current location if no `<source>` is specified. + + If a `<destination>` is given, it will attempt to link the exit to `<destination>` after opening it. + + Wizards and objects with the pick_dbref power can specify a garbage dbref to use for the new exit. + + It returns the dbref of the newly created exit, or #-1 on error. + + +### See Also +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [dig()](/reference/sharpmush-help/pennfunc/#dig) +- [link()](/reference/sharpmush-help/pennfunc/#link) +- [create()](/reference/sharpmush-help/pennfunc/#create) +- [pcreate()](/reference/sharpmush-help/pennfunc/#pcreate) +## OR() +## COR() +`or(<boolean1>, <boolean2>[, ... , <booleanN>])` +`cor(<boolean1>, <boolean2>[, ... , <booleanN>])` + + These functions take a number of boolean values, and return 1 if any of them are true, and 0 if all are false. or() always evaluates all of its arguments, while cor() stops evaluating as soon as one is true. + + +### See Also +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [and()](/reference/sharpmush-help/pennfunc/#and) +- [nor()](/reference/sharpmush-help/pennfunc/#nor) +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [allof()](/reference/sharpmush-help/pennfunc/#allof) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## ORFLAGS() +## ORLFLAGS() +`orflags(<object>, <string of flag characters>)` +`orlflags(<object>, <list of flag names>)` + + These functions return 1 if `<object>` has any of the given flags, and 0 if it does not. orflags() takes a string of single flag letters, while orlflags() takes a space-separated list of flag names. In both cases, a ! before the flag means "not flag". + + If there is a syntax error like a ! without a following flag, '#-1 INVALID FLAG' is returned. Unknown flags are treated as being not set. + + Examples: Check to see if %# is set Wizard, Dark, or not set Ansi. + > say orflags(%#, WD!A) + > say orlflags(%#, wizard dark !ansi) + + +### See Also +- [andflags()](/reference/sharpmush-help/pennfunc/#andflags) +- [flags()](/reference/sharpmush-help/pennfunc/#flags) +- [lflags()](/reference/sharpmush-help/pennfunc/#lflags) +- [orlpowers()](/reference/sharpmush-help/pennfunc/#orlpowers) +## ORLPOWERS() +`orlpowers(<object>, <list of powers>)` + + This function returns 1 if `<object>` has at least one of the powers in a specified list, and 0 if it does not. The list is a space-separated list of power names. A '!' preceding a flag name means "not power". + + Thus, ORLPOWERS(me, poll login) would return 1 if I have the poll and login powers. ORLFLAGS(me, functions !guest) would return 1 if I have the functions power or are not a guest. + + If there is a syntax error like a ! without a following power, '#-1 INVALID POWER' is returned. Unknown powers are treated as being not set. + + +### See Also +- [powers()](/reference/sharpmush-help/pennfunc/#powers) +- [andlpowers()](/reference/sharpmush-help/pennfunc/#andlpowers) +- [POWERS LIST](/reference/sharpmush-help/pennconf/#powers-list) +- [@power](/reference/sharpmush-help/penncmd/#power) +- [orlflags()](/reference/sharpmush-help/pennfunc/#orlflags) +## OWNER() +`owner(<object>[/<attribute>])` +`owner(<object>[/<attribute>], <new owner>[, preserve])` + + Given just an object, it returns the owner of the object. Given an object/attribute pair, it returns the owner of that attribute. + + If `<new owner>` is specified, the ownership is changed, as in @chown or @atrchown. If the optional third argument is "preserve", privileged flags and powers will be preserved ala @chown/preserve. + If changing ownership, #-1 or 0 is returned on failure, 1 on success. + + +### See Also +- [lockowner()](/reference/sharpmush-help/pennfunc/#lockowner) +- [@chown](/reference/sharpmush-help/penncmd/#chown) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) + +## PARENT() +`parent(<object>[, <new parent>])` + + This function returns the dbref number of an object's parent. You must be able to examine the object to do this. If you specify a second argument, parent() attempts to change the parent first. You must control `<object>`, and be allowed to @parent to `<new parent>`. + + +### See Also +- [@parent](/reference/sharpmush-help/penncmd/#parent) +- [ancestors](/reference/sharpmush-help/penntop/#ancestors) +- [pfun()](/reference/sharpmush-help/pennfunc/#pfun) +- [lparent()](/reference/sharpmush-help/pennfunc/#lparent) +## PEMIT() +## NSPEMIT() +## PROMPT() +## NSPROMPT() +`pemit(<object list|port numbers>, <message>)` +`nspemit(<object list|port numbers>, <message>)` +`prompt(<object list>, <message>)` +`nsprompt(<object list>, <message>)` + + With an `<object list>`, pemit() will send each object on the list a message, as per the @pemit/list command. It returns nothing. It respects page-locks and HAVEN flags on players. With `<port numbers>`, pemit() sends the message to the specified ports only, like @pemit/port/list. + + nspemit() works like @nspemit/list. + + prompt() adds a telnet GOAHEAD to the end of the message, as per the @prompt command. nsprompt() that works like @nsprompt. + + +### See Also +- [@prompt](/reference/sharpmush-help/penncmd/#prompt) +- [@nsprompt](/reference/sharpmush-help/penncmd/#nsprompt) +- [PROMPT_NEWLINES](/reference/sharpmush-help/penncmd/#promptnewlines) +## PI() +`pi()` + + Returns the value of "pi" (3.14159265358979323846264338327, rounded to the game's float_precision setting). +## PIDINFO() +`pidinfo(<pid>[, <list of fields>[, <output separator>]])` + + This function returns information about a process id if the player has permission to see the process. The `<list of fields>` is a space-separated list that may contain the following elements: + + queue the queue ("wait" or "semaphore") for the process + executor the queueing object + time remaining time for timed queued entries (or -1) + object the semaphore object for semaphores (or #-1) + attribute the semaphore attribute for semaphores (or #-1) + command the queued command + + If `<list of fields>` is not provided, all fields are returned. The fields are separated by `<output separator>`, which defaults to a space. + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [lpids()](/reference/sharpmush-help/pennfunc/#lpids) +- [getpids()](/reference/sharpmush-help/pennfunc/#getpids) +## PLAYERMEM() +`playermem(<player>)` + + This function returns the amount of memory, in bytes, being used by everything owned by the player. It can only be used by players with Search powers. + + +### See Also +- [objmem()](/reference/sharpmush-help/pennfunc/#objmem) +## PLAYER() +`player(<port>)` + + Returns the dbref of the player connected to a given port. Mortals can only use this function on their own ports, while See_All players can use it on any port. + + +### See Also +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +- [ports()](/reference/sharpmush-help/pennfunc/#ports) +## PMATCH() +`pmatch(<name>)` + + pmatch() attempts to find a player called `<name>`, which should be the full or partial name of a player (possibly prefixed with a "*") or a dbref. First, it checks to see if `<name>` is the dbref, full name, or alias of a player; if so, their dbref is returned. Otherwise, it checks for partial matches against the names of online players. If there are no matches, #-1 is returned. If there are multiple matches, pmatch() returns #-2. Otherwise, the matching player's dbref is returned. + + pmatch() does not check for the string "me". If you wish to do that, you should use locate (for example, locate(`<player>`, `<name>`, PFym)). + + +### See Also +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [namelist()](/reference/sharpmush-help/pennfunc/#namelist) +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +## POLL() +`poll()` + + This function returns the current @poll. + + +### See Also +- [@poll](/reference/sharpmush-help/penncmd/#poll) +- [doing()](/reference/sharpmush-help/pennfunc/#doing) +- [@doing](/reference/sharpmush-help/penncmd/#doing) +## LPIDS() +`lpids([<object>[, <queue types>]])` + + This function returns a list of queue process ids (pids). Only commands queued by objects with the same owner as `<object>` are listed. If you have the see_queue @power, you can specify "all" for `<object>` to get pids for everyone's queue entries. `<object>` defaults to the caller, or "all" for priviledged callers. + + `<queue types>` should be a list of one or more of the following words, to filter the pids returned: + wait -- Only return wait queues + semaphore -- Only return semaphore queues + independent -- Only return commands queued by `<object>` specifically, instead of all objects with the same owner as `<object>`. + If not specified, it defaults to "wait semaphore". + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [getpids()](/reference/sharpmush-help/pennfunc/#getpids) +- [pidinfo()](/reference/sharpmush-help/pennfunc/#pidinfo) +## LPORTS() +## PORTS() +`lports([<viewer>[, <status>]])` +`ports(<player name>)` + + These functions return the list of descriptors ("ports") that are used by connected players. lports() returns all ports, in the same order as lwho() returns dbrefs, and ports() returns those a specific player is connected to, from most recent to least recent. Mortals can use ports() on themselves, but only See_All players can use ports() on others, or use lports(). + + If lports() is given a `<viewer>`, only the ports of connections which `<viewer>` can see are returned, in the same way as lwho(`<viewer>`) works. + + The `<status>` argument for lports() controls whether or not ports which are not connected to (ie, at the login screen) are included, and must be one of "all", "online" or "offline". + + These port numbers also appear in the wizard WHO, and can be used with @boot/port, page/port, and the functions that return information about a connection to make them use a specific connection rather than the least-idle one when a player has multiple connections open. Players can get information about their own connections. See_all is needed to use them to get information about other people's ports. + + +### See Also +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [player()](/reference/sharpmush-help/pennfunc/#player) +- [Connection Functions](/reference/sharpmush-help/pennfunc/#connection-functions) +## POS() +`pos(<needle>, <haystack>)` + + This function returns the position that `<needle>` begins in `<haystack>`. Unlike most other string functions, the first character of `<haystack>` is numbered 1, not 0. If `<needle>` is not present in `<haystack>`, pos() returns #-1. + + +### See Also +- [member()](/reference/sharpmush-help/pennfunc/#member) +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [lpos()](/reference/sharpmush-help/pennfunc/#lpos) +- [wordpos()](/reference/sharpmush-help/pennfunc/#wordpos) +## POSS() +## %p +`poss(<object>)` + + Returns the possessive pronoun - his/her/its - for an object. The %p substitution also returns the possessive pronoun of the enactor. + + +### See Also +- [subj()](/reference/sharpmush-help/pennfunc/#subj) +- [obj()](/reference/sharpmush-help/pennfunc/#obj) +- [aposs()](/reference/sharpmush-help/pennfunc/#aposs) +## POWER() +`power(<number>, <exponent>)` + + Returns `<number>` to the power of `<exponent>`. + + (For the functional version of @power, see [powers()](/reference/sharpmush-help/pennfunc/#powers).) + + +### See Also +- [root()](/reference/sharpmush-help/pennfunc/#root) +## POWERS() +`powers()` +`powers(<object>)` +`powers(<object>, <power>)` + + With no arguments, powers() returns a space-separated list of all defined @powers on the MUSH. With one argument, it returns a list of the powers possessed by `<object>`. + + With two arguments, it attempts to set `<power>` on `<object>`, as per @power `<object>`=`<power>`. + + +### See Also +- [andlpowers()](/reference/sharpmush-help/pennfunc/#andlpowers) +- [orlpowers()](/reference/sharpmush-help/pennfunc/#orlpowers) +- [@power](/reference/sharpmush-help/penncmd/#power) +- [POWERS LIST](/reference/sharpmush-help/pennconf/#powers-list) +## QUOTA() +`quota(<player>)` + + Returns the player's quota, the maximum number of objects they can create if quotas are in effect. Returns 99999 for players with the No_Quota @power, so it's safe to use in numerical comparisons. + + You must control `<player>` or have the See_All or Quotas @powers to use this function. + + +### See Also +- [@quota](/reference/sharpmush-help/penncmd/#quota) +- [@squota](/reference/sharpmush-help/penncmd/#squota) +- [@allquota](/reference/sharpmush-help/penncmd/#allquota) +- [QUOTAS](/reference/sharpmush-help/penntop/#quotas) +- [Quotas Power](/reference/sharpmush-help/pennconf/#quotas-power) +- [No_Quota Power](/reference/sharpmush-help/pennconf/#noquota-power) +## R() +## %q +## R-FUNCTION +`r(<register>[, <type>])` + + The r() function can be used to access registers. It can retrieve the value of q-registers set with setq() and related functions, as well as the 30 stack values (the first ten of which are also available via %0-%9), and also iter() and switch() context (also available through itext() and stext(), respectively). The registers() function can be used to obtain a list of available registers. + + `<type>` defaults to "qregisters", and must be one of: + + qregisters - registers set with setq(), setr() and similar functions + args - the stack, usually accessed via %0-%9. There are up to 30 stack registers, plus named stack registers from regexp $-commands + iter - itext() context from iter() or @dolist. Must be an int, or "L" for the outermost itext(). + switch - stext() context from switch() or @switch. Must be an int, or "L" for the outermost stext() + regexp - regexp capture names from re*() regexp functions + + qregisters can also be accessed via the %qX (for one-char register names) or %q`<X>` (for registers with longer names) substitutions. + + +### See Also +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [listq()](/reference/sharpmush-help/pennfunc/#listq) +- [unsetq()](/reference/sharpmush-help/pennfunc/#unsetq) +- [registers()](/reference/sharpmush-help/pennfunc/#registers) +- [v()](/reference/sharpmush-help/pennfunc/#v) +- [itext()](/reference/sharpmush-help/pennfunc/#itext) +- [stext()](/reference/sharpmush-help/pennfunc/#stext) +- [ilev()](/reference/sharpmush-help/pennfunc/#ilev) +- [slev()](/reference/sharpmush-help/pennfunc/#slev) +## RAND() +`rand()` +`rand(<num>)` +`rand(<min>, <max>)` + + Return a random number. + + The first form returns a floating-point number in the range 0 <= n < 1. + + The second form returns an integer between 0 and `<num>`-1, inclusive (or between 0 and `<num>`+1, for negative `<num>`s). + + The third returns an integer between `<min>` and `<max>`, inclusive. + + If called with an invalid argument, rand() returns an error message + beginning with #-1. + + +### See Also +- [randword()](/reference/sharpmush-help/pennfunc/#randword) +## RANDWORD() +## PICKRAND() +`randword(<list>[, <delimiter>])` + + Returns a randomly selected element from `<list>`. Elements of the list are separated by `<delimiter>`, which defaults to a space. + + pickrand() is an alias for randword(). + + +### See Also +- [rand()](/reference/sharpmush-help/pennfunc/#rand) +- [randextract()](/reference/sharpmush-help/pennfunc/#randextract) +## RANDEXTRACT() +`randextract(<list>[, <count>[, <delim>[, <type>[, <osep>]]]])` + + Returns up to `<count>` random elements from the `<delim>`-separated `<list>`. The following `<type>`s are available: + R - Grab `<count>` elements from `<list>` at random, but don't duplicate any elements + L - Grab `<count>` elements from `<list>`, in order, starting at a random element + D - Grab `<count>` elements from `<list>` at random, with duplicates allowed + + randextract() may return less than `<count>` elements for `<type>`s L and R, depending on the random element chosen and the length of `<list>`. Elements of the returned list are separated by `<osep>`, which defaults to `<delim>`. `<delim>` defaults to a single space, `<count>` defaults to 1, and `<type>` defaults to R. + + Examples: +``` +say randextract(this is a test,3) +You say "this test a" +say randextract(this@is@a@test,3,@) +You say "this@a@test" +say randextract(this is a test,3,,L,*) +You say "this*is*a" +say randextract(this is a test,6,,D) +You say, "this test is this is is" +``` + + +### See Also +- [rand()](/reference/sharpmush-help/pennfunc/#rand) +- [randword()](/reference/sharpmush-help/pennfunc/#randword) +## REGEDIT() +## REGEDITALL() +## REGEDITI() +## REGEDITALLI() +`regedit(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])` +`regediti(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])` +`regeditall(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])` +`regeditalli(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])` + + These functions edit `<string>`, replacing the part of the string which matches the regular expression `<regexp>` with the accompanying `<replace>`. In `<replace>`, the string "$`<number>`" is expanded during evaluation to the `<number>`th sub-expression, with $0 being the entire matched section. If you use named sub-expressions (?P`<name>`subexpr), they are referred to with "$`<name>`". Note that, with named sub-expressions, the "<>" are literal. + + regedit() only replaces the first match, while regeditall() replaces all matches. The versions ending in i are case insensitive. The `<replace>` argument is evaluated once for each match, allowing for more complex transformations than is possible with straight replacement. + + Examples: +``` +say regedit(this test is the best string, (?P<char>.)est, $<char>rash) +You say "this trash is the best string" +say regeditall(this test is the best string, (.)est, capstr($1)rash) +You say "this Trash is the Brash string" +``` + + +### See Also +- [edit()](/reference/sharpmush-help/pennfunc/#edit) +- [@edit](/reference/sharpmush-help/penncmd/#edit) +- [regmatch()](/reference/sharpmush-help/pennfunc/#regmatch) +- [regrab()](/reference/sharpmush-help/pennfunc/#regrab) +## REGMATCH() +## REGMATCHI() + (Help text from TinyMUSH 2.2.4, with permission) +`regmatch(<string>, <regexp>[, <register list>])` +`regmatchi(<string>, <regexp>[, <register list>])` + + regmatch() checks to see if the entirety of `<string>` matches the regular expression `<regexp>`, and returns 1 if so and 0 if not. regmatchi() does the same thing, but case-insensitively. They are the regexp-equivilent of strmatch(); if you're looking for a regexp version of match(), see [reglmatch()](/reference/sharpmush-help/pennfunc/#reglmatch). + + If `<register list>` is specified, there is a side-effect: any parenthesized substrings within the regular expression will be set into the specified local registers. The syntax for this is X:Y, where X is the number (0 is the entire matched text) or name of the substring, and Y is the q-register to save it in. If X: isn't given, the nth substring based on the register's position in the list minus one is used. The first element will have the complete matched text, the second the first substring, and so on. This is to maintain compatibility with old code; it's recommended for new uses that the X:Y syntax be used. + + If `<regexp>` is not a valid regular expression, an error in the form "#-1 REGEXP ERROR: `<description>`" will be returned. + + See [regmatch2](/reference/sharpmush-help/pennfunc/#regmatch2) for an example. + + +### See Also +- [regrab()](/reference/sharpmush-help/pennfunc/#regrab) +- [regedit()](/reference/sharpmush-help/pennfunc/#regedit) +- [valid()](/reference/sharpmush-help/pennfunc/#valid) +- [reswitch()](/reference/sharpmush-help/pennfunc/#reswitch) +- [strmatch()](/reference/sharpmush-help/pennfunc/#strmatch) +- [regexp syntax](/reference/sharpmush-help/penntop/#regexp-syntax) +## REGMATCH2 + + For example, in + > think regmatch(cookies=30, (.+)=(\[0-9\](/reference/sharpmush-help/pennconf/#0-9)*) ) + (note use of escaping for MUSH parser), then the 0th substring matched is 'cookies=30', the 1st substring is 'cookies', and the 2nd substring is '30'. If `<register list>` is '0:0 1:3 2:5', then %q0 will become "cookies=30", %q3 will become "cookies", and %q5 will become "30". + + If `<register list>` was '0:0 2:5', then the "cookies" substring would simply be discarded. '1:food 2:amount' would store "cookies" in %q`<food>` and "30" in %q`<amount>`. + + See [regexp syntax](/reference/sharpmush-help/penntop/#regexp-syntax) for an explanation of regular expressions. +## REMIT() +## NSREMIT() +`remit(<object list>, <message>)` +`nsremit(<object list>, <message>)` + + Sends a message to the contents of all the objects specified in `<object list>`, as per @remit/list. + + nsremit() works like @nsremit/list. + + +### See Also +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [pemit()](/reference/sharpmush-help/pennfunc/#pemit) +- [lemit()](/reference/sharpmush-help/pennfunc/#lemit) +## REMOVE() +`remove(<list>, <words>[, <delimiter>])` + + This function removes the first occurrence of every word in the list `<words>` from `<list>`, and returns the resulting `<list>`. It is case sensitive. + + Elements of `<list>` and `<words>` are both separated by `<delimiter>`, which defaults to a space. + + +### See Also +- [linsert()](/reference/sharpmush-help/pennfunc/#linsert) +- [ldelete()](/reference/sharpmush-help/pennfunc/#ldelete) +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +## RENDER() +`render(<string>, <formats>)` + + This function renders the given `<string>` into a given format. Most useful when coding bots, or inserting text into an SQL database to display on a website. `<formats>` is a space-separated list of one or more of the following: + + ansi -- Convert colors to raw ANSI tags (requires Can_Spoof power) + html -- Escape HTML entities (< to <, etc) and convert Pueblo to HTML tags + noaccents -- Downgrade accented characters, as per stripaccents() + markup -- Leave any markup not already converted by ansi/html as internal markup tags. Without this, unhandled markup + will be stripped, as per stripansi() + + Examples: +``` +say render(<Test 1> & [tagwrap(u,Test 2)], html) +You say, "<Test 1> & <u>Test 2</u>" +``` + + +### See Also +- [stripaccents()](/reference/sharpmush-help/pennfunc/#stripaccents) +- [stripansi()](/reference/sharpmush-help/pennfunc/#stripansi) +- [Pueblo](/reference/sharpmush-help/pennpueb/#pueblo) +- [@sql](/reference/sharpmush-help/penncmd/#sql) +- [tagwrap()](/reference/sharpmush-help/pennpueb/#tagwrap) +- [json()](/reference/sharpmush-help/pennfunc/#json) +## REPEAT() +`repeat(<string>, <number>)` + + This function simply repeats `<string>`, `<number>` times. No spaces are inserted between each repetition. + + Example: +``` +say repeat(Test, 5) +You say, "TestTestTestTestTest" +``` + + +### See Also +- [space()](/reference/sharpmush-help/pennfunc/#space) +## LREPLACE() +## REPLACE() +`lreplace(<list>, <position(s)>, <new item>[, <delimiter>[, <osep>]])` + + This replaces the item(s) at the given `<position(s)>` in `<list>` with `<new item>`. `<delimiter>` defaults to a space, and `<osep>` defaults to `<delimiter>`. Null items are counted when determining position. + + If `<position>` is negative, it counts backwards from the end of the list. A `<position>` of -1 will replace the last element, -2 the element before last, and so on. + + Examples: +``` +say lreplace(Turn north at the junction,2,south) +You say, "Turn south at the junction" +``` + + > say lreplace(Turn north at the junction,-1,crossroads) + You say, "Turn north at the crossroads" + + > say lreplace(blue|red|green|yellow,3,white,|) + You say, "blue|red|white|yellow" + + > say lreplace(this starts and ends the same, 1 -1, foo) + You say, "foo starts and ends the foo" + + replace() is an alias for lreplace(), for backwards compatability. + + +### See Also +- [ldelete()](/reference/sharpmush-help/pennfunc/#ldelete) +- [linsert()](/reference/sharpmush-help/pennfunc/#linsert) +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +- [splice()](/reference/sharpmush-help/pennfunc/#splice) +- [strreplace()](/reference/sharpmush-help/pennfunc/#strreplace) +## REST() +`rest(<list>[, <delimiter>])` + + Returns a list minus its first element. + + +### See Also +- [after()](/reference/sharpmush-help/pennfunc/#after) +- [first()](/reference/sharpmush-help/pennfunc/#first) +- [last()](/reference/sharpmush-help/pennfunc/#last) +## REVWORDS() +`revwords(<list>[, <delimiter>[, <output separator>]])` + + This function reverses the order of words in a list. List elements are separated by `<delimiter>`, which defaults to a space. Elements in the reversed list are separated by `<ouput separator>`, which defaults to the delimiter. + + Example: +``` +say revwords(foo bar baz eep) +You say, "eep baz bar foo" +``` + + +### See Also +- [flip()](/reference/sharpmush-help/pennfunc/#flip) +## RIGHT() +`right(<string>, <length>)` + + Returns the `<length>` rightmost characters from `<string>`. + + +### See Also +- [left()](/reference/sharpmush-help/pennfunc/#left) +- [mid()](/reference/sharpmush-help/pennfunc/#mid) +## RJUST() +`rjust(<string>, <length>[, <fill>[, <truncate?>]])` + + This function returns `<string>`, padded on the left with the string `<fill>` until it's `<length>` characters long. `<fill>` can be more than one character in length, and defaults to a single space. + + If `<string>` is longer than `<length>`, it will be returned unaltered, unless `<truncate?>` is true, in which case only the last `<length>` characters of `<string>` are returned. + + Examples: +``` +say -[rjust(foo,6)]- +You say, "- foo-" +``` + + > say %r0[rjust(foo,6,-)]%r01234567 + You say, " + 0---foo7 + 01234567" + + > say rjust(foo,12,=-) + You say, "=-=-=-=-=foo" + + > say rjust(This is too long,9,,1) + You say, " too long" + + +### See Also +- [align()](/reference/sharpmush-help/pennfunc/#align) +- [center()](/reference/sharpmush-help/pennfunc/#center) +- [ljust()](/reference/sharpmush-help/pennfunc/#ljust) +- [right()](/reference/sharpmush-help/pennfunc/#right) +## RLOC() +`rloc(<object>, <levels>)` + + This function may be used to the get the location of `<object>`'s location (and on through the levels of locations), substituting for repeated nested loc() calls. `<levels>` indicates the number of loc()-equivalent calls to make; i.e., loc(loc(`<object>`)) is equivalent to rloc(`<object>`,2). rloc(`<object>`,0) is equivalent to num(`<object>`), and rloc(`<object>`,1) is equivalent to loc(`<object>`). + + If rloc() encounters a room, the dbref of that room is returned. If rloc() encounters an exit, the dbref of that exit's destination is returned. You must control `<object>`, be near it, or it must be a findable player. + + +### See Also +- [loc()](/reference/sharpmush-help/pennfunc/#loc) +- [where()](/reference/sharpmush-help/pennfunc/#where) +- [room()](/reference/sharpmush-help/pennfunc/#room) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +## RNUM() +`rnum(<container>, <object>)` + + This function looks for an object called `<object>` located inside `<container>`. If a single matching object is found, its dbref is returned. If several matching objects are found, #-2 is returned, and if nothing matches, or you lack permission, #-1 is returned. + + You must be in `<container>`, or be able to examine it, to use this function. + + This function has been deprecated and may be removed in a future patchlevel; locate(`<container>`, `<object>`, i) should be used instead. + + +### See Also +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [num()](/reference/sharpmush-help/pennfunc/#num) +- [rloc()](/reference/sharpmush-help/pennfunc/#rloc) +- [room()](/reference/sharpmush-help/pennfunc/#room) +## ROOM() +`room(<object>)` + + Returns the "absolute" location of an object. This is always a room; it is the container of all other containers of the object. The "absolute" location of an object is the place @lemit messages are sent to and NO_TEL status determined. You must control the object, be See_All, or be near the object in order for this function to work. The exception to this are players; if `<object>` is a player, the ROOM() function may be used to find the player's absolute location if the player is not set UNFINDABLE. + + +### See Also +- [loc()](/reference/sharpmush-help/pennfunc/#loc) +- [rloc()](/reference/sharpmush-help/pennfunc/#rloc) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [where()](/reference/sharpmush-help/pennfunc/#where) +## ROOT() +`root(<number>, <n>)` + + Returns the n-th root of `<number>`. The 2nd root is the square root, the 3rd the cube root, and so on. + + Examples: +``` +think root(27, 3) +3 +think power(3, 3) +27 +``` + + +### See Also +- [sqrt()](/reference/sharpmush-help/pennfunc/#sqrt) +- [power()](/reference/sharpmush-help/pennfunc/#power) +## ROUND() +## CEIL() +## FLOOR() +`round(<number>, <places>[, <pad>])` +`floor(<number>)` +`ceil(<number>)` + + round() rounds `<number>` to `<places>` decimal places. `<places>` must be between 0 and config(float_precision). If the optional `<pad>` argument is true, the result will be padded with 0s if it would otherwise have fewer than `<places>` digits after the decimal point. + + floor() rounds `<number>` down, and ceil() rounds `<number>` up, to 0 decimal places. + + Examples: +``` +think round(3.14159, 2) +3.14 +think round(3.5, 3, 1) +3.500 +think ceil(3.14159) +4 +think floor(3.14159) +3 +``` + + +### See Also +- [bound()](/reference/sharpmush-help/pennfunc/#bound) +- [trunc()](/reference/sharpmush-help/pennfunc/#trunc) +## FN() +`fn([<obj>/]<function name>[, <arg0>[, ... , <argN>]])` + + fn() executes the built-in/hardcoded function `<function name>`, even if the function has been deleted or overridden with @function. It is primarily useful within @functions that override built-ins in order to be able to call the built-in. + + Example: +``` +&BRIGHT_PEMIT #10=fn(pemit,%0,-->[ansi(h,%1)]) +@function/delete PEMIT +@function PEMIT=#10,BRIGHT_PEMIT +think pemit(me,test) +-->test (in highlighted letters) +``` + + To restrict the use of fn() to @functions only (to prevent players from skirting softcoded replacements), use @function/restrict fn=userfn. + + To prevent deleted functions from being used with fn(), @function/disable them prior to deleting. + + See [fn2](/reference/sharpmush-help/pennfunc/#fn2). +## FN2 + If `<obj>` is specified, the built-in function will be executed as `<obj>`, rather than as the object which called fn(). This is useful when using fn() to replace a side-effect function, to ensure priviledge checks, etc, are done correctly. You must control `<obj>`, or (if function side effects are disabled) must be see_all. + + When an `<obj>` is given, debug information is automatically suppressed when evaluating the built-in function. + + Example: +``` +&BRIGHT_PEMIT #10=fn(%@/pemit, %0, -->[ansi(h,%1)])) +@function/delete PEMIT +@function PEMIT=#10, BRIGHT_PEMIT +@lock/page *Mike=!=*Padraic +``` + + (As Padraic) + > think pemit(me,test) + -->test (in highlighted letters) + > think pemit(*Mike,test) + (nothing happens) + + +### See Also +- [@function](/reference/sharpmush-help/penncmd/#function) +- [RESTRICT](/reference/sharpmush-help/penntop/#restrict) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) +## S() +## S-FUNCTION +`s(<string>)` + + This function performs a second round of evaluation on `<string>`, and returns the result. It should be considered extremely dangerous to use on user input, or any other string which you don't have complete control over. There are very few genuine uses for this function; things can normally be achieved another, safer way. + + Example: +``` +&test me=$eval *: say When we eval %0, we get [s(%0)] +eval \[ucstr(test)] +You say, "When we eval [ucstr(test)], we get TEST" +``` + + +### See Also +- [objeval()](/reference/sharpmush-help/pennfunc/#objeval) +- [decompose()](/reference/sharpmush-help/pennfunc/#decompose) +## SCAN() +`scan(<looker>, <command>[, <switches>])` +`scan(<command>)` + + This function works like @scan, and returns a space-separated list of dbref/attribute pairs containing $-commands that would be triggered if `<command>` were run by `<looker>`. You must control `<looker>` or be See_All to use this function. Only objects you can examine are included in the output. + + If no `<looker>` is specified, it defaults to the executor. + + `<switches>` is a space-separated list of strings to limit which objects are checked for $-commands. Valid switches are: + room -- check `<looker>`'s location and its contents + me -- check `<looker>` + inventory -- check objects in `<looker>`'s inventory + self -- check `<looker>` and objects in `<looker>`'s inventory + zone -- check `<looker>`'s location's zone, and `<looker>`'s own zone + globals -- check objects in the Master Room + all -- all of the above (the default) + break -- once a match is found, don't check in other locations + + The order of searching for the "break" switch is the same as the order for normal $-command matching, as described in [evaluation order](/reference/sharpmush-help/penntop/#evaluation-order). + + +### See Also +- [@scan](/reference/sharpmush-help/penncmd/#scan) +- [@sweep](/reference/sharpmush-help/penncmd/#sweep) +- [MASTER ROOM](/reference/sharpmush-help/penntop/#master-room) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +- [$-COMMANDS] +## SCRAMBLE() +`scramble(<string>)` + + This function scrambles a string, returning a random permutation of its characters. Note that this function does not pay any attention to spaces or other special characters; it will scramble these characters just like normal characters. + + Example: +``` +say scramble(abcdef) +You say, "cfaedb" +``` + + +### See Also +- [shuffle()](/reference/sharpmush-help/pennfunc/#shuffle) +## SECS() +`secs()` + + This function takes no arguments, and returns the number of elapsed seconds since midnight, January 1, 1970 UTC. UTC is the base time zone, formerly GMT. This is a good way of synchronizing things that must run at a certain time. + + +### See Also +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [time()](/reference/sharpmush-help/pennfunc/#time) +## SECURE() +`secure(<string>)` + + This function returns `<string>` with all "dangerous" characters replaced by spaces. Dangerous characters are + ( ) [ ] { } $ % , ^ ; + Note that the use of this function is very rarely needed. + + +### See Also +- [decompose()](/reference/sharpmush-help/pennfunc/#decompose) +- [escape()](/reference/sharpmush-help/pennfunc/#escape) +## SET() +`set(<object>[/<attribute>], <flag>)` +`set(<object>, <attribute>:<value>)` + + This function is equivalent to @set, and can be used to toggle flags and set attributes. The two arguments to the function are the same as the arguments that would appear on either side of the '=' in @set. This function returns nothing. + + The attribute-setting ability of set() is deprecated. You should use attrib_set() instead; it's easier to read, and allows you to clear attributes, too. + + +### See Also +- [attrib_set()](/reference/sharpmush-help/pennfunc/#attribset) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [wipe()](/reference/sharpmush-help/pennfunc/#wipe) +## SETDIFF() +`setdiff(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])` + + This function returns the difference of two sets -- i.e., the elements in `<list1>` that aren't in `<list2>`. The list that is returned is sorted. Normally, alphabetic sorting is done. You can change this with the fourth argument, which is a sort type as defined in [sorting](/reference/sharpmush-help/pennfunc/#sorting). If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. + + Example: +``` +say setdiff(foo baz gleep bar, bar moof gleep) +You say, "baz foo" +``` + + +### See Also +- [setinter()](/reference/sharpmush-help/pennfunc/#setinter) +- [setsymdiff()](/reference/sharpmush-help/pennfunc/#setsymdiff) +- [setunion()](/reference/sharpmush-help/pennfunc/#setunion) +## SETSYMDIFF() +`setsymdiff(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])` + + This function returns the symmetric difference of two sets -- i.e., the elements that only appear in one or the other of the lists, but not in both. The list that is returned is sorted. Normally, alphabetic sorting is done. You can change this with the fourth argument, which is a sort type as defined in [sorting](/reference/sharpmush-help/pennfunc/#sorting). If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. + + Example: +``` +say setsymdiff(foo baz gleep bar, bar moof gleep) +You say, "baz foo moof" +``` + + +### See Also +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +- [setinter()](/reference/sharpmush-help/pennfunc/#setinter) +- [setunion()](/reference/sharpmush-help/pennfunc/#setunion) +## SETINTER() +`setinter(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])` + + This function returns the intersection of two sets -- i.e., the elements that are in both `<list1>` and `<list2>`. The list that is returned is sorted. Normally, alphabetic sorting is done. You can change this with the fourth argument, which is a sort type as defined in [sorting](/reference/sharpmush-help/pennfunc/#sorting). If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. + + Example: +``` +say setinter(foo baz gleep bar, bar moof gleep) +You say, "bar gleep" +``` + + +### See Also +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +- [setsymdiff()](/reference/sharpmush-help/pennfunc/#setsymdiff) +- [setunion()](/reference/sharpmush-help/pennfunc/#setunion) +## SETQ() +## SETR() +`setq(<register1>, <string1>[, ... , <registerN>, <stringN>])` +`setr(<register1>, <string1>[, ... , <registerN>, <stringN>])` + + The setq() and setr() functions are used to copy strings into local registers assigned arbitrary names (Much like variables in other programming languages.) setq() returns a null string; it is a purely "side effect" function. setr() returns the value stored. Multiple registers can be assigned with a single setq() or setr(), with additional pairs of registers and values in the function's arguments. In this case, setr() returns the value stored in the first register listed. All arguments are evaluated before any registers are set; if you want to use the result of setting one register in setting another, use multiple setq()s. + + Registers set via setq() or setr() can be accessed via the r() function. Single-character registers can also be accessed via the %qN substitution, and ones with longer names via %q`<NAME>` (Note that the <>'s are required.) Attempting to access a register that hasn't been set results in an empty string. + + Register names are case insensitive: setq(A, foo) and setq(a, foo) both set the same register, and %qA and %qa both fetch its value. + + See [setq2](/reference/sharpmush-help/pennfunc/#setq2) for more on limits, or [setq3](/reference/sharpmush-help/pennfunc/#setq3) for examples. + +### See Also +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [listq()](/reference/sharpmush-help/pennfunc/#listq) +- [unsetq()](/reference/sharpmush-help/pennfunc/#unsetq) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [localize()](/reference/sharpmush-help/pennfunc/#localize) +- [ulocal()](/reference/sharpmush-help/pennfunc/#ulocal) +- [registers()](/reference/sharpmush-help/pennfunc/#registers) +## SETQ2 + Register names follow the same rules for attribute names, but they must be shorter than 64 characters in length. + + Register names other than a-z or 0-9 have a per-localize limit, defined with @config max_named_qregs. If setq or setr tries to set a named q-register and it exceeds the limit, it will return the string "#-1 TOO MANY REGISTERS". This is the only time setq will return a string. setq() and setr() with registers a-z or 0-9 have nothing to worry about. + + The maximum number of q-registers you can have set is configured via @config max_attrs_per_obj. That number is for the total number of q-registers set in a queue entry: Including across localize()d calls. Beyond that count, you can only use single character registers (a-z 0-9). Attempts to create a new register will simply fail silently, with the exception of setq(). + + See [setq3](/reference/sharpmush-help/pennfunc/#setq3) for examples. +## SETQ3 + The setq() function is probably best used at the start of the string being manipulated, such as in the following example: + + > &TEST object=strlen(%0) + > &CMD object=$test *: say setq(0,u(TEST,%0))Test. %0 has length %q0. + > test Foo + Object says, "Test. Foo has length 3." + + In this case, it is a waste to use setq(), since we only use the function result once, but if TEST was a complex function being used multiple times within the same command, it would be much more efficient to use the local register, since TEST would then only be evaluated once. setq() can thus be used to improve the readability of MUSH code, as well as to cut down the amount of time needed to do complex evaluations. + + Swapping the contents of registers can be done without writing to temporary registers by setting both registers at once, so the code: + + > think setq(0,foo,one,bar)%q0%q`<one>` - [setq(0,r(one),one,%q0)]%q0%q`<one>` + foobar - barfoo + + See [setq4](/reference/sharpmush-help/pennfunc/#setq4) for scoping rules of setq(). +## SETQ4 + The registers set by setq() can be used in later commands in the same thread. That is, the registers are set to null on all $-commands, ^-commands, A-attribute triggers, etc., but are then retained from that point forward through the execution of all your code. Code branches like @wait and @switch retain the register values from the time of the branch. + + Example: +``` +say setr(what,foo); @wait 0=say %q<what>; say setr(what,bar) +Object says "foo" +Object says "bar" +Object says "foo" +``` +## LISTQ() +## UNSETQ() +`listq([<pattern>])` +`unsetq([<pattern1> [<pattern2> [...]]])` + + listq() returns a space-separated list of set q-registers with values available in the current q-register scope. If `<pattern>` is provided, then only those that match the wildcard pattern `<pattern>` will be returned. + + unsetq() without arguments clears all registers. Otherwise, unsetq() treats its argument as a list of register name patterns, and will unset all those registers within the local scope. + + If unsetq() is inside of a letq(), and does not have an argument, it will clear the registers that letq() has protected. unsetq() with arguments clears the specified registers. + + unsetq(`<arg>`) will clear all registers returned by listq(`<arg>`). + + Example: +``` +think setq(name,Walker,num,#6061,loc,Bahamas)[listq()] +LOC NAME NUM +think setq(name,Walker,num,#6061,loc,Bahamas)[listq(n*)] +NAME NUM +think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(name)][listq()] +LOC NUM +think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(n*)][listq()] +LOC +``` + + +### See Also +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [localize()](/reference/sharpmush-help/pennfunc/#localize) +- [registers()](/reference/sharpmush-help/pennfunc/#registers) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## REGISTERS() +`registers([<pattern>[, <types>[, <osep>]]])` + + The registers() function returns a list of the names of all existing registers of the specified `<types>`. `<types>` is a space-separated list containing zero or more of: + + qregisters - registers set with setq(), setr() and similar functions + args - %0-%9 arguments + iter - itext() context from iter() or @dolist + switch - stext() context from switch() or @switch + regexp - regexp capture names + + If `<types>` is empty, all types of registers are included. If `<pattern>` is specified, only registers whose name matches `<pattern>` will be included. The results are separated by `<osep>`, which defaults to a single space. + + The list returned may contain duplicates (for instance, if %0 and %q0 both have a value, the list will include "0" twice), and is not sorted in any particular order. + + +### See Also +- [listq()](/reference/sharpmush-help/pennfunc/#listq) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [setr()](/reference/sharpmush-help/pennfunc/#setr) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [v()](/reference/sharpmush-help/pennfunc/#v) +- [stext()](/reference/sharpmush-help/pennfunc/#stext) +- [itext()](/reference/sharpmush-help/pennfunc/#itext) +## SETUNION() +`setunion(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])` + + This function returns the union of two sets -- i.e., all the elements of both `<list1>` and `<list2>`, minus any duplicate elements. The list returned is sorted. Normally, alphabetic sorting is done. You can change this with the fourth argument, which is a sort type as defined in [sorting](/reference/sharpmush-help/pennfunc/#sorting). If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. + + Examples: +``` +say setunion(foo baz gleep bar, bar moof gleep) +You say, "bar baz foo gleep moof" +``` + + > say setunion(1.1 1.0, 1.000) + You say, "1.0 1.000 1.1" + + > say setunion(1.1 1.0, 1.000, %b, f) + You say, "1.0 1.1" + + +### See Also +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +- [setinter()](/reference/sharpmush-help/pennfunc/#setinter) +- [setsymdiff()](/reference/sharpmush-help/pennfunc/#setsymdiff) +## SHA0() +`sha0(<string>)` + + Returns the SHA-0 cryptographic hash of the string. See RFC 3174 for more information. Deprecated; use digest() and higher strength algorithms instead. On servers with newer versions of OpenSSL that no longer provide the algorithm, returns #-1 NOT SUPPORTED. + + +### See Also +- [digest().] +## SHL() +`shl(<number>, <count>)` + + Performs a leftwards bit-shift on `<number>`, shifting it `<count>` times. This is equivalent to mul(`<number>`, power(2, `<count>`), but much faster. + + +### See Also +- [shr()](/reference/sharpmush-help/pennfunc/#shr) +## SHR() +`shr(<number>, <count>)` + + Performs a rightwards bit-shift on `<number>`, shifting it `<count>` times. This is equivalent to div(`<number>`, power(2, `<count>`), but much faster. + + +### See Also +- [shl()](/reference/sharpmush-help/pennfunc/#shl) +## SHUFFLE() +`shuffle(<list>[, <delimiter>[, <osep>]])` + + This function shuffles the order of the items of a list, returning a random permutation of its elements. + + `<delimiter>` defaults to a space, and `<osep>` defaults to `<delimiter>`. + + Example: +``` +say shuffle(foo bar baz gleep) +You say, "baz foo gleep bar" +``` + + +### See Also +- [scramble()](/reference/sharpmush-help/pennfunc/#scramble) +- [pickrand()](/reference/sharpmush-help/pennfunc/#pickrand) +## SIGN() +`sign(<number>)` + + Essentially returns the sign of a number -- 0 if the number is 0, 1 if the number is positive, and -1 if the number is negative. This is equivalent to bound(`<number>`, -1, 1). + + Example: +``` +say sign(-4) +You say, "-1" +``` + + > say sign(2) + You say, "1" + + > say sign(0) + You say, "0" + + +### See Also +- [abs()](/reference/sharpmush-help/pennfunc/#abs) +- [bound()](/reference/sharpmush-help/pennfunc/#bound) +## SIN() +`sin(<angle>[, <angle type>])` + + Returns the sine of `<angle>`, which should be expressed in the given angle type, or radians by default. + + See 'HELP ANGLES' for more on the angle type. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [tan()](/reference/sharpmush-help/pennfunc/#tan) +## SORT() +`sort(<list>[, <sort type>[, <delimiter>[, <osep>]]])` + + This sorts a list of words. If no second argument is given, it will try to detect the type of sort it should do. If all the words are numbers, it will sort them in order of smallest to largest. If all the words are dbrefs, it will sort them in order of smallest to largest. Otherwise, it will perform a lexicographic sort. + + The second argument is a sort type. See [sorting](/reference/sharpmush-help/pennfunc/#sorting). + + The optional third argument gives the list's delimiter character. If not present, `<delimiter>` defaults to a space. The optional fourth argument gives a string that will delimit the resulting list; it defaults to `<delimiter>`. + + +### See Also +- [sortby()](/reference/sharpmush-help/pennfunc/#sortby) +- [sortkey()](/reference/sharpmush-help/pennfunc/#sortkey) +## SORTBY() +`sortby([<obj>/]<attrib>, <list>[, <delimiter>[, <output separator>]])` + + This sorts an arbitrary list according to the ufun `<obj>`/`<attrib>`. This ufun should compare two arbitrary elements, %0 and %1, and return zero (equal), a negative integer (element 1 is less than element 2) or a positive integer (element 1 is greater than element 2), similar to the comp() function. + + A simple example, which imitates a normal alphabetic sort: + > &ALPHASORT test=comp(%0,%1) + > say sortby(test/ALPHASORT,foo bar baz) + You say, "bar baz foo" + + A slightly more complicated sort. #1 is "God", #2 is "Amby", "#3" is "Bob": + > &NAMESORT me=comp(name(%0),name(%1)) + > say sortby(NAMESORT,#1 #2 #3) + You say, "#2 #3 #1" + + Warning: the function invocation limit applies to this function. If this limit is exceeded, the function will fail _silently_. List and function sizes should be kept reasonable. + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [sorting](/reference/sharpmush-help/pennfunc/#sorting) +- [sort()](/reference/sharpmush-help/pennfunc/#sort) +- [sortkey()](/reference/sharpmush-help/pennfunc/#sortkey) +## SORTKEY() +`sortkey([<obj>/]<attrib>, <list>[, <sort type>[, <delimiter>[, <osep>]]])` + + This function creates a list of keys by passing every element of `<list>` into the ufun given in `<attrib>`. The list is then sorted according to the sorting method in `<sort type>`, or is automatically guessed (as per [sorting](/reference/sharpmush-help/pennfunc/#sorting)). + + This is equivalent to: + > &munge_sort me=sort(%0[, `<sort type>`]) + > say munge(munge_sort, map(`<attrib>`, `<list>`), `<list>`) + + Only there is no risk with delimiters occurring within the list. + + A simple example, which sorts players by their names: + > @@ #1 is "God", #2 is "Amby", "#3" is "Bob" + > &KEY_NAME me=name(%0) + > say sortkey(key_name, #1 #2 #3) + You say, "#2 #3 #1" + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [sorting](/reference/sharpmush-help/pennfunc/#sorting) +- [sortby()](/reference/sharpmush-help/pennfunc/#sortby) +## SORTING + In functions where you can specify a sorting method, you can provide one of these sort types: + + Type Sorts: + a Sorts lexicographically (Maybe case-sensitive). + i Sorts lexicographically (Always case-insensitive). + d Sorts dbrefs. + n Sorts integer numbers. + f Sorts decimal numbers. + m Sorts strings with embedded numbers and dbrefs (as names). + name Sorts dbrefs by their names. (Maybe case-sensitive) + namei Sorts dbrefs by their names. (Always case-insensitive) + conn Sorts dbrefs by their connection time. + idle Sorts dbrefs by their idle time. + owner Sorts dbrefs by their owner dbrefs. + loc Sorts dbrefs by their location dbref. + ctime Sorts dbrefs by their creation time. + mtime Sorts dbrefs by their modification time. + lattr Sorts attribute names. + + The special sort key attr:`<aname>` or attri:`<aname>` will sort dbrefs according to their `<aname>` attributes. For example: Separating by &factions or &species attrs. attr is probably case-sensitive, and attri is case-insensitive. + + Prefixing the sort type with a minus sign, -, reverses the order of the sort. + + Whether or not the 'a' sort type is case-sensitive or not depends on the particular mush and its environment. + + +### See Also +- [sort()](/reference/sharpmush-help/pennfunc/#sort) +- [sortby()](/reference/sharpmush-help/pennfunc/#sortby) +- [sortkey()](/reference/sharpmush-help/pennfunc/#sortkey) +- [setunion()](/reference/sharpmush-help/pennfunc/#setunion) +- [setinter()](/reference/sharpmush-help/pennfunc/#setinter) +- [setdiff()](/reference/sharpmush-help/pennfunc/#setdiff) +## SOUNDEX() +`soundex(<word>[, <hash type>])` + + The soundex function returns the soundex pattern for a word. A soundex pattern represents the sound of the word, and similar sounding words should have the same soundex pattern. Soundex patterns consist of an uppercase letter and 3 digits. + + > think soundex(foobar) + F160 + + For details of how the algorithm works, see [soundex2](/reference/sharpmush-help/pennfunc/#soundex2). + + +### See Also +- [soundslike()](/reference/sharpmush-help/pennfunc/#soundslike) +## SOUNDEX2 + Here's how the soundex algorithm works: + 1. The first letter of the soundex code is the first letter of the word (exception: words starting with PH get a soundex starting with F) + 2. Each remaining letter is converted to a number: + vowels, h, w, y ---------> 0 + b, p, f, v --------------> 1 + c, g, j, k, q, s, x, z --> 2 + d, t --------------------> 3 + l -----------------------> 4 + m, n --------------------> 5 + r -----------------------> 6 + At this stage, "foobar" is "F00106" + 3. Strings of the same number are condensed. "F0106" + 4. All 0's are removed, because vowels are much less important than consonants in distinguishing words. "F16" + 5. The string is padded with 0's or truncated to 4 characters. "F160" + That's it. It's not foolproof (enough = "E520", enuf = "E510") but it works pretty well. :) + + The optional second argument can be 'soundex' (The default), for the transformation described above, or 'phone', for a different phonetic hash algorithm. +## SOUNDLIKE() +## SOUNDSLIKE() +`soundslike(<word>, <word>[, <hash type>])` +`soundlike(<word>, <word>[, <hash type>])` + + The soundslike function returns 1 if the two words have the same hash code (see [soundex()](/reference/sharpmush-help/pennfunc/#soundex) for information), which means, in general, if they sound alike. The hash type can be 'soundex' (Default) or 'phone' for a different algorithm that might give better results with some words. + + Examples: +``` +think soundslike(robin,robbyn) +1 +think soundslike(robin,roebuck, phone) +0 +``` + + +### See Also +- [soundex()](/reference/sharpmush-help/pennfunc/#soundex) +## SPACE() +`space(<number>)` + + Prints `<number>` spaces. Useful for times when you want to be able to use lots of spaces to separate things. Same as [repeat(%b, `<number>`)]. + + Example: +``` +say a[space(5)]b +Amberyl says, "a b" +``` + + +### See Also +- [repeat()](/reference/sharpmush-help/pennfunc/#repeat) +## SPEAK() +## SPEAKPENN() +`speak(<speaker>, <string>[, <say string>[, [<transform obj>/]<transform attr>[, [<isnull obj>/]<isnull attr>[, <open>[, <close>]]]]])` + + This function is used to format speech-like constructs, and is capable of transforming text within a speech string; it is useful for implementing "language code" and the like. + + If `<speaker>` begins with &, the rest of the `<speaker>` string is treated as the speaker's name, so you can use it for NPCs or tacking on titles (such as with @chatformat). Otherwise, the name of the object `<speaker>` is used. + + When only `<speaker>` and `<string>` are given, this function formats `<string>` as if it were speech from `<speaker>`, as follows. + + If `<string>` is... the resulting string is... + :`<pose>` `<speaker's name>` `<pose>` + ;`<pose>` `<speaker's name>``<pose>` + |`<emit>` `<emit>` + `<speech>` `<speaker's name>` says, "`<speech>`" + + The chat_strip_quote config option affects this function, so if `<speech>` starts with a leading double quote ("), it may be stripped. + + If `<say string>` is specified, it is used instead of "says,". + + See [speak2](/reference/sharpmush-help/pennfunc/#speak2). +## SPEAK2 + + Examples: +``` +say [name(me)] +You say, "Wizard" +``` + + > @emit [speak(me, :tests.)] + Wizard tests. + + > @emit [speak(me, ;'s testing.)] + Wizard's testing. + + > @emit [speak(me, |Test.)] + Test. + + > @emit [speak(me, "Test.)] + Wizard says, "Test." + + > @emit [speak(me, Test.)] + Wizard says, "Test." + + > @emit [speak(me, Test., yells:)] + Wizard yells: "Test." + + > @emit [speak(&Fido the Wonder Dog,:woofs!)] + Fido the Wonder Dog woofs! + + > @emit [speak(&Mr. President,:has been misunderestimated.)] + Mr. President has been misunderestimated. + + See [speak3](/reference/sharpmush-help/pennfunc/#speak3). +## SPEAK3 + + If `<transform>` is specified (an object/attribute pair or attribute, as with map() and similar functions), the speech portions of `<string>` are passed through the transformation function. + + Speech is delimited by double-quotes (i.e., "text"), or by the specified `<open>` and `<close>` strings. For instance, if you wanted `<<text>`> to denote text to be transformed, you would specify `<open>` as `<< and close as >`> in the function call. Only the portions of the string between those delimiters are transformed. If `<close>` is not specified, it defaults to `<open>`. + + The transformation function receives the speech text as %0, the dbref of `<speaker>` as %1, and the speech fragment number as %2. For non-say input strings (i.e., for an original `<string>` beginning with the :, ;, or | tokens), fragments are numbered starting with 1; otherwise, fragments are numbered starting with 0. (A fragment is a chunk of speech text within the overall original input string.) + + See [speak4](/reference/sharpmush-help/pennfunc/#speak4). +## SPEAK4 + + Examples: +``` +@va me="Fragment %2 is: %0" +``` + + > @emit speak(me, test, ,va) + Wizard says, "Fragment 0 is: test" + + > @emit speak(me, "test, ,va) + Wizard says, "Fragment 0 is: test" + + > @emit speak(me, "test, yells:, va) + Wizard yells: "Fragment 0 is: test" + + > @emit speak(me, :tests. "Hi.", ,va) + Wizard tests. "Fragment 1 is: Hi." + + > @emit speak(me, ;'s testing. "Hi.", ,va) + Wizard's testing. "Fragment 1 is: Hi." + + > @emit speak(me, |This is a test. "Hi.", ,va) + This is a test. "Fragment 1 is: Hi." + + > @emit speak(me, :tests. "Hi." And... "Bye." The end., ,va) + Wizard tests. "Fragment 1 is: Hi." And... "Fragment 2 is: Bye." The end. + + > @emit speak(me, :tests. "Hi." And... `<<Bye.>`> The end., ,va, , `<<, >`>) + Wizard tests. "Hi." And... "Fragment 1 is: Bye." The end. + + See [speak5](/reference/sharpmush-help/pennfunc/#speak5). +## SPEAK5 + + If the result of transforming a given speech fragment is a null string, and `<isnull>` is specified (an object/attribute pair or attribute), that function is used evaluate an alternative result, with %0 as the dbref of `<speaker>`, and %1 as the speech fragment number. + + The `<isnull>` functionality can be useful for gracefully handling cases where speech may be processed down to nothing, such as with language code where no words are successfully translated. + + Consider this example, where the speech string may be randomly removed: + + > &MUTTER_FN me=if(rand(2),"%0",) + > &NONE_FN me=capstr(subj(%0)) mutters something. + > @emit speak(me, :tests. "Hello there.", mutters:, MUTTER_FN, NONE_FN) + Wizard tests. "Hello there." + OR + Wizard tests. He mutters something. + + See [speak6](/reference/sharpmush-help/pennfunc/#speak6). +## SPEAK6 + + Elegantly handling an empty string when the type of speech is a plain say is a bit more difficult. In order to facilitate this, when the speech type is a plain say, the '`<speaker>` says,' is only prepended to the output if the transformation of the first speech fragment produces something non-null. Also note that quotes are not placed around such speech automatically, to allow the user's code to insert whatever is appropriate. + + Below is a more elegant version of the mutter example. Here, we find the use for say-speech fragments being numbered starting from 0 rather than 1 -- if the speech fragment number is 0, we know we haven't given any output yet. + + > &MUTTER_FN me=if(rand(2),"%0") + > &NONE_FN me=switch(%1,0,name(%0),capstr(subj(%0)))] mutters something. + > @emit speak(me, Hello there., mutters:, MUTTER_FN, NONE_FN) + Wizard mutters: "Hello there." + OR + Wizard mutters something. + + See [speak7](/reference/sharpmush-help/pennfunc/#speak7). +## SPEAK7 + + Here's another example, where words between + signs are reversed, but those within double-quotes are untouched (demonstrating a technique useful in something where you want to allow users to mix ordinary speech with transformed speech). + + > &REV_FN me=switch(%2,0,backwards,capstr(subj(%1)) says backwards), "[revwords(%0)]" + > @emit speak(me,:tests. "Normal speech." +Mixed up speech+ Success!,, REV_FN,,+) + Wizard tests. "Normal speech." He says backwards, "speech up Mixed" Success! + +## SPELLNUM() +`spellnum(<number>)` + + Given a number, return its written-out representation in words. + + Example: +``` +think spellnum(12345) +twelve thousand three hundred forty-five +``` + + +### See Also +- [ordinal()](/reference/sharpmush-help/pennfunc/#ordinal) +## ORDINAL() +`ordinal(<integer>)` + + Given an integer, return its written-out ordinal representation in words. + + Example: +``` +think ordinal(1) +first +``` + + +### See Also +- [spellnum()](/reference/sharpmush-help/pennfunc/#spellnum) +## SPLICE() +`splice(<list1>, <list2>, <word>[, <delimiter>])` + + This function splices `<list1>` and `<list2>` together. `<list1>` and `<list2>` are space-separated lists of words. + + If a word in `<list1>` is the same as `<word>`, it is replaced by the word in the corresponding position in `<list2>`. Both lists must have the same + number of words. + + Example: +``` +say splice(foo bar baz,eek moof gleep,bar) +You say, "foo moof baz" +``` + + +### See Also +- [merge()](/reference/sharpmush-help/pennfunc/#merge) +## MAPSQL() +`mapsql([<object>/]<attribute>, <query>[, <osep>[, <dofieldnames>]])` + + Performs an SQL query if the MUSH is configured to connect to an SQL database server. This function requires a WIZARD flag or the Sql_Ok power. + + `<query>` is evaluated, so it's useful to either read it from another attribute with u() or use lit() to protect commas. If you will be interpolating user-provided values into the query, be careful to escape them with sqlescape(). + + Each row of the result is passed to `<attribute>`, with the first nine columns available as %1-%9, and twenty more available via v(10) - v(29). %0 is set to the row number, which will start with 1. The fields will also be available as named arguments, with r(`<field name>`, args) returning the appropriate value. + + If `<dofieldnames>` evaluates to a true boolean, then the first call will be with row number (%0) set to 0, and %1-%9 and v(10) - v(29) will be set to the field names. + + See [sql examples](/reference/sharpmush-help/pennfunc/#sql-examples) for examples. + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [sqlescape()](/reference/sharpmush-help/pennfunc/#sqlescape) +- [sql()](/reference/sharpmush-help/pennfunc/#sql) +- [@sql](/reference/sharpmush-help/penncmd/#sql) +- [@mapsql](/reference/sharpmush-help/penncmd/#mapsql) +## SQL() +`sql(<query>[, <row separator>[, <field separator>[, <register>]]])` + + Performs an SQL query if the MUSH is configured to connect to an SQL database server. This function requires a WIZARD flag or the Sql_Ok power. + + By default, SELECT queries will return their data space-separated. Usually, it's more useful to specify a character to delimit rows returned (and sometimes another character to delimit the fields/columns returned, if they may contain spaces). + + `<query>` is evaluated, so it's useful to either read it from another attribute with u() or use lit() to protect commas. If you will be interpolating user-provided values into the query, be careful to escape them with sqlescape(). + + A query that doesn't return any rows, such as an UPDATE or SELECT that has no matches will return a null string. + + If `<register>` is specified, and `<query>` alters the database (such as an UPDATE or INSERT query), there is a side-effect: the number of affected rows is stored into the specified q-register. + + See [sql examples](/reference/sharpmush-help/pennfunc/#sql-examples) for examples. + + +### See Also +- [sqlescape()](/reference/sharpmush-help/pennfunc/#sqlescape) +- [mapsql()](/reference/sharpmush-help/pennfunc/#mapsql) +- [@sql](/reference/sharpmush-help/penncmd/#sql) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [@mapsql](/reference/sharpmush-help/penncmd/#mapsql) +## SQL Examples + + Example of using sqlescape() to prevent injection attacks: + > &SEL_GETID obj=SELECT id FROM mytable WHERE name = '[sqlescape(%0)]' + > &DOIT obj=$do *: think setq(0,sql(u(SEL_GETID,%0),~,|)); @@ More cmds + + Using mapsql() to format results: + > @@ Field, Type, Null?, Key?, Default, Extra + > &each_row me=align(<15 <15 <5 <5 <10 <14,%1,%2,%3,%4,%5,%6) + > &tabledesc me=mapsql(each_row,describe `[sqlescape(%0)]`,%r,1) + > think u(tabledesc,quotes) + Field Type Null Key Default Extra + quoteid int(11) PRI auto_increment + quote text + + > &each_bb me=(%0) - %1 (%2) + > &query me=SELECT `name`, count(*) AS `total` FROM `bbs` GROUP BY `name` ORDER BY `name` + > think mapsql(each_bb, v(query), %r) + (1) - Announcements (5) + (2) - Advertisements (20) + + The same thing can be done using named arguments: + > &each_bb me=(%0) - [r(name, args)] ([r(total, args)]) + + Using sql() to update fields: + > &update me=UPDATE `foo` SET `time` = '[sqlescape(%0)]' WHERE `loc` = '[sqlescape(%1)]' + > &foo me=$foo *: think sql(u(update, %0, %L),,0)%q0 rows updated. + > foo bar + 5 rows updated. + +## SQLESCAPE() +`sqlescape(<string>)` + + This function performs SQL-server-implemented escaping of `<string>`. It's important to escape arbitrary data before passing it to the sql() and mapsql() functions, or @sql command, to prevent SQL injection attacks. + + Example: +``` +think sqlescape(You don't say) +You don\'t say +``` + + OR + + You don''t say + + + When used in an SQL query, the results of an sqlescape() function should be enclosed in single quotes. + + You must be a WIZARD or have the Sql_Ok power to use this function. + + +### See Also +- [sql()](/reference/sharpmush-help/pennfunc/#sql) +- [mapsql()](/reference/sharpmush-help/pennfunc/#mapsql) +- [@sql](/reference/sharpmush-help/penncmd/#sql) +- [@mapsql](/reference/sharpmush-help/penncmd/#mapsql) +## SQRT() +`sqrt(<number>)` + + Returns the square root of `<number>`. `<number>` cannot be negative. + + +### See Also +- [root()](/reference/sharpmush-help/pennfunc/#root) +## SQUISH() +`squish(<string>[, <character>])` + + This function removes the leading and trailing `<character>`s from `<string>`, and condenses all inter-word `<character>`s to a single`<character>`. If no character is given, a space is used. + + Examples: +``` + + > say squish(%b%bfoo bar%b%bbaz blech%b%b%beek%b) + You say, "foo bar baz blech eek" + > say squish(||a|| b|c|d|, |) + You say, "a| b|c|d" +``` + + +### See Also +- [trim()](/reference/sharpmush-help/pennfunc/#trim) +## STARTTIME() +## RESTARTTIME() +`starttime()` +`restarttime()` + + starttime() returns the time the MUSH was last started, and restarttime() returns the time it was last restarted, including @shutdown/reboots. The times are in the same format as time(). + + Example: +``` +say starttime()%r[restarttime()] +You say "Sat Dec 7 00:09:13 1991 +You say "Sat Dec 7 00:09:13 1991 +@shutdown/reboot +say starttime()%r[restarttime()] +You say "Sat Dec 7 00:09:13 1991 +Tue Sep 22 13:54:04 2015 +``` + + +### See Also +- [convtime()](/reference/sharpmush-help/pennfunc/#convtime) +- [restarts()](/reference/sharpmush-help/pennfunc/#restarts) +## RESTARTS() +`restarts()` + + Returns the number of times the server has been rebooted with @shutdown/reboot since the last full startup. + + +### See Also +- [restarttime()](/reference/sharpmush-help/pennfunc/#restarttime) +- [starttime()](/reference/sharpmush-help/pennfunc/#starttime) +## SSL() +`ssl(<player|descriptor>)` + + This function returns 1 if the player is using an SSL connection, and 0 otherwise. If SSL connections are disabled, it always returns 0. You must be See_All to use this function on another player. + + +### See Also +- [terminfo()](/reference/sharpmush-help/pennfunc/#terminfo) +## STEP() +`step([<obj>/]<attr>, <list>, <step>[, <delim>[, <osep>]])` + + This function is similar to map(), except you can pass up to 30 elements of the list at a time, in %0-%9 and v(10)-v(29). `<step>` must be between 1 and 30, with a step of 1 equivalent to map(). If the elements of the list can't be split up evenly, the last evaluation will run with some of the registers unset; the %+ substitution or the registers() function can be used to see which/how many are set. + + Example: +``` +&foo me=%0 - %1 - %2 +think step(foo, a b c d e, 3,, %r) +a - b - c +d - e - +``` + + Using registers() to avoid extra delimiters: + > &foo me=iter(registers(,args),v(%i0),,%b-%b) + > think step(foo, a b c d e, 3,, %r) + a - b - c + d - e + + +### See Also +- [map()](/reference/sharpmush-help/pennfunc/#map) +- [iter()](/reference/sharpmush-help/pennfunc/#iter) +- [fold()](/reference/sharpmush-help/pennfunc/#fold) +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [registers()](/reference/sharpmush-help/pennfunc/#registers) +## STDDEV() +`stddev(<number1>, <number2>[, ... , <numberN>])` + + Returns the sample standard deviation of its arguments. + + +### See Also +- [mean()](/reference/sharpmush-help/pennfunc/#mean) +- [median()](/reference/sharpmush-help/pennfunc/#median) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## STRFIRSTOF() +## STRALLOF() +`strfirstof(<expr>[, ... , <exprN>], <default>)` +`strallof(<expr>[, ... , <exprN>], <osep>)` + + strfirstof() returns the first `<expr>` which evaluates to a non-empty string (a string at least 1 character long). If all `<expr>`s evaluate empty, `<default>` is returned instead. + + strallof() returns all `<expr>`s which evaluate to non-empty strings, with each expression separated by `<osep>`. + + Examples: +``` +say strfirstof(, ,@@(Nothing),foo,default) +You say, "foo" +``` + + > say strfirstof(get(%#/fullname), u(%#/ansiname), %n) + You say, "Mike" + + > say strallof(, ,foo,@@(Nothing),%b,bar|baz,#-1,|) + You say, "foo| |bar|baz|#-1" + + +### See Also +- [allof()](/reference/sharpmush-help/pennfunc/#allof) +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +- [first()](/reference/sharpmush-help/pennfunc/#first) +- [strlen()](/reference/sharpmush-help/pennfunc/#strlen) +- [cat()](/reference/sharpmush-help/pennfunc/#cat) +- [default()](/reference/sharpmush-help/pennfunc/#default) +## STRINSERT() +`strinsert(<string>, <position>, <insert>)` + + This function returns `<string>`, with `<insert>` added before the `<position>` character in `<string>`. Note that the first character in `<string>` is numbered 0, not 1. + + If `<position>` is less than 0, an error is returned. If `<position>` is greater than the length of `<string>`, `<insert>` is appended to it. + + Examples: +``` +think strinsert(barbaz, 0, foo) +foobarbaz +think strinsert(Myname, 2, %b) +My name +``` + + +### See Also +- [strdelete()](/reference/sharpmush-help/pennfunc/#strdelete) +- [linsert()](/reference/sharpmush-help/pennfunc/#linsert) +- [strreplace()](/reference/sharpmush-help/pennfunc/#strreplace) +## STRIPACCENTS() +`stripaccents(<string>[, <smart>])` + + Returns the string with accented characters converted to non-accented. As with the accent() function, this assumes the ISO 8859-1 character set. + + If the second argument is true, it does more a intelligent conversion that might result in one character being turned into several. When it's false, or not given, one character in the input string corresponds to one character in the result. + + +### See Also +- [accent()](/reference/sharpmush-help/pennfunc/#accent) +- [@nameaccent](/reference/sharpmush-help/penncmd/#nameaccent) +- [accname()](/reference/sharpmush-help/pennfunc/#accname) +- [stripansi()](/reference/sharpmush-help/pennfunc/#stripansi) +- [render()](/reference/sharpmush-help/pennfunc/#render) +## STRIPANSI() +`stripansi(<string>)` + + Returns the string with all ansi and HTML codes removed. + + +### See Also +- [stripaccents()](/reference/sharpmush-help/pennfunc/#stripaccents) +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +- [tag()](/reference/sharpmush-help/pennpueb/#tag) +- [render()](/reference/sharpmush-help/pennfunc/#render) +## STRLEN() +`strlen(<string>)` + + Returns the length of the string (the number of characters in it). + + Example: +``` +say strlen(foobar) +You say, "6" +``` + + +### See Also +- [words()](/reference/sharpmush-help/pennfunc/#words) +- [strfirstof()](/reference/sharpmush-help/pennfunc/#strfirstof) +## STRMATCH() +`strmatch(<string>, <pattern>[, <register list>])` + + This function matches `<pattern>` against the entire `<string>`. It returns 1 if it matches and 0 if it doesn't. It is not case-sensitive, and `<pattern>` may contain wildcards. + + If `<register list>` is given, there is a side-effect: Wildcards and patterns are stored in q-registers, in the order they are given. `<register list>` is a space-separated list of register names. + + Examples: +``` +say strmatch(Foo bar baz, *Baz) +You say, "1" +``` + + > say strmatch(Foo bar baz,*Foo) + You say, "0" + + > say strmatch(Foo bar baz,*o*a*) + You say, "1" + + > say strmatch(foo:bar,*:*,0 1)/%q0/%q1 + You say, "1/foo/bar" + + > say strmatch(foo:bar=baz,*:*=*,L1 L2 right)/%q`<L1>`/%q`<L2>`/%q`<right>` + You say, "1/foo/bar/baz" + + +### See Also +- [comp()](/reference/sharpmush-help/pennfunc/#comp) +- [match()](/reference/sharpmush-help/pennfunc/#match) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## STRREPLACE() +`strreplace(<string>, <start>, <length>, <text>)` + + Returns `<string>` with the `<length>` characters starting at `<start>` replaced by `<text>`. As with most other string functions, the first character is at position 0. + + If `<start>` is less than 0, an error is returned, and if `<start>` is greater than the length of `<string>`, `<string>` is returned. + + strreplace() attempts to preserve ansi: if `<text>` contains ansi, it will be kept the same. If `<text>` contains no ansi, but `<string>` does, `<text>` will be inserted with the same ansi as the text it replaces. To force `<text>` to be inserted with no ansi, even if `<string>` has ansi, wrap it in ansi(n,....). + + Examples: +``` +say strreplace(abcXYZgh, 3, 3, def) +You say, "abcdefgh" +``` + + > think strreplace(Fix teh typo, 4, 3, the) + Fix the typo + + +### See Also +- [strdelete()](/reference/sharpmush-help/pennfunc/#strdelete) +- [strinsert()](/reference/sharpmush-help/pennfunc/#strinsert) +- [ldelete()](/reference/sharpmush-help/pennfunc/#ldelete) +- [lreplace()](/reference/sharpmush-help/pennfunc/#lreplace) +## SUB() +`sub(<number1>, <number>[, ... , <number>])` + + sub() subtracts `<number>` from `<number1>`. If more than one `<number>` argument is given, each is subtracted from the result of the previous subtraction in turn. The result of the final subtraction is returned. + + +### See Also +- [add()](/reference/sharpmush-help/pennfunc/#add) +- [dec()](/reference/sharpmush-help/pennfunc/#dec) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +- [vsub()](/reference/sharpmush-help/pennfunc/#vsub) +## SUBJ() +## %s +`subj(<object>)` + + Returns the subjective pronoun - he/she/it - for an object. You can also use the %s substitution to get the subjective pronoun of the enactor. + + +### See Also +- [aposs()](/reference/sharpmush-help/pennfunc/#aposs) +- [obj()](/reference/sharpmush-help/pennfunc/#obj) +- [poss()](/reference/sharpmush-help/pennfunc/#poss) +## RESWITCH() +## RESWITCHI() +## RESWITCHALL() +## RESWITCHALLI() +`reswitch(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])` +`reswitchall(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])` +`reswitchi(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])` +`reswitchalli(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])` + + These functions are just like switch() except they compare `<string>` against a series of regular expressions, not wildcard patterns. + + reswitch() and reswitchall() are case-sensitive. + + reswitch() and reswitchi() return the `<list>` which corresponds to the first matched `<re>`, while reswitchall() and reswitchalli() return the `<list>`s corresponding to all matched `<re>`s. If no `<re>`s match, all four functions return `<default>`. + + The string "#$" in the `<list>`s will be replaced with the value of `<str>`, /before/ `<list>` is evaluated. You can also use $N in `<list>` to refer to the Nth subpattern which matched in `<re>`, with $0 being the entire matching string. Use $`<name>` (the '<>' are literal) to refer to named subpatterns. + + +### See Also +- [switch()](/reference/sharpmush-help/pennfunc/#switch) +- [regmatch()](/reference/sharpmush-help/pennfunc/#regmatch) +- [regedit()](/reference/sharpmush-help/pennfunc/#regedit) +- [REGEXPS](/reference/sharpmush-help/penntop/#regexps) +## SWITCH() +## SWITCHALL() +## CASE() +## CASEALL() +`switch(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])` +`switchall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])` +`case(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])` +`caseall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])` + + These functions match `<string>` against the `<expr>`essions, returning the corresponding `<list>`. If nothing is matched, the `<default>` is returned. switch() and case() return the `<str>` for the first matching `<expr>`, while switchall() and caseall() return the corresponding `<list>` for all `<expr>`s which match. + + switch() and switchall() use wildcard and lt/gt `<expr>`s, as described in [switch wildcards](/reference/sharpmush-help/pennfunc/#switch-wildcards). case() and caseall() do a case-sensitive exact match, like member() or comp(). In this case, $0-$9 will be set to the text that the nth wildcard character met. + + If the string "#$" appears in the `<list>` to be evaluated, it will be replaced with the evaluated value of `<str>` /before/ evaluation of `<list>`. This is not done in case() and caseall(), for TinyMUSH 3 compatibility. Note that this replacement happens before evaluation, which makes it unsafe when `<str>` contains user input, and makes it unsuitable for use in nested switch()es. It is strongly recommended you use the %$`<n>` substitution or stext() function instead, which solves these problems. + + See [switch2](/reference/sharpmush-help/pennfunc/#switch2) for examples. + + +### See Also +- [reswitch()](/reference/sharpmush-help/pennfunc/#reswitch) +- [stext()](/reference/sharpmush-help/pennfunc/#stext) +- [slev()](/reference/sharpmush-help/pennfunc/#slev) +- [if()](/reference/sharpmush-help/pennfunc/#if) +- [cond()](/reference/sharpmush-help/pennfunc/#cond) +- [firstof()](/reference/sharpmush-help/pennfunc/#firstof) +## SWITCH2 + Examples: +``` +say switch(test, *a*, foo, *b*, bar, *t*, neat, baz) +You say, "neat" +``` + + > say switchall(ack, *a*, foo, *b*, bar, *c*, neat, baz) + You say, "fooneat" + + > say switch(moof, *a*, foo, *b*, bar, *t*, neat, baz) + You say, "baz" + + > say switch(moof, *a*, foo, *b*, bar, *t*, neat, #$) + You say, "moof" + + > say case(moof, *f, foo, moof, bar, baz) + You say, "bar" + + > say switch(foo bazaar,f?o b*r,$0-$1) + You say, "o-azaa" +## SWITCH WILDCARDS + @switch, @select, switch(), and switchall() normally do wildcard matching between their first argument and the `<expr>`ession arguments, with the normal * and ? special characters. However, if one of the `<expr>`essions starts with "`<" or ">`", a less-than or greater-than check is done instead of wildcard matching for that pair. + + switch(X, >Y, A, B) returns A if X is greater than Y, and B if it's not. + switch(X, >=Y, A, B) returns A if X is greater than or equal to Y, and B if it's not. + + switch(X, <Y, A, B) returns A if X is less than Y, and B if it's not. + switch(X, <=Y, A, B) returns A if X is less than or equal to Y, and B if it's not. + + If X and Y are numbers, the test is like using gt()/lt() or gte()/lte(). + + If X and Y are non-numeric strings, the result of comp(X,Y) is used to determine which string is alphabetically before (less than) the other. + + If you need to have a leading `< or >` that's treated like a normal character in a wildcard match, use \\`< or \\>` (the \\ will turn into \ when the argument is evaluated, and then that single \ will stop the greater/less than check). + + +### See Also +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## STEXT() +## SLEV() +## %$ +## %$0 +`slev()` +`stext([<n>])` + %$`<n>` + + slev() returns the current nesting depth of switch*(), reswitch*() and @switch/@selects. stext() returns the `<string>` being matched for the current switch, or the `<n>`th switch where n=0 is the current switch, n=1 is the switch the current switch is nested in, and so on. It is a safer replacement for the "#$" token, which (because it is replaced before evaluation) is unsafe with user input, and unsuitable for use in nested switches. + + stext(L) returns the `<string>` for the outermost switch, and is equivilent to stext(slev()). %$`<n>` is equivilent to stext(`<n>`), for `<n>`s of 0-9 or L. + + Examples: +``` +&cmd.whois me=$whois *: @pemit %#=switch(pmatch(%0),#-*, I don't know '%0', '%0' is %$0) +@switch foo=f*, say switch(bar, b*,%$1 %$0!) +You say, "foo bar!" +``` + + +### See Also +- [switch()](/reference/sharpmush-help/pennfunc/#switch) +- [reswitch()](/reference/sharpmush-help/pennfunc/#reswitch) +- [@switch](/reference/sharpmush-help/penncmd/#switch) +## T() +`t(<expression>)` + + Returns 1 if `<expression>` is a true boolean value, and 0 otherwise. The definitions of true and false vary depending on the value of the 'tiny_booleans' @config option. See [boolean values](/reference/sharpmush-help/penntop/#boolean-values) for details. + + +### See Also +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [if()](/reference/sharpmush-help/pennfunc/#if) +- [cond()](/reference/sharpmush-help/pennfunc/#cond) +- [@break](/reference/sharpmush-help/penncmd/#break) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [and()](/reference/sharpmush-help/pennfunc/#and) +## TABLE() +`table(<list>[, <field width>[, <line length>[, <delimiter>[, <osep>]]]])` + + This function returns the elements of `<list>` in a tabular format. All other parameters are optional. `<field width>` specifies how wide each table entry is allowed to be, and defaults to 10. If `<field width>` begins with a "`<", it is left-aligned. ">`" makes it right-aligned, and "-" makes it centered. Elements longer than `<field width>` are truncated to fit. + + `<line length>` is how wide a table row can be, and defaults to 78. `<delimiter>` is the delimiter used in `<list>`, and defaults to a space. `<osep>` is a single character to be used between entries in the table, and also defaults to a space. + + Examples: +``` +think table(a b areallylongone d) +a b areallylon d +``` + + > think table(the quick brown fox, 10, 25, , |) + the |quick + brown |fox + + +### See Also +- [align()](/reference/sharpmush-help/pennfunc/#align) +## TAN() +`tan(<angle>[, <angle type>])` + + Returns the tangent of `<angle>`, which should be expressed in the given angle type, or radians by default. See HELP ANGLES for more information. + + +### See Also +- [acos()](/reference/sharpmush-help/pennfunc/#acos) +- [asin()](/reference/sharpmush-help/pennfunc/#asin) +- [atan()](/reference/sharpmush-help/pennfunc/#atan) +- [cos()](/reference/sharpmush-help/pennfunc/#cos) +- [ctu()](/reference/sharpmush-help/pennfunc/#ctu) +- [sin()](/reference/sharpmush-help/pennfunc/#sin) +## TEL() +`tel(<object>, <destination>[, <silent>[, <inside>]])` + + This function will teleport `<object>` to `<destination>`, exactly as @teleport `<object>`=`<destination>`. `<silent>` is an optional boolean that, if true, makes the function act like @teleport/silent. `<inside>` is an optional boolean that, if true, makes the function act like @teleport/inside. + + +### See Also +- [@teleport](/reference/sharpmush-help/penncmd/#teleport) +## TERMINFO() +`terminfo(<player|descriptor>)` + + Returns a list with at least one element - the type of client used by the player, or "unknown" if the client being used doesn't support being asked to identify itself using RFC 1091. + + Other elements in the list describe client capabilities, and currently include: + pueblo present if the client is in Pueblo mode. + telnet present if the client understands the telnet protocol. + gmcp present if GMCP is negotiated via telnet; see help oob() + ssl present if the client is using an SSL/TLS connection. + prompt_newlines see [prompt_newlines](/reference/sharpmush-help/penncmd/#promptnewlines) + stripaccents client is receiving 7-bit ascii, no accented characters + + One of the color styles shown in [colorstyle](/reference/sharpmush-help/penncmd/#colorstyle) will also be included. + + Other fields may be added in the future, if, for example, MXP support is ever added. + + You must have see_all, or use terminfo() on yourself, to see all information or use a `<descriptor>`. Mortals using terminfo() on another player will always receive "unknown" for the client name, and will not get telnet/gmcp/ssl/prompt_newlines in the output list. + + +### See Also +- [pueblo()](/reference/sharpmush-help/pennpueb/#pueblo) +- [width()](/reference/sharpmush-help/pennfunc/#width) +- [height()](/reference/sharpmush-help/pennfunc/#height) +- [ssl()](/reference/sharpmush-help/pennfunc/#ssl) +- [@sockset](/reference/sharpmush-help/penncmd/#sockset) +- [oob()](/reference/sharpmush-help/pennfunc/#oob) +## JSON FUNCTIONS + JSON functions are used to create and modify JSON objects. + +`isjson() json() json_map() json_query() json_mod()` + + These functions are used to output JSON objects to GMCP and WebSocket connections. + +`wsjson() oob()` + + +### See Also +- [JSON PATHS](/reference/sharpmush-help/pennfunc/#json-paths) +## OOB() +## GMCP +`oob(<players>, <package>[, <message>])` + + This function sends an out-of-band message using the General MUD Communication Protocol (GMCP - http://www.gammon.com.au/gmcp) and a WebSocket. + + `<players>` is a space-separated list of player names/dbrefs to send the message to. Player names which contain spaces should be given in "quotes". + + `<package>` is the name of the package/message type. + + If specified, `<message>` is a JSON-formatted message to be sent. Use the JSON() function to construct valid JSON. + + You must be a wizard or have the Send_OOB power to send messages to anyone but yourself. + + Returns the number of descriptors the message was sent to on success, or a string starting with #-1 on error. + + +### See Also +- [json()](/reference/sharpmush-help/pennfunc/#json) +- [wsjson()](/reference/sharpmush-help/pennpueb/#wsjson) +## ISJSON() +`isjson(<text>)` + + This function returns 1 if its argument is valid JSON, 0 if not. + + Examples: +``` +think isjson(1) +1 +think isjson(true) +1 +think isjson(unquoted) +0 +think isjson("quoted") +1 +``` + + +### See Also +- [json()](/reference/sharpmush-help/pennfunc/#json) +## JSON() +`json(<type>[, <data>[, ..., <dataN>])` + + This function encodes `<data>` as a valid JSON (JavaScript Object Notation) message. `<type>` specifies the type of data to represent; valid `<type>`s and correspending `<data>`s are listed below. + + If any errors occur, json() returns a string starting with #-1. + + For `<type>`... `<data>` should be... + null not given + boolean one arg, either "true", "1", "false" or "0" + string one arg, any string, including an empty string + number one arg, a valid number + array zero or more args, each themselves valid JSON + object zero or more pairs of arguments, the first a plain string (NOT a quoted JSON string), the second valid JSON of any type + + When `<type>` is "array" or "object", it's recommended that subsequent JSON arguments are created with nested calls to JSON(). + + See [json2](/reference/sharpmush-help/pennfunc/#json2) for examples. + +### See Also +- [oob()](/reference/sharpmush-help/pennfunc/#oob) +- [isjson()](/reference/sharpmush-help/pennfunc/#isjson) +- [json_query()](/reference/sharpmush-help/pennfunc/#jsonquery) +- [json_map()](/reference/sharpmush-help/pennfunc/#jsonmap) +- [render()](/reference/sharpmush-help/pennfunc/#render) +## JSON2 + > think json(null) + null + + > think json(string, Look\, it's "JSON"!) + "Look, it's \"JSON\"!" + + > think json(array, json(number, pi()), json(string, Pie), json(bool, true)) + [3.141593, "Pie", true](/reference/sharpmush-help/pennconf/#3141593-pie-true) + + > &oneobject me=json(object, name, json(string, name(%0)), dbref, json(string, %0), created, json(number, csecs(%0))) + > think u(oneobject, #1) + {"name": "One", "dbref": "#1", "created": 1431039583} + + > think json(array, u(oneobject, #0), u(oneobject, #1), u(oneobject, #2)) + [ + {"name": "Room Zero", "dbref": "#0", "created": 1431039583}, + {"name": "One", "dbref": "#1", "created": 1431039583}, + {"name": "Master Room", "dbref": "#2", "created": 1431039583} + ] +## JSON_MAP() +`json_map([<object>/]<attribute>, <json>[, <osep>[, <arg>[, ..., <argN>]]])` + + This function iterates over a JSON string, calling the specified `<attribute>` for each element of the JSON. If `<json>` represents a basic JSON type (null, boolean, string or number), the attribute will be called once. For arrays and objects, it will be called once for each element of the array/object. + + When the attribute is called, %0 will be the type of the json object and %1 will be the value. When `<json>` is an array, %2 will be the array position of the current element. For objects, %2 will be the label of the current element. You can pass user-specified arguments to the attribute; the first `<arg>` will be available as %3, the second as %4, and so on. + + `<osep>` defaults to a space. + + See [json_map2](/reference/sharpmush-help/pennfunc/#jsonmap2) for examples. + +### See Also +- [json()](/reference/sharpmush-help/pennfunc/#json) +- [json_query()](/reference/sharpmush-help/pennfunc/#jsonquery) +## JSON_MAP2 + A very basic example: +``` +&json me=We got [art(%0)] %0: %1 +``` + + > think json_map(me/json, "foo") + We got a string: foo + + > think json_map(me/json, \["foo"\, 5\](/reference/sharpmush-help/pennconf/#foo-5), %r) + We got a string: foo + We got a number: 5 + + > think json_map(me/json, \["foo"\, \["bar"\, 10\](/reference/sharpmush-help/pennconf/#foo-bar-10)\], %r) + We got a string: foo + We got an array: ["bar",10](/reference/sharpmush-help/pennconf/#bar10) + + See [json_map3](/reference/sharpmush-help/pennfunc/#jsonmap3) for a more complex example. +## JSON_MAP3 + A JSON pretty-printer, using nested calls to json_map() to handle nested + JSON objects/arrays: + > &pretty_json me=u(me/pretty_json_sub,,%0,,0,strmatch(%0,\\{*)) + > &pretty_json_sub me=repeat(%t,%3)[if(%4,json(string,%2):%b)][switch(%1,\{*,\{%r[json_map(%=,%1,\,%r,inc(%3),1)]%r[repeat(%t,%3)]\},\[*,\[%r[json_map(%=,%1,\,%r,inc(%3),0)]%r[repeat(%t,%3)]\],json(%0,%1))] + + > &json me=[5, null, ["nested!", 999, {"foo":5, "bar":"\"Whee\""}](/reference/sharpmush-help/pennconf/#5-null-nested-999-foo5-barwhee), 7] + > th u(me/pretty_json, v(json) + [ + 5, + #-1, + [ + "nested!", + 999, + { + "foo": 5, + "bar": "\"Whee\"" + } + ], + 7 + ] +## JSON_QUERY() +`json_query(<json>[, <action>[, <arg>, ...<argN>]])` + + This function returns information about JSON data. `<json>` should be a valid JSON string, as returned by the json() function. There are 5 possible `<action>`s: + + Action... Returns... + type The type of `<json>`, one of string, number, boolean, null, array or object. Default if no `<action>` is given. + size The size of `<json>`; this is 0 for null objects, 1 for strings/numbers/booleans, the number of array elements, or the number of key/value pairs for objects. + exists For arrays and objects, returns 1 if there is an object found by following the path specified in `<arg>`... and 0 if not. If the current arg is an integer and the current json element is an array, uses the `<arg>`th index of the array (Starting at 0) as the new current element. Otherwise, if the current json element is an object, treats the current `<arg>` as a key into the object and its value as the new current element. Returns #-1 for other types. + get For arrays and objects, returns the json element found by following the path laid out in `<args>`... as described above. If no such element exists, returns an empty string. Returns #-1 for other JSON types. + extract Like get, but takes a single combined path arg as described in [json paths](/reference/sharpmush-help/pennfunc/#json-paths). Some caveats: Returns 0 for false, 1 for true, and strings are unquoted. + unescape Only valid for JSON strings; returns the unescaped form of `<json>`. + + See [json_query2](/reference/sharpmush-help/pennfunc/#jsonquery2) for examples. + +### See Also +- [json()](/reference/sharpmush-help/pennfunc/#json) +- [json_map()](/reference/sharpmush-help/pennfunc/#jsonmap) +## JSON_QUERY2 + Examples: +``` + + > say json_query(true) + You say, "boolean" + + > @set me=json:[json(array, "abc", "def", "gh\\"i")] + > say v(json) + You say, "["abc", "def", "gh\"i"]" + + > say json_query(v(json)) + You say, "array" + > say json_query(v(json), size) + You say, "3" + > say json_query(v(json), get, 0) + You say, ""abc"" + > say json_query(v(json), extract, $.\[2\]) + You say, "gh"i" + > say json_query(json_query(v(json), get, 2), unescape) + You say, "gh"i" +``` + + See [json_query3](/reference/sharpmush-help/pennfunc/#jsonquery3) for more examples. +## JSON_QUERY3 + Examples: +``` + + > @set me=json:[json(object, foo, "bar", baz, 12345, fnord, json(array, 1, 2, 3))] + > say v(json) + You say, "{"foo": "bar", "baz": 12345, "fnord": [1,2,3]}" + > say json_query(v(json), exists, foo) + You say, "1" + > say json_query(v(json), exists, bar) + You say, "0" + > say json_query(v(json), get, baz) + You say, "12345" + > say json_query(v(json), get, fnord, 1) + You say, "2" + > say json_query(v(json), extract, $.fnord\[1\]) + You say, "2" +``` +## JSON PATHS + + json_mod() and the extract argument for json_query() take a path string that describes what part of a JSON object or array to act on. All paths start with a $ to indicate the base JSON value, and 0 or more specifiers in the following formats: + + .FIELD - the name of a field in a JSON object. + [N] - the Nth element of a JSON array. Note that the brackets need to be escaped. + + +### See Also +- [json_mod()](/reference/sharpmush-help/pennfunc/#jsonmod) +- [json_query()](/reference/sharpmush-help/pennfunc/#jsonquery) +## JSON_MOD() +`json_mod(<json>, <action>, <path>[, <json2>])` + + Return a new JSON value based on applying `<action>` to `<json>`. + + insert - adds a new value `<json2>` at the given `<path>` if the data described by `<path>` doesn't exist. + replace - replaces an existing value at the given `<path>` with `<json2>`. + set - Add or replace `<json2>` at the given `<path>`. + patch - Applies a merge patch (See https://tools.ietf.org/html/rfc7396) to `<json>` from `<path>`, which must be valid JSON. + remove - Removes the element from `<json>` pointed to by `<path>` + sort - Given a JSON array, sorts it based on the element at `<path>`. + + See 'HELP JSON_MOD2' for examples. +## JSON_MOD2 + Examples: +``` + + > say json_mod(json(object, a,1,b,2), patch, json(object, a,42)) + You say, "{"a":43,"b":2}" + + > @set me=json:[json(object, foo, "bar", baz, 12345, fnord, json(array, 1, 2, 3))] + > say v(json) + You say, "{"foo": "bar", "baz": 12345, "fnord": [1,2,3]}" + > say json_mod(v(json), set, $.foo, false) + You say, "{"foo:false,"baz":12345,"fnord":[1,2,3]}" + > say json_mod(v(json), insert, $.quux, 1) + You say, "{"foo:"bar","baz":12345,"fnord":[1,2,3],"quux":1}" + > say json_mod(v(json), replace, $.quux, 1) + You say, "{"foo:"bar","baz":12345,"fnord":[1,2,3]}" + > say json_mod(v(json), remove, $.fnord) + You say, "{"foo":"bar","baz":12345}" + > say json_mod(json(array, json(object, id, 2), json(object, id, 1), sort, $.id) + You say, "[{"id":1},{"id":2}] +``` +## TESTLOCK() +`testlock(<key>, <victim>)` + + testlock() returns 1 if the `<victim>` would pass the lock defined in `<key>` as run by the caller, and 0 if it would fail. + + testlock() evaluates the lock from the caller's perspective. + + Example: +``` +think testlock(TYPE^PLAYER&FLAG^WIZARD, *Gandalf) +1 +think testlock(TYPE^PLAYER&FLAG^WIZARD, *Bilbo) +0 +Note: You can escape the first character of <key> using double back slashes, for example, to check if a player has an attribute named +FOO with a value of BAR +think testlock(\\+FOO:BAR,*Walker) +0 +``` + + + +### See Also +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [lock()](/reference/sharpmush-help/pennfunc/#lock) +- [elock()](/reference/sharpmush-help/pennfunc/#elock) +- [lockfilter()](/reference/sharpmush-help/pennfunc/#lockfilter) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +## TEXTFILE() +## TEXTENTRIES() +## TEXTSEARCH() +## DYNHELP() +`textfile(<type>, <entry>)` +`textentries(<type>, <pattern>[, <osep>])` +`textsearch(<type>, <pattern>[, <osep>])` + + textfile() returns the text of entries from cached text files (such as "help", "news", "events", etc.) All whitespace and newlines are included, so you may want to edit %r's and squish the result if you plan to use the text as a list of words rather than a display. + + textentries() returns any topic names which match the wildcard pattern `<pattern>`, with topic names separated by `<osep>`. These are the same topic names returned from "help `<pattern>`". + + textsearch() returns the names of all topics whose contents matches the given `<pattern>`, the same as "help/search `<pattern>`", with topic names separated by `<osep>`. + + Example: +``` +say textentries(help, ?who()) +You say, "CWHO() LWHO() MWHO() NWHO() XWHO() ZWHO()" +``` + + > say textsearch(help, pronouns, |) + You say, "1.6.0P0|GENDER|SEX" + + > say textfile(help, ln\(\)) + You say, " ln(`<number>`) + + Returns the natural log of `<number>`. + + +### See Also +- [log()](/reference/sharpmush-help/pennfunc/#log) + " + +### See Also +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +## TIME() +## UTCTIME() +`time()` +`time(<timezone>)` +`time(<dbref>)` + + time() gives you the current time on the MUSH. By default this is the time on the server the MUSH is running on, and not the time of the caller. + + With an argument, time() returns the time in the specified timezone, or in the timezone set in the specified object's TZ attribute; for more information, see [timezones](/reference/sharpmush-help/pennfunc/#timezones). + + utctime() is an alias for time(utc). + +Continued in HELP TIME2 +## TIME2 + Examples (Assuming the server is the USA's Pacific timezone): + + > think utctime() + Fri Mar 02 03:19:54 2012 + > think time(utc) + Fri Mar 02 03:19:54 2012 + > think time() + Thu Mar 01 19:19:54 2012 + > think time(-8) + Thu Mar 01 19:20:25 2012 + > think time(US/Pacific) + Thu Mar 01 19:20:25 2012 + + +### See Also +- [timefmt()](/reference/sharpmush-help/pennfunc/#timefmt) +- [timestring()](/reference/sharpmush-help/pennfunc/#timestring) +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [convtime()](/reference/sharpmush-help/pennfunc/#convtime) +- [TIMEZONES](/reference/sharpmush-help/pennfunc/#timezones) +## TIMECALC() +## SECSCALC() +`timecalc(<timestring>, <modifier>, ...)` +`secscalc(<timestring>, <modifier>, ...)` + + + Takes a time and returns the resulting time after applying any modifiers. timecalc() returns a time is the same format as time(), and secscalc() as the seconds since the epoch. These functions can deal with a much broader range of times than the other time functions. + + `<timestring>` can be in the following formats: + + YYYY-MM-DD + YYYY-MM-DD HH:MM + YYYY-MM-DD HH:MM:SS + YYYY-MM-DD HH:MM:SS.SSS + HH:MM + HH:MM:SS + HH:MM:SS.SSS + now (Current time in UTC) + DDDDDDDDDD (Julian day, or seconds if followed by a unixepoch modifier) + +Continued in HELP TIMECALC2 +## TIMECALC2 + `<modifier>`s can be in the following formats: + + NNN days + NNN hours + NNN minutes + NNN.NNNN seconds + NNN months + NNN years + start of month + start of year + start of day + weekday N + unixepoch + localtime (Converts a UTC time to local time) + utc (Converts a local time to UTC) + + For details about what these formats and modifers mean, see https://www.sqlite.org/lang_datefunc.html + + Examples: +``` +think timecalc(now, +100 years, localtime) +Mon May 09 03:57:31 2118 +think timecalc(secs(), unixepoch) +Wed May 09 12:19:21 2018 +``` +## TIMEZONES +## @TZ + + The time(), timefmt() and convsecs() functions have an optional time zone argument that's used for formatting the time. Without this time zone specified, the one the game's server is running under is used. + + If the time zone argument is a dbref, the contents of that object's @TZ attribute is used as the zone. The attribute is not evaluated. If the object doesn't have this attribute, the server's time zone will be used. + + If it's the string 'UTC', that time zone is used instead of the local one. If it's a number between -24 and +24, it adds that many hours from UTC/GMT. Fractional times are supported, e.g., -1.5 hours. + + If the MUSH supports it (See @config compile), symbolic time zone names can also be used. + + valid(timezone, `<tz>`) tests if `<tz>` can be used as a timezone. + + See HELP TIMEZONES2 for a list of known time zones and HELP TIME2 for some examples. +## TIMEZONES2 + This is a list of IANA time zones names as of version 2011n of their database. See http://www.iana.org/time-zones for more information and sources. + + Africa/Abidjan Africa/Accra + Africa/Addis_Ababa Africa/Algiers + Africa/Asmara Africa/Asmera + Africa/Bamako Africa/Bangui + Africa/Banjul Africa/Bissau + Africa/Blantyre Africa/Brazzaville + Africa/Bujumbura Africa/Cairo + Africa/Casablanca Africa/Ceuta + Africa/Conakry Africa/Dakar + Africa/Dar_es_Salaam Africa/Djibouti + Africa/Douala Africa/El_Aaiun + Africa/Freetown Africa/Gaborone + Africa/Harare Africa/Johannesburg + Africa/Juba Africa/Kampala + Africa/Khartoum Africa/Kigali + Africa/Kinshasa Africa/Lagos + Africa/Libreville Africa/Lome + Africa/Luanda Africa/Lubumbashi + Africa/Lusaka Africa/Malabo + Africa/Maputo Africa/Maseru + Africa/Mbabane Africa/Mogadishu + Africa/Monrovia Africa/Nairobi + Africa/Ndjamena Africa/Niamey + Africa/Nouakchott Africa/Ouagadougou + +Continued in HELP TIMEZONES3 +## TIMEZONES3 + Africa/Porto-Novo Africa/Sao_Tome + Africa/Timbuktu Africa/Tripoli + Africa/Tunis Africa/Windhoek + America/Adak America/Anchorage + America/Anguilla America/Antigua + America/Araguaina America/Argentina/Buenos_Aires + America/Argentina/Catamarca America/Argentina/ComodRivadavia + America/Argentina/Cordoba America/Argentina/Jujuy + America/Argentina/La_Rioja America/Argentina/Mendoza + America/Argentina/Rio_Gallegos America/Argentina/Salta + America/Argentina/San_Juan America/Argentina/San_Luis + America/Argentina/Tucuman America/Argentina/Ushuaia + America/Aruba America/Asuncion + America/Atikokan America/Atka + America/Bahia America/Bahia_Banderas + America/Barbados America/Belem + America/Belize America/Blanc-Sablon + America/Boa_Vista America/Bogota + America/Boise America/Buenos_Aires + America/Cambridge_Bay America/Campo_Grande + America/Cancun America/Caracas + America/Catamarca America/Cayenne + America/Cayman America/Chicago + America/Chihuahua America/Coral_Harbour + America/Cordoba America/Costa_Rica + +Continued in HELP TIMEZONES4 +## TIMEZONES4 + America/Cuiaba America/Curacao + America/Danmarkshavn America/Dawson + America/Dawson_Creek America/Denver + America/Detroit America/Dominica + America/Edmonton America/Eirunepe + America/El_Salvador America/Ensenada + America/Fort_Wayne America/Fortaleza + America/Glace_Bay America/Godthab + America/Goose_Bay America/Grand_Turk + America/Grenada America/Guadeloupe + America/Guatemala America/Guayaquil + America/Guyana America/Halifax + America/Havana America/Hermosillo + America/Indiana/Indianapolis America/Indiana/Knox + America/Indiana/Marengo America/Indiana/Petersburg + America/Indiana/Tell_City America/Indiana/Vevay + America/Indiana/Vincennes America/Indiana/Winamac + America/Indianapolis America/Inuvik + America/Iqaluit America/Jamaica + America/Jujuy America/Juneau + America/Kentucky/Louisville America/Kentucky/Monticello + America/Knox_IN America/Kralendijk + America/La_Paz America/Lima + America/Los_Angeles America/Louisville + America/Lower_Princes America/Maceio + +Continued in HELP TIMEZONES5 +## TIMEZONES5 + America/Managua America/Manaus + America/Marigot America/Martinique + America/Matamoros America/Mazatlan + America/Mendoza America/Menominee + America/Merida America/Metlakatla + America/Mexico_City America/Miquelon + America/Moncton America/Monterrey + America/Montevideo America/Montreal + America/Montserrat America/Nassau + America/New_York America/Nipigon + America/Nome America/Noronha + America/North_Dakota/Beulah America/North_Dakota/Center + America/North_Dakota/New_Salem America/Ojinaga + America/Panama America/Pangnirtung + America/Paramaribo America/Phoenix + America/Port-au-Prince America/Port_of_Spain + America/Porto_Acre America/Porto_Velho + America/Puerto_Rico America/Rainy_River + America/Rankin_Inlet America/Recife + America/Regina America/Resolute + America/Rio_Branco America/Rosario + America/Santa_Isabel America/Santarem + America/Santiago America/Santo_Domingo + America/Sao_Paulo America/Scoresbysund + America/Shiprock America/Sitka + +Continued in HELP TIMEZONES6 +## TIMEZONES6 + America/St_Barthelemy America/St_Johns + America/St_Kitts America/St_Lucia + America/St_Thomas America/St_Vincent + America/Swift_Current America/Tegucigalpa + America/Thule America/Thunder_Bay + America/Tijuana America/Toronto + America/Tortola America/Vancouver + America/Virgin America/Whitehorse + America/Winnipeg America/Yakutat + America/Yellowknife Antarctica/Casey + Antarctica/Davis Antarctica/DumontDUrville + Antarctica/Macquarie Antarctica/Mawson + Antarctica/McMurdo Antarctica/Palmer + Antarctica/Rothera Antarctica/South_Pole + Antarctica/Syowa Antarctica/Vostok + Arctic/Longyearbyen Asia/Aden + Asia/Almaty Asia/Amman + Asia/Anadyr Asia/Aqtau + Asia/Aqtobe Asia/Ashgabat + Asia/Ashkhabad Asia/Baghdad + Asia/Bahrain Asia/Baku + Asia/Bangkok Asia/Beirut + Asia/Bishkek Asia/Brunei + Asia/Calcutta Asia/Choibalsan + Asia/Chongqing Asia/Chungking + +Continued in HELP TIMEZONES7 +## TIMEZONES7 + Asia/Colombo Asia/Dacca + Asia/Damascus Asia/Dhaka + Asia/Dili Asia/Dubai + Asia/Dushanbe Asia/Gaza + Asia/Harbin Asia/Hebron + Asia/Ho_Chi_Minh Asia/Hong_Kong + Asia/Hovd Asia/Irkutsk + Asia/Istanbul Asia/Jakarta + Asia/Jayapura Asia/Jerusalem + Asia/Kabul Asia/Kamchatka + Asia/Karachi Asia/Kashgar + Asia/Kathmandu Asia/Katmandu + Asia/Kolkata Asia/Krasnoyarsk + Asia/Kuala_Lumpur Asia/Kuching + Asia/Kuwait Asia/Macao + Asia/Macau Asia/Magadan + Asia/Makassar Asia/Manila + Asia/Muscat Asia/Nicosia + Asia/Novokuznetsk Asia/Novosibirsk + Asia/Omsk Asia/Oral + Asia/Phnom_Penh Asia/Pontianak + Asia/Pyongyang Asia/Qatar + Asia/Qyzylorda Asia/Rangoon + Asia/Riyadh Asia/Riyadh87 + Asia/Riyadh88 Asia/Riyadh89 + +Continued in HELP TIMEZONES8 +## TIMEZONES8 + Asia/Saigon Asia/Sakhalin + Asia/Samarkand Asia/Seoul + Asia/Shanghai Asia/Singapore + Asia/Taipei Asia/Tashkent + Asia/Tbilisi Asia/Tehran + Asia/Tel_Aviv Asia/Thimbu + Asia/Thimphu Asia/Tokyo + Asia/Ujung_Pandang Asia/Ulaanbaatar + Asia/Ulan_Bator Asia/Urumqi + Asia/Vientiane Asia/Vladivostok + Asia/Yakutsk Asia/Yekaterinburg + Asia/Yerevan Atlantic/Azores + Atlantic/Bermuda Atlantic/Canary + Atlantic/Cape_Verde Atlantic/Faeroe + Atlantic/Faroe Atlantic/Jan_Mayen + Atlantic/Madeira Atlantic/Reykjavik + Atlantic/South_Georgia Atlantic/St_Helena + Atlantic/Stanley Australia/ACT + Australia/Adelaide Australia/Brisbane + Australia/Broken_Hill Australia/Canberra + Australia/Currie Australia/Darwin + Australia/Eucla Australia/Hobart + Australia/LHI Australia/Lindeman + Australia/Lord_Howe Australia/Melbourne + Australia/North Australia/NSW + +Continued in HELP TIMEZONES9 +## TIMEZONES9 + Australia/Perth Australia/Queensland + Australia/South Australia/Sydney + Australia/Tasmania Australia/Victoria + Australia/West Australia/Yancowinna + Brazil/Acre Brazil/DeNoronha + Brazil/East Brazil/West + Canada/Atlantic Canada/Central + Canada/East-Saskatchewan Canada/Eastern + Canada/Mountain Canada/Newfoundland + Canada/Pacific Canada/Saskatchewan + Canada/Yukon CET + Chile/Continental Chile/EasterIsland + CST6CDT Cuba + EET Egypt + Eire EST + EST5EDT Etc/GMT + Etc/GMT+0 Etc/GMT+1 + Etc/GMT+10 Etc/GMT+11 + Etc/GMT+12 Etc/GMT+2 + Etc/GMT+3 Etc/GMT+4 + Etc/GMT+5 Etc/GMT+6 + Etc/GMT+7 Etc/GMT+8 + Etc/GMT+9 Etc/GMT-0 + Etc/GMT-1 Etc/GMT-10 + Etc/GMT-11 Etc/GMT-12 + +Continued in HELP TIMEZONES10 +## TIMEZONES10 + Etc/GMT-13 Etc/GMT-14 + Etc/GMT-2 Etc/GMT-3 + Etc/GMT-4 Etc/GMT-5 + Etc/GMT-6 Etc/GMT-7 + Etc/GMT-8 Etc/GMT-9 + Etc/GMT0 Etc/Greenwich + Etc/UCT Etc/Universal + Etc/UTC Etc/Zulu + Europe/Amsterdam Europe/Andorra + Europe/Athens Europe/Belfast + Europe/Belgrade Europe/Berlin + Europe/Bratislava Europe/Brussels + Europe/Bucharest Europe/Budapest + Europe/Chisinau Europe/Copenhagen + Europe/Dublin Europe/Gibraltar + Europe/Guernsey Europe/Helsinki + Europe/Isle_of_Man Europe/Istanbul + Europe/Jersey Europe/Kaliningrad + Europe/Kiev Europe/Lisbon + Europe/Ljubljana Europe/London + Europe/Luxembourg Europe/Madrid + Europe/Malta Europe/Mariehamn + Europe/Minsk Europe/Monaco + Europe/Moscow Europe/Nicosia + Europe/Oslo Europe/Paris + +Continued in HELP TIMEZONES11 +## TIMEZONES11 + Europe/Podgorica Europe/Prague + Europe/Riga Europe/Rome + Europe/Samara Europe/San_Marino + Europe/Sarajevo Europe/Simferopol + Europe/Skopje Europe/Sofia + Europe/Stockholm Europe/Tallinn + Europe/Tirane Europe/Tiraspol + Europe/Uzhgorod Europe/Vaduz + Europe/Vatican Europe/Vienna + Europe/Vilnius Europe/Volgograd + Europe/Warsaw Europe/Zagreb + Europe/Zaporozhye Europe/Zurich + Factory GB + GB-Eire GMT + GMT+0 GMT-0 + GMT0 Greenwich + Hongkong HST + Iceland Indian/Antananarivo + Indian/Chagos Indian/Christmas + Indian/Cocos Indian/Comoro + Indian/Kerguelen Indian/Mahe + Indian/Maldives Indian/Mauritius + Indian/Mayotte Indian/Reunion + Iran Israel + Jamaica Japan + +Continued in HELP TIMEZONES12 +## TIMEZONES12 + Kwajalein Libya + MET Mexico/BajaNorte + Mexico/BajaSur Mexico/General + Mideast/Riyadh87 Mideast/Riyadh88 + Mideast/Riyadh89 MST + MST7MDT Navajo + NZ NZ-CHAT + Pacific/Apia Pacific/Auckland + Pacific/Chatham Pacific/Chuuk + Pacific/Easter Pacific/Efate + Pacific/Enderbury Pacific/Fakaofo + Pacific/Fiji Pacific/Funafuti + Pacific/Galapagos Pacific/Gambier + Pacific/Guadalcanal Pacific/Guam + Pacific/Honolulu Pacific/Johnston + Pacific/Kiritimati Pacific/Kosrae + Pacific/Kwajalein Pacific/Majuro + Pacific/Marquesas Pacific/Midway + Pacific/Nauru Pacific/Niue + Pacific/Norfolk Pacific/Noumea + Pacific/Pago_Pago Pacific/Palau + Pacific/Pitcairn Pacific/Pohnpei + Pacific/Ponape Pacific/Port_Moresby + Pacific/Rarotonga Pacific/Saipan + Pacific/Samoa Pacific/Tahiti + +Continued in HELP TIMEZONES13 +## TIMEZONES13 + Pacific/Tarawa Pacific/Tongatapu + Pacific/Truk Pacific/Wake + Pacific/Wallis Pacific/Yap + Poland Portugal + PRC PST8PDT + ROC ROK + Singapore Turkey + UCT Universal + US/Alaska US/Aleutian + US/Arizona US/Central + US/East-Indiana US/Eastern + US/Hawaii US/Indiana-Starke + US/Michigan US/Mountain + US/Pacific US/Pacific-New + US/Samoa UTC + W-SU WET + Zulu +## ETIME() +`etime(<seconds>[, <width>])` + + This function formats a number of seconds using the same rules as the 'On for' and 'Idle' columens in WHO's output. The optional `<width>` argument controls the maximum size of the returned string. + + The elapsed time is split into years, weeks, days, hours, minutes and seconds fields. As many non-zero fields as can fit into `<width>` characters are used, in that order. If all fields are 0, seconds are displayed. + + Examples: +``` +think etime(59) +59s +think etime(60) +1m +think etime(61) +1m 1s +think etime(61, 5) +1m +``` + + +### See Also +- [etimefmt()](/reference/sharpmush-help/pennfunc/#etimefmt) +- [timestring()](/reference/sharpmush-help/pennfunc/#timestring) +- [stringsecs()](/reference/sharpmush-help/pennfunc/#stringsecs) +## ETIMEFMT() +`etimefmt(<format>, <secs>)` + + This function is similar to timestring() - it formats a number of seconds into days, hours, minutes and seconds. However, its formatting is much more versatile than timestring(), as well as being more complex. + + Escape codes in `<format>` are replaced by the proper values, and other characters are left unchanged. + + A list of all codes is in [etimefmt2](/reference/sharpmush-help/pennfunc/#etimefmt2). + + Examples: +``` +say etimefmt(I have been connected for $2H:$2M., conn(%#)) +You say, "I have been connected for 01:32." +think etimefmt($2mm $2ss, 500) - [timestring(500)] +8m 20s - 8m 20s +``` + + +### See Also +- [timestring()](/reference/sharpmush-help/pennfunc/#timestring) +- [timefmt()](/reference/sharpmush-help/pennfunc/#timefmt) +- [etime()](/reference/sharpmush-help/pennfunc/#etime) +## ETIMEFMT2 + etimefmt()'s escape codes are similar to timefmt()'s. The time is broken up into days, hours, minutes, and seconds, and each value replaces the matching code. + + $s - The number of seconds. $h - The number of hours. + $m - The number of minutes. $d - The number of days. + $w - The number of weeks. $y - The number of 365-day years. + $$ - A literal $. + + You can also put a number between the $ and letter to specify a minimum width for the expanded code. The string is padded with spaces by default - use uppercase to pad with 0s instead ($3S, rather than $3s). An 'x' before the code (but after any number) will automatically add a d, h, m, or s suffix to the time, and a 'z' will not display anything if the field's value is 0. x and z can be combined. + + Normally, a particular time interval is shown using the remainder of the next largest interval - for example, $s with a time of 65 displays 5, not 65. The exception is $d, which only acts like this if $w or $y is also given. A 't' between the $ and code (But after a width) will print out the total seconds, minutes, etc. instead. + + See [etimefmt3](/reference/sharpmush-help/pennfunc/#etimefmt3) for more examples. +## ETIMEFMT3 + Examples: +``` +think etimefmt($2h:$2M, 3700) +1:01 +think etimefmt(You have $m minutes and $s seconds to go, 78) +You have 1 minutes and 18 seconds to go +think squish(etimefmt(Connected for $zxd $xzh $zxm $xzs, conn(me))) +Connected for 5h 24m 45s +think etimefmt($txs is $xm$xs, 75) +75s is 1m15s +``` +## TIMEFMT() +`timefmt(<format>[, <secs>[, <timezone>]])` + + This function returns the time and date, formatted according to `<format>`. `<secs>` is the time/date to format, as the number of seconds since the epoch (as returned by secs(), convtime(), etc). If no `<secs>` is given, the current date/time of the MUSH host is used. If no `<timezone>` is provided, the MUSH host's timezone is used; see [timezones](/reference/sharpmush-help/pennfunc/#timezones) for valid formats for `<timezone>`. Note: Using a fractional timezone offset from GMT may result in timefmt() showing the time zone name (if displayed) as GMT. Using a symbolic name on a server that supports them should show the name correctly. + + A list of all codes for `<format>` is in [timefmt2](/reference/sharpmush-help/pennfunc/#timefmt2). + + Example: +``` +think timefmt($A\, the $dth day of $B.) +Monday, the 17th day of July. +``` + + +### See Also +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [etimefmt()](/reference/sharpmush-help/pennfunc/#etimefmt) +- [timezones](/reference/sharpmush-help/pennfunc/#timezones) +## TIMEFMT2 + All escape codes start with a $. To get a literal $, use $$. Invalid codes will return #-1 INVALID ESCAPE CODE. Other text will be passed through unchanged. + + $a - Abbreviated weekday name $p - AM/PM ($P may also work) + $A - Full weekday name $S - Seconds after the minute + $b - Abbreviated month name $U - Week of the year from 1rst Sunday + $B - Full month name $w - Day of the week. 0 = Sunday + $c - Date and time $W - Week of the year from 1rst Monday + $d - Day of the month $x - Date + $H - Hour of the 24-hour day $X - Time + $I - Hour of the 12-hour day $y - Two-digit year + $j - Day of the year $Y - Four-digit year + $m - Month of the year $Z - Time zone + $M - Minutes after the hour $$ - $ character. +## TIMESTRING() +`timestring(<seconds>[, <pad flag>])` + + The timestring function takes a number of seconds as input and returns the amount of time formatted into days, hours, minutes, and seconds. If `<pad flag>` is 1, all time periods will be used even if the number of seconds is less than a day, hour, or minute. If `<pad flag>` is 2, all numbers will be 2 digits long. + + Examples: +``` +say timestring(301) +You say, " 5m 1s" +say timestring(301,1) +You say, "0d 0h 5m 1s" +say timestring(301,2) +You say, "00d 00h 05m 01s" +``` + + +### See Also +- [stringsecs()](/reference/sharpmush-help/pennfunc/#stringsecs) +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [etime()](/reference/sharpmush-help/pennfunc/#etime) +- [etimefmt()](/reference/sharpmush-help/pennfunc/#etimefmt) +## STRINGSECS() +`stringsecs(<timestring>)` + + The stringsecs() function takes a string of the form produced by timestring() or etime() and converts it back into seconds. + + Examples: +``` +say stringsecs(5m 1s) +You say, "301" +``` + + > say stringsecs(3y 2m 7d 5h 23m) + You say, "95232300" + + +### See Also +- [timestring()](/reference/sharpmush-help/pennfunc/#timestring) +- [etimefmt()](/reference/sharpmush-help/pennfunc/#etimefmt) +- [convtime()](/reference/sharpmush-help/pennfunc/#convtime) +- [etime()](/reference/sharpmush-help/pennfunc/#etime) +## TR() +`tr(<string>, <find>, <replace>)` + + This function translates every character in `<string>` that exists in `<find>` to the character at an identical position in `<replace>`. Ranges of characters separated by -'s are accepted. `<find>` and `<replace>` must be the same length after expansion of ranges. If a character exists more than once in `<find>`, only the last instance will be counted. The example below is the common ROT-13 algorithm for lower case strings, demonstrated with every letter explicitly listed, and with the equivalent but briefer character ranges. Literal -'s can be in `<find>` and `<replace>` if they are the first or last characters in the arguments. + + Examples: +``` +say tr(hello,abcdefghijklmnopqrstuvwxyz,nopqrstuvwxyzabcdefghijklm) +You say, "uryyb" +say tr(uryyb, a-z, n-za-m) +You say, "hello" +``` + + +### See Also +- [merge()](/reference/sharpmush-help/pennfunc/#merge) +- [splice()](/reference/sharpmush-help/pennfunc/#splice) +## TRIM() +## TRIMPENN() +## TRIMTINY() +`trim(<string>[, <characters to trim>[, <trim style>]])` +`trimpenn(<string>[, <characters to trim>[, <trim style>]])` +`trimtiny(<string>[, <trim style>[, <characters to trim>]])` + + trim() strips leading and/or trailing occurrences of each of the `<characters to trim>` from `<string>`. + + `<characters to trim>` defaults to a space. + + If no `<trim style>` is specified, characters are trimmed from both the left and right sides of the string. If the 'l' trim style is specified, characters are only trimmed from the left side. If the 'r' trim style is specified, characters are only trimmed from the right side. If the 'b' trim style is specified, or a style is omitted, characters are trimmed off of both sides of the string. + + Normally, the arguments for trim() are in the same order as trimpenn(). However, if the tiny_trim_fun @config option is on, the `<characters to trim>` and `<trim style>` arguments are reversed. Use trimpenn() or trimtiny() if you want to specify a particular argument sequence no matter how the option is set. + + Examples: +``` +say trim(%b%bfoo bar baz%b%b%beek%b%b) +You say, "foo bar baz eek" +say trim(***BLAM***,*) +You say, "BLAM" +say trim(-----> WOW <---,-,r) +You say, "-----> WOW <" +say trim(=~=~=~= Trim Test =~=~=~=,= ~) +You say "Trim Test" +``` + + +### See Also +- [squish()](/reference/sharpmush-help/pennfunc/#squish) +- [edit()](/reference/sharpmush-help/pennfunc/#edit) +## TRUNC() +## VAL() +`trunc(<string>)` + + This function truncates floating point numbers to integers. It can also be used to return the leading numeric prefix of a string. If `<string>` does not start with a number, 0 is returned. + + Examples: +``` +say trunc(3.141593) +You say, "3" +say trunc(101Dalmations) +You say, "101" +``` + + val() is an alias for trunc(). + + +### See Also +- [ceil()](/reference/sharpmush-help/pennfunc/#ceil) +- [floor()](/reference/sharpmush-help/pennfunc/#floor) +- [bound()](/reference/sharpmush-help/pennfunc/#bound) +- [round()](/reference/sharpmush-help/pennfunc/#round) +- [left()](/reference/sharpmush-help/pennfunc/#left) +## TYPE() +`type(<object>)` + + This function returns the type of an object - one of PLAYER, THING, EXIT, ROOM or GARBAGE - or #-1 if the object can't be found. + + Examples: +``` +@create Test +think type(Test) +THING +think type(me) +PLAYER +think type(here) +ROOM +``` + + +### See Also +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [TYPES OF OBJECTS](/reference/sharpmush-help/penntop/#types-of-objects) +## PFUN() +`pfun(<attribute>[, <arg0>[, ... , <arg29>]])` + + This function evaluates `<attribute>` from the caller's @parent, passing up to 30 `<arg>`s as %0-%9 and v(10)-v(29). When the caller doesn't have an `<attribute>` attribute set, this is the same as + +`ufun(me/<attribute>[, <args>])` + + It differs from ufun() when the caller does have the attribute set - pfun() will ignore the attribute on the child, and evaluate the attribute as it would be inherited from the parent. + + Example: +``` +@create ParentObject +@parent me=ParentObject +&foo me=ChildFoo +&foo ParentObject=ParentFoo +think ufun(me/foo) +ChildFoo +think pfun(foo) +ParentFoo +``` + + See [pfun2](/reference/sharpmush-help/pennfunc/#pfun2). +## PFUN2 + This function does not have the security problems of using + +`ufun(parent(me)/<attribute>)` + + as the attribute is inherited (and evaluated by you, not the parent) - you don't need to be able to examine the parent object, and safer_ufun does not stop the evaluation. Note that no_inherit attribute flags are still checked, as with normal attribute inheritence. + + This function is particularly useful when you want to inherit an attribute tree from a parent, but add further branches. + + See [pfun3](/reference/sharpmush-help/pennfunc/#pfun3) for an example. + + +### See Also +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [parent()](/reference/sharpmush-help/pennfunc/#parent) +- [zfun()](/reference/sharpmush-help/pennfunc/#zfun) +- [PARENTS](/reference/sharpmush-help/penntop/#parents) +## PFUN3 + Example: + + > &root Parent=ParentRoot + > &root`foo parent=ParentRoot`foo + > think ufun(me/root) / [ufun(me/root`foo)] + ParentRoot / ParentRoot`foo + > &root`bar me=ChildRoot`bar + > think ufun(me/root) / [ufun(me/root`foo)] + / ParentRoot`foo + + Setting a ROOT`FOO attribute on the child automatically creates an empty ROOT attribute, which blocks the inherited ROOT attribute. The pfun() function allows you to get around this: + + > &root me=pfun(root) + > think ufun(me/root) / [ufun(me/root`foo)] / [ufun(me/root`bar)] + ParentRoot / ParentRoot`foo / ChildRoot`bar + + Good for inherited @chatformats which use CHATFORMAT``<channel>` leaf attrs to store channel-specific formats and the like. +## U() +## UFUN() +## ULAMBDA() +`ufun([<object>/]<attribute>[, <arg0>[, ... , <arg29>]])` +`ulambda([<object>/]<attribute>[, <arg0>[, ... , <arg29>]])` + + ufun() evaluates `<attribute>` on `<object>` (or on the caller, if no `<object>` is given), and returns the result. Up to 30 `<arg>`s can be passed, available to the attribute as %0, %1, up to %9, and v(10) to v(29). This can be used to create "user defined functions". + + u() is an alias for ufun(), for TinyMUSH compatability. + + ulambda() is the same, but accepts anonymous attributes. See [lambda](/reference/sharpmush-help/penntop/#lambda). + + See [ufun2](/reference/sharpmush-help/pennfunc/#ufun2). +## U2 +## UFUN2 + The attribute is evaluated by the object it's set on, with that object's priviledges, and NOT by the object using ufun(). Because of this, allowing arbitrary use of ufun() can be insecure. + + You must be able to examine an attribute to ufun() it. If the safer_ufun @config option is on, you must also have equal priviliges (in terms of mortal/Royalty/Wizard/God) to the object the attribute is on. However, attributes with the 'public' flag on can be evaluated by anyone. This is necessary for attributes like 'describe', but should not be set on attributes containing code unless you're sure it's safe for anyone to use them. + + See [ufun3](/reference/sharpmush-help/pennfunc/#ufun3). +## U3 +## UFUN3 + Example: +``` +&testcmd Object=$test *: say ufun(testfun, %0); @emit %0 +&testfun object=[strlen(%0)] [ucstr(%0)] +test string +Object says, "6 STRING" +string +``` + + A user-defined function may be as complex as you want it to be, subject to limits on recursion depth, number of function invocations, or cpu time that may be configured in the MUSH. + + +### See Also +- [anonymous attributes](/reference/sharpmush-help/penntop/#anonymous-attributes) +- [udefault()](/reference/sharpmush-help/pennfunc/#udefault) +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [ulocal()](/reference/sharpmush-help/pennfunc/#ulocal) +- [pfun()](/reference/sharpmush-help/pennfunc/#pfun) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) +- [@include](/reference/sharpmush-help/penncmd/#include) +## UCSTR() +## UCSTR2() +`ucstr(<string>)` +`ucstr2(<string>)` + + Returns `<string>` with all letters converted to uppercase. + + If the MUSH is compiled with ICU Unicode support, ucstr2() does the same thing except the returned string might be a different length, and ansi colors and other markup are stripped. + + Example: +``` +say ucstr(Foo BAR baz) +You say, "FOO BAR BAZ" +say ucstr2(grüßen) +You say, "GRÜSSEN +``` + + +### See Also +- [lcstr()](/reference/sharpmush-help/pennfunc/#lcstr) +- [capstr()](/reference/sharpmush-help/pennfunc/#capstr) +## UDEFAULT() +## ULDEFAULT() +`udefault([<object>/]<attribute>, <default case>[, <arg0>[, ... , <arg29>]])` +`uldefault([<object>/]<attribute>, <default case>[, <arg0>[, ... <arg29>]])` + + If the given `<attribute>` on `<object>` (or the caller, if no `<object>` is given) can be read, the attribute is evaluated, and the result returned. Up to thirty `<arg>`s can be passed to the attribute, as per ufun(). + + If the attribute cannot be read, `<default case>` is evaluated and returned instead. The `<default case>` is not evaluated if the attribute exists. + + uldefault() saves the global q-registers (%q0-%q9, %qa-%qz, etc) before evaluation, and restores them afterwards, as per ulocal(). + + Examples: +``` +&TEST me=center(%0,5,*) +say udefault(Test,-- BOOM --,ACK) +You say "*ACK*" +&TEST me +say udefault(me/Test,-- BOOM --,ACK) +You say "-- BOOM --" +``` + + +### See Also +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [eval()](/reference/sharpmush-help/pennfunc/#eval) +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [default()](/reference/sharpmush-help/pennfunc/#default) +- [edefault()](/reference/sharpmush-help/pennfunc/#edefault) +- [ulocal()](/reference/sharpmush-help/pennfunc/#ulocal) +- [localize()](/reference/sharpmush-help/pennfunc/#localize) +## ULOCAL() +`ulocal([<object>/]<attribute>[, <arg0>[, ... , <arg29>]])` + + The ulocal() function is similar to ufun(); it evaluates `<attribute>` on `<object>` (or the caller, if no `<object>` is given), passing up to thirty `<arg>`s. However, before evaluating the attribute, ulocal() stores all the global q-registers (%q0-%q9, %qa-%qz), in the same way as the localize() function, and restores them after the attribute is evaluated. It's useful when you need to evaluate an attribute on an untrusted object which might alter the values of the registers. + + See [ulocal2](/reference/sharpmush-help/pennfunc/#ulocal2) for examples. +## ULOCAL2 + Examples: +``` +&FRUIT me=apples bananas oranges pears +&SUB-FUNCTION me=setq(0,v(FRUIT))[extract(%q0,match(%q0,%0),1)] +&TOP-FUNCTION me=setq(0,are delicious!)[ulocal(SUB-FUNCTION,%0)] %q0 +say u(TOP-FUNCTION,b*) +You say "bananas are delicious!" +``` + + If SUB-FUNCTION had been called with u() instead of ulocal(): + > &TOP-FUNCTION me=setq(0,are delicious!)[u(SUB-FUNCTION,%0)] %q0 + > say u(TOP-FUNCTION,b*) + You say "bananas apples bananas oranges pears" + + In this second example, in SUB-FUNCTION, %q0 was set to "apples bananas oranges pears", so that when the u() "returned" and TOP-FUNCTION evaluated %q0, this is what was printed. In the first example, ulocal() reset the value of %q0 to its original "are delicious!" + + +### See Also +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [localize()](/reference/sharpmush-help/pennfunc/#localize) +## UNIQUE() +`unique(<list>[, <sort type>[, <delim>[, <osep>]]])` + + unique() returns a copy of `<list>` with consecutive duplicate items removed. It does not sort the list. The optional `<sort type>` describes what type of data is in the list; see [sorting](/reference/sharpmush-help/pennfunc/#sorting) for details. If no type is given, the elements are compared as strings. Elements of `<list>` are separated by `<delim>`, which defaults to a space. Each element of the output is separated by `<osep>`, which defaults to `<delim>`. + + Examples: +``` +think unique(a b b c b) +a b c b +think unique(1 2 2.0 3, f) +1 2 3 +think unique(1|2|3|3, n, |, _) +1_2_3 +``` + + +### See Also +- [setunion()](/reference/sharpmush-help/pennfunc/#setunion) +- [sort()](/reference/sharpmush-help/pennfunc/#sort) +## V() +## V-FUNCTION +`v(<variable>)` +`v(<integer>)` +`v(<attribute>)` + + The first form of this function returns the value of the `<variable>` %-sub. In most cases, using the %-sub is preferable. Not all %-subs are accessible this way; only the following `<variable>`s are valid: + + 0-9, #, @, !, n, l, and c. + + Unlike %-subs, the v() function is not case-sensitive: v(n) and v(N) are both equivilent to %n (whereas %N is equivilent to [capstr(%n)]). + + v() can also return the value of stack registers. v(0) is equivilent to %0, but v() can return up to 30 registers (v(0) through v(29)). Calling v() with an integer arg that is not between 0 and 29 (inclusive) will return an out-of-range error. + + The final form of this function is equivilent to get(me/`<attribute>`), but is usually slightly more efficient. + + +### See Also +- [STACK](/reference/sharpmush-help/penntop/#stack) +- [REGISTERS](/reference/sharpmush-help/penntop/#registers) +- [SUBSTITUTIONS](/reference/sharpmush-help/penntop/#substitutions) +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +## VADD() +`vadd(<vector1>, <vector2>[, <delimiter>])` + + Returns the sum of two vectors. A vector is a list of numbers separated by spaces or `<delimiter>`. + + > think vadd(1 2 3, 4 5 6) + 5 7 9 + > think vadd(0|0|0, 1|2|3, |) + 1|2|3 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VALID() +`valid(<category>, <string>[, <target>])` + + The valid() function checks to see if `<string>` can be used as a valid `<category>`, and returns 1 if so, 0 if not, and #-1 if an invalid category is used. For some categories, a `<target>` can be given to make the check more specific. + + The categories are: + name Test for a valid object name. + attrname Test for a valid attribute name. + attrvalue Test if `<string>` is a valid value for the attribute `<target>`. Meaningful for standard attributes with @attrib/enum or /limit. + playername Test if `<target>` could @name himself to `<string>`. `<target>` defaults to the caller. + password Test for a valid password. + command Test for a valid command name for @command/add. + function Test for a valid function name for @function. + flag Test for a valid flag/power name for @flag/add and @power/add + qreg Test for a valid name for a q-register. + colorname Test for a valid color name for ansi()/colors(). + ansicodes Test for a valid color code sequence for ansi(`<string>`, ...). + channel Test for a valid channel name. If `<target>` is given, check to see if channel `<target>` could be renamed to `<string>`. + timezone Test for a valid timezone; see [timezones](/reference/sharpmush-help/pennfunc/#timezones) + locktype Test for a valid locktype for @lock/`<string>` `<target>`. `<target>` defaults to the caller. + lockkey Test for a valid lockkey for @lock me=`<string>` + + Note that, for "playername", valid() returns 0 if the name is valid but currently in use by a player other than `<target>`. + + For "ansicodes", when not using new-style color names or hex codes, valid() always returns 1, and invalid codes are simply ignored, the same as when used in the ansi() function. + + See [valid2](/reference/sharpmush-help/pennfunc/#valid2) for examples. + +### See Also +- [colors()](/reference/sharpmush-help/pennfunc/#colors) +- [ansi()](/reference/sharpmush-help/pennfunc/#ansi) +## valid2 + + > think valid(name,Foobar) + 1 + > think valid(attrname,Foo bar) + 0 + + A player can change his own name to a variation of his current name, but other players cannot: + > think pmatch(Foobar)/%# + #3/#4 + > think valid(playername, FOOBAR) + 0 + > think valid(playername, FOOBAR, #3) + 1 + +## VCROSS() +`vcross(<vector1>, <vector2>[, <delimiter>])` + + Returns the 3-dimensional vector that is the cross product of its 3-dimensional argument vectors. The cross product is defined as: + + x = Ay * Bz - By * Az + y = Az * Bx - Bz * Ax + z = Ax * By - Bx * Ay + + > think vcross(4 5 6, 7 8 9) + -3 6 -3 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VDIM() +`vdim(<vector>[, <delimiter>])` + + Returns the dimensionality of a vector. + + > think vdim(1 2 3 4) + 4 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VDOT() +`vdot(<vector1>, <vector2>[, <delimiter>])` + + Returns the dot product of two vectors. A dot product is the sum of the products of the corresponding elements of the two vectors, e.g. vdot(a b c,d e f) = ad + be + cf. The vectors must be of the same length. + + > think vdot(1 2 3, 2 3 4) + 20 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VMIN() +`vmin(<vector1>, <vector2>[, <delimiter>])` + + Returns a new vector made out of the minimums of each corresponding pair of numbers from the two vectors. The vectors must be of the same length. + + > think vmin(1 2 3, 4 1 2) + 1 1 2 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VMAX() +`vmax(<vector1>, <vector2>[, <delimiter>])` + + Returns a new vector made out of the maximums of each corresponding pair of numbers from the two vectors. The vectors must be of the same length. + + > think vmax(1 2 3, 4 1 2) + 4 2 3 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VERSION() +## NUMVERSION() +`version()` +`numversion()` + + version() returns a string which contains various version information for the MUSH you're on. numversion() returns an integer representation of the version/patchlevel which can be used for softcode comparison. + + Example: +``` +say version() +You say "PennMUSH version 1.8.1 patchlevel 4 [12/06/2005]" +say numversion() +You say "1008001004" +``` + + > say version() + You say, "PennMUSH version 1.8.5 patchlevel 7 [03/16/2015] (rev ebdea0a)" + > say numversion() + You say, "1008005007" + + +### See Also +- [@version](/reference/sharpmush-help/penncmd/#version) +## VISIBLE() +`visible(<object>, <victim>[/<attribute>])` + + If no attribute name is provided, this function returns 1 if `<object>` can examine `<victim>`, or 0, if it cannot. If an attribute name is given, the function returns 1 if `<object>` can see the attribute `<attribute>` on `<victim>`, or 0, if it cannot. + + If `<object>`, `<victim>`, or `<attribute>` is invalid, the function returns 0. + + +### See Also +- [controls()](/reference/sharpmush-help/pennfunc/#controls) +- [VISUAL](/reference/sharpmush-help/pennflag/#visual) +## VMAG() +`vmag(<vector>[, <delimiter>])` + + Returns the magnitude of a vector, using a Euclidean distance metric. That is, for vector a b c d, returns sqrt(a^2+b^2+c^2+d^2). + + > think vmag(3 4) + 5 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VMUL() +`vmul(<vector1|number1>, <vector2|number2>[, <delimiter>])` + + Returns the result of either multiplying a vector by a number, or the element-wise product of two vectors. The element-wise product of a b c by w x z is aw bx cz + + > think vmul(1 2 3, 2) + 2 4 6 + > think vmul(1 2 3, 2 3 4) + 2 6 12 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VSUB() +`vsub(<vector1>, <vector2>[, <delimiter>])` + + Returns the difference between two vectors. + + > think vsub(3 4 5, 3 2 1) + 0 2 4 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## VUNIT() +`vunit(<vector>[, <delimiter>])` + + Returns the unit vector (a vector of magnitude 1), which points in the same direction as the given vector. + + > think vunit(2 0 0) + 1 0 0 + > think vmul(vunit(5 6 7), vmag(5 6 7)) + 5 6 7 + + +### See Also +- [VECTOR FUNCTIONS](/reference/sharpmush-help/pennfunc/#vector-functions) +## WIDTH() +## HEIGHT() +## SCREENWIDTH +## SCREENHEIGHT +`width(<player|descriptor>[, <default>])` +`height(<player|descriptor>[, <default>])` + + These two functions return the screen width and height for a connected player. If the player's client is capable of doing so, it will let the mush know what the correct sizes are on connection and when the client is resized. + + The defaults are 78 for width, and 24 for height, the normal minimal values. These can be overridden when calling the function by providing the default to the function. Players can change the value that will be returned when the functions are called on them with the special SCREENWIDTH and SCREENHEIGHT commands, both of which take a number as their sole argument, and set the appropriate field. + + When used on something that's not a visible player, the functions return the default values. + + The intent of these functions is allow softcode that does formatting to be able to produce a display that can make full use of any given screen size. +## WHERE() +`where(<object>)` + + This function returns the "true" location of an object. This is the standard location (i.e. where the object is) for things and players, the source room for exits, and #-1 for rooms. + + In other words, the "true" location of an object is where it is linked into the database. For example, an exit appears in the room of its "home", not its "location" (the LOC() function on an exit + will return the latter). A room's "real" location is always Nothing (the LOC() function will return its drop-to). + + +### See Also +- [room()](/reference/sharpmush-help/pennfunc/#room) +- [loc()](/reference/sharpmush-help/pennfunc/#loc) +- [rnum()](/reference/sharpmush-help/pennfunc/#rnum) +- [locate()](/reference/sharpmush-help/pennfunc/#locate) +- [home()](/reference/sharpmush-help/pennfunc/#home) +- [@whereis](/reference/sharpmush-help/penncmd/#whereis) +## WIPE() +`wipe(<object>[/<attribute pattern>])` + + This function is equivalent to @wipe, and attempts to wipe all the attributes on `<object>` whose names match `<attribute pattern>`, or "*" if no pattern is given. It returns nothing. Like @wipe, this function will destroy entire attribute trees; to safely remove a single attribute, use attrib_set() instead. + + +### See Also +- [@wipe](/reference/sharpmush-help/penncmd/#wipe) +- [attrib_set()](/reference/sharpmush-help/pennfunc/#attribset) +- [set()](/reference/sharpmush-help/pennfunc/#set) +## WORDPOS() +`wordpos(<list>, <number>[, <delimiter>])` + + Returns the number of the word within `<list>` where the `<number>`th character falls. Characters and words are numbered starting with 1, and `<delimiter>`s between words are treated as belonging to the word that follows them. If the list is less than `<number>` characters long, #-1 is returned. `<delimiter>` defaults to a space. + + Example: +``` +say wordpos(foo bar baz, 5) +You say, "2" +``` + + +### See Also +- [member()](/reference/sharpmush-help/pennfunc/#member) +- [pos()](/reference/sharpmush-help/pennfunc/#pos) +## WORDS() +`words(<list>[, <delimiter>])` + + words() returns the number of elements in `<list>`. Elements of `<list>` are separated by `<delimiter>`, which defaults to a space. + + When the `<delimiter>` is a space, empty elements are not counted. + + Examples: +``` +think words(1 2%b%b3, %b) +3 +``` + + > think words(1|2||3, |) + 4 + + +### See Also +- [strlen()](/reference/sharpmush-help/pennfunc/#strlen) +- [items()](/reference/sharpmush-help/pennfunc/#items) +## WRAP() +`wrap(<string>, <width>[, <first line width>[, <line separator>]])` + + This function takes `<string>` and splits it into lines containing no more than `<width>` characters each. If `<first line width>` is given, the first line may have a different width. If `<line separator>` is given, it is inserted between each line; by default the separator is a newline (%r). + + Examples: +``` +@desc here=wrap(Wrapped paragraph, 72) +@desc here=wrap([space(4)]Indented paragraph, 72) +@desc here=iter(wrap(Hanging indent, 72, 76, %r), switch(#@, >1, space(4))%i0, %r, %r) +``` +## XATTR() +## XATTRP() +## REGXATTR() +## REGXATTRP() +`xattr(<object>[/<attribute pattern>], <start>, <count>[, <osep>])` +`xattrp(<object>[/<attribute pattern>], <start>, <count>[, <osep>])` +`regxattr(<object>[/<regexp>], <start>, <count>[, <osep>])` +`regxattrp(<object>[/<regexp>], <start>, <count>[, <osep>])` + + xattr() fetches `<count>` or fewer attribute names from `<object>` starting at position `<start>`. It is useful when the number of attributes on an object causes lattr() to exceed the buffer limit. The resulting list is separated by `<osep>`, which defaults to a space. `<start>` begins at 1. + + It is equivalent to +`extract(lattr(<object>[/<attribute pattern>]), <start>, <count>, <osep>)` + + `<attribute pattern>` is a wildcard pattern which defaults to "*"; use "**" to get all attributes, including leaf attributes in trees. regxattr() matches attributes against the regular expression `<regexp>`. + + xattrp() and regxattrp() will include attributes from parents. Do note that parent attributes are listed _after_ child attributes, not sorted alphabetically. + + +### See Also +- [nattr()](/reference/sharpmush-help/pennfunc/#nattr) +- [lattr()](/reference/sharpmush-help/pennfunc/#lattr) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +- [REGEXPS](/reference/sharpmush-help/penntop/#regexps) +## XOR() +`xor(<boolean1>, <boolean2>[, ... , <booleanN>])` + + Takes two or more booleans and returns a 1 if one, and only one, of the inputs is equivalent to true(1). + + +### See Also +- [BOOLEAN VALUES](/reference/sharpmush-help/penntop/#boolean-values) +- [and()](/reference/sharpmush-help/pennfunc/#and) +- [or()](/reference/sharpmush-help/pennfunc/#or) +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [nor()](/reference/sharpmush-help/pennfunc/#nor) +- [lmath()](/reference/sharpmush-help/pennfunc/#lmath) +## XVCON() +## XCON() +`xcon(<object>, <start>, <count>)` +`xvcon(<object>, <start>, <count>)` + + xcon() fetches `<count>` or fewer item dbrefs from `<object>`'s contents starting at position `<start>`. It is useful when the number of objects in a container causes lcon() to exceed the buffer limit. + + It is equivalent to extract(lcon(`<object>`), `<start>`, `<count>`) + + xvcon() is identical, but follows the restrictions of lvcon(). + + +### See Also +- [ncon()](/reference/sharpmush-help/pennfunc/#ncon) +- [lcon()](/reference/sharpmush-help/pennfunc/#lcon) +- [lvcon()](/reference/sharpmush-help/pennfunc/#lvcon) +## XVEXITS() +## XEXITS() +`xexits(<room>, <start>, <count>)` +`xvexits(<room>, <start>, <count>)` + + xexits() fetches `<count>` or fewer exit dbrefs from `<room>` starting at position `<start>`. It is useful when the number of exits in a container causes lexits() to exceed the buffer limit. + + It is equivalent to extract(lexits(`<room>`), `<start>`, `<count>`) + + xvexits() is identical, but follows the restrictions of lvexits(). + + +### See Also +- [nexits()](/reference/sharpmush-help/pennfunc/#nexits) +- [lexits()](/reference/sharpmush-help/pennfunc/#lexits) +- [lvexits()](/reference/sharpmush-help/pennfunc/#lvexits) +## XVPLAYERS() +## XPLAYERS() +`xplayers(<object>, <start>, <count>)` +`xvplayers(<object>, <start>, <count>)` + + xplayers() fetches `<count>` or fewer player dbrefs from `<object>`'s contents starting at position `<start>`. It is useful when the number of players in a container causes lplayers() to exceed the buffer limit. It is equivalent to + +`extract(lplayers(<object>), <start>, <count>)` + + xvplayers() is identical, but follows the restrictions of lvplayers(). + + +### See Also +- [nplayers()](/reference/sharpmush-help/pennfunc/#nplayers) +- [lplayers()](/reference/sharpmush-help/pennfunc/#lplayers) +- [lvplayers()](/reference/sharpmush-help/pennfunc/#lvplayers) +- [xthings()](/reference/sharpmush-help/pennfunc/#xthings) +- [xexits()](/reference/sharpmush-help/pennfunc/#xexits) +## XVTHINGS() +## XTHINGS() +`xthings(<object>, <start>, <count>)` +`xvthings(<object>, <start>, <count>)` + + xthings() fetches `<count>` or fewer non-player dbrefs from `<object>`'s contents starting at position `<start>`. It is useful when the number of things in a container causes lthings() to exceed the buffer limit. It is equivalent to: + +`extract(lthings(<object>), <start>, <count>)` + + xvthings() is identical, except it follows the restrictions of lvthings(). + + +### See Also +- [nthings()](/reference/sharpmush-help/pennfunc/#nthings) +- [lthings()](/reference/sharpmush-help/pennfunc/#lthings) +- [lvthings()](/reference/sharpmush-help/pennfunc/#lvthings) +- [xplayers()](/reference/sharpmush-help/pennfunc/#xplayers) +- [xexits()](/reference/sharpmush-help/pennfunc/#xexits) +## XWHO() +## XWHOID() +## XMWHO() +## XMWHOID() +`xwho([<looker>, ]<start>, <count>)` +`xmwho(<start>, <count>)` +`xwhoid([<looker>, ]<start>, <count>)` +`xmwhoid(<start>, <count>)` + + xwho() fetches `<count>` or fewer player dbrefs from the list of connected players, starting at position `<start>`. It is useful when the number of players connected causes lwho() or pemits in +who $-commands to exceed buffer limits. If a `<looker>` is given, only includes players who `<looker>` can see are online. It is equivalent to: + +`extract(lwho([<looker>]), <start>, <count>)` + + xmwho() does not include hidden players (like mwho()). + + xwhoid() and xmwhoid() return objids instead of dbrefs. + + +### See Also +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [mwho()](/reference/sharpmush-help/pennfunc/#mwho) +- [nwho()](/reference/sharpmush-help/pennfunc/#nwho) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +## ZWHO() +## ZMWHO() +`zwho(<object>[, <viewer>])` +`zmwho(<object>)` + + These functions return the dbrefs of all currently-connected players in locations @chzone'd to `<object>`. zmwho() does not include hidden players, while zwho() returns all players that the caller can see are online. You must be See_All or pass `<object>`'s @lock/zone to use these functions. + + See_All players can pass a `<viewer>` argument to zwho() to get only those players that `<viewer>` can see is online. + + +### See Also +- [lwho()](/reference/sharpmush-help/pennfunc/#lwho) +- [nwho()](/reference/sharpmush-help/pennfunc/#nwho) +- [zone()](/reference/sharpmush-help/pennfunc/#zone) +- [zfun()](/reference/sharpmush-help/pennfunc/#zfun) +- [zemit()](/reference/sharpmush-help/pennfunc/#zemit) +## ZEMIT() +## NSZEMIT() +`zemit(<zone>, <message>)` +`nszemit(<zone>, <message>)` + + zemit() emits `<message>` in every room @chzone'd to `<zone>`, as per @zemit. + + nszemit() works like @nszemit. + + +### See Also +- [@zemit](/reference/sharpmush-help/penncmd/#zemit) +- [zone()](/reference/sharpmush-help/pennfunc/#zone) +- [zfun()](/reference/sharpmush-help/pennfunc/#zfun) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +## ZFUN() +`zfun(<attribute>[, <arg0>[, <arg1>[, ... , <arg29>]]])` + + This function evaluates an attribute on the caller's Zone object. It is essentially identical to + +`ufun(zone(me)/<attribute>[, <arg0>[, ... , <arg29>]])` + + +### See Also +- [ufun()](/reference/sharpmush-help/pennfunc/#ufun) +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [zone()](/reference/sharpmush-help/pennfunc/#zone) +- [zemit()](/reference/sharpmush-help/pennfunc/#zemit) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +## ZONE() +`zone(<object>[, <new zone>])` + + Returns `<object>`'s zone, or #-1 if it has no zone. You must be able to examine the object; if you can't, zone() returns #-1. + + If a `<new zone>` is given, zone() attempts to change the zone of `<object>` to `<new zone>` first - see help @chzone for details. + + +### See Also +- [@chzone](/reference/sharpmush-help/penncmd/#chzone) +- [zfun()](/reference/sharpmush-help/pennfunc/#zfun) +- [zwho()](/reference/sharpmush-help/pennfunc/#zwho) +- [zemit() ZONES] +## UPTIME() +`UPTIME([<type>])` + + This function returns the time, as a number of seconds, that something happend (or will happen). Exactly what is returned depends on the given `<type>`, which should be one of: + + upsince - The time the MUSH was started. This is the default. + reboot - The time the MUSH was last rebooted. + save - The time the MUSH last saved, or -1 if it hasn't. + nextsave - The time of the next automatic save. + dbck - The time of the next automatic dbck. + purge - The time of the next automatic purge. + warnings - The time of the next automatic warnings check, or -1 if automated warnings are disabled. + + +### See Also +- [@uptime](/reference/sharpmush-help/penncmd/#uptime) +- [secs()](/reference/sharpmush-help/pennfunc/#secs) +- [convsecs()](/reference/sharpmush-help/pennfunc/#convsecs) +- [time()](/reference/sharpmush-help/pennfunc/#time) +- [starttime()](/reference/sharpmush-help/pennfunc/#starttime) +- [restarttime()](/reference/sharpmush-help/pennfunc/#restarttime) +- [restarts()](/reference/sharpmush-help/pennfunc/#restarts) +- [@dbck](/reference/sharpmush-help/penncmd/#dbck) +- [@purge](/reference/sharpmush-help/penncmd/#purge) +- [@warnings](/reference/sharpmush-help/penncmd/#warnings) +- [@config](/reference/sharpmush-help/penncmd/#config) +- [@dump](/reference/sharpmush-help/penncmd/#dump) +- [@shutdown](/reference/sharpmush-help/penncmd/#shutdown) +## SUGGEST() +`SUGGEST(<category>, <word>[, <seperator>[, <limit>]])` + + Returns a list of suggested alternatives to `<word>` from vocabulary words known in the given `<category>`. `<seperator>` defaults to space. `<limit>` controls how many suggestions are returned, and defaults to 20. + + This is the same mechanism used to suggest help entries, function names, etc. when an unknown one is encountered. + + If the dict_file @config option is set, loads that file into the 'words' category. + + Example: +``` +think suggest(words, ardvark) +AARDVARK AARDVARKS AARDVARK'S etc... +``` + + +### See Also +- [@suggest](/reference/sharpmush-help/penncmd/#suggest) +## CONNLOG() +`CONNLOG(all|[not] logged in|<name>, <spec>...[, <osep>])` + + If connection tracking is enabled, this Wizard-only returns a list of connections that match the given `<spec>`. The format of the list elements is '`<dbref>` `<unique-id>`', with elements seperated by `<osep>` (defaulting to |). `<unique-id>` is an identifier that can be used to get more information from the connection with connrecord(). + + If the first argument is 'all', all connections are returned. If it's 'logged in', all connections that are logged in to players are returned. 'not logged in' shows connections that never logged in. Otherwise, only connections for the given player are returned. If a connection that never logged in is returned, the dbref is #-1 for that record. + + This function must be enabled (by the use_connlog @config option); if disabled, it returns #-1. + + See [connlog2](/reference/sharpmush-help/pennfunc/#connlog2). +## CONNLOG2 + `<spec>` is one or more of the following: + + Time-based constraints: + * between, `<startsecs>`, `<endsecs>` - connections that existed during the given time frame. + * at, `<secs>` - connections that existed at the given time. + * before, `<secs>` - connections that existed before the given time. + * after, `<secs>` - connections that existed after the given time. + Only one time-based constraints can be used in a query. All times are the number of seconds since the epoch, as returned by secs(). + + Source-based constraits: + * ip, `<pattern>` - connections from IP addresses that match the wildcard `<pattern>`. + * hostname, `<pattern>` - connections from hostnames that match the wildcard `<pattern>`. + + Others: + * count - if given, instead of returning a list of connections, returns the total number of matching connections. + + See [connlog3](/reference/sharpmush-help/pennfunc/#connlog3) for examples. + +### See Also +- [addrlog()](/reference/sharpmush-help/pennfunc/#addrlog) +- [connrecord()](/reference/sharpmush-help/pennfunc/#connrecord) +## CONNLOG3 + Examples: +``` +think connlog(logged in, after, secscalc(now, -15 minutes)) +shows all connections that were present during the last 15 minutes +``` + + > think connlog(all, ip, 127.0.0.1) + shows all connections ever made from localhost. + + > think connlog(all, count, before, secs()) + shows the total number of connections made since logging began. + +## CONNRECORD() +`CONNRECORD(<id>[, <osep>])` + + This Wizard-only function returns information about a connection if enhanced logging is enabled. + + `<id>` is a value returned by connlog(). connrecord() returns the following fields: DBREF NAME IPADDR HOSTNAME CONNECTION-TIME DISCONNECTION-TIME DISCONNECTION-REASON SSL WEBSOCKET. If the optional `<osep>` argument is given, it is used instead of space to seperate fields. + + If a single connection had multiple logins and logouts, only the last one is used. If a connection was never logged in, the DBREF field is #-1 and the NAME field is -. If the connection is still active, the DISCONNECTION-TIME is -1 and DISCONNECTION-REASON is -. + + Times are in seconds since the epoch, as returned by secs(). + + This function must be enabled (by the use_connlog @config option); if disabled, it returns #-1. + + +### See Also +- [connlog()](/reference/sharpmush-help/pennfunc/#connlog) +## ADDRLOG() +`ADDRLOG([count,], ip|hostname, <pattern>[, <osep>)` + + Searches the log of unique sites that have connected to the mush and returns a list of 'IPADDRESS HOSTNAME' pairs that match the given field with the given wildcard pattern, separated by `<osep>`, which defaults to |. If 'count' is given, returns the total number of matches instead. + + Restricted to See_all, Wizard, and Royalty objects. + + This function must be enabled (by the use_connlog @config option); if disabled, it returns #-1. + + +### See Also +- [connlog()](/reference/sharpmush-help/pennfunc/#connlog) +- [connrecord()](/reference/sharpmush-help/pennfunc/#connrecord) +## URLENCODE() +`URLENCODE(<string>)` + + This function converts its argument to a URL-encoded string where everything but a-z, A-Z, 0-9, -, ., _, and ~ are converted into %NN where NN is a hex code for their character value. + + +### See Also +- [urldecode()](/reference/sharpmush-help/pennfunc/#urldecode) +- [@http] +## URLDECODE() +`URLDECODE(<string>)` + + This function takes a URL-encoded string and returns it in its decoded form. Unprintable characters are converted to question marks. + + +### See Also +- [urlencode()](/reference/sharpmush-help/pennfunc/#urlencode) +- [@http] +## HMAC() +`HMAC(<digest>, <key>, <text>[, <encoding>])` + + Computes the HMAC (message authentication code) hash for `<text>` using the passphrase `<key>` and the given hash function `<digest>`, which can be any supported by digest(). `<encoding>` can be base16 (The default) or base64. + + Example: +``` +think hmac(sha256, secret, this is some text) +9598fd959633f2a64a7d7e985966774aa6f334bc802e5b3301772ec8ed6eed5a +think hmac(sha256, secret, this is some text, base64) +lZj9lZYz8qZKfX6YWWZ3SqbzNLyALlszAXcuyO1u7Vo= +``` + + +### See Also +- [digest()](/reference/sharpmush-help/pennfunc/#digest) \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/pennhttp.md b/src/content/docs/reference/sharpmush-help/pennhttp.md index 51ed693..0e938aa 100644 --- a/src/content/docs/reference/sharpmush-help/pennhttp.md +++ b/src/content/docs/reference/sharpmush-help/pennhttp.md @@ -1,8 +1,17 @@ --- -title: HTTP Help -description: Helpfiles on SharpMUSH Built-in HTTP Handler and sending. +title: "HTTP Features" +description: "SharpMUSH documentation for HTTP Features" --- + ## HTTP + +## http_handler + +## http_per_second + +## @config http_per_second + +## @config http_handler If http_handler `@config` is a dbref of a valid player, SharpMUSH will support HTTP requests reaching its mush port. It is very low level, and a little tricky to understand. If an HTTP Handler isn't set, or a given method attribute doesn't exist on the http handler object, Penn will default to responding with mud_url or an error page. @@ -14,13 +23,15 @@ When an HTTP request hits the SharpMUSH port, SharpMUSH invisibly logs in to the Immediately when the `@include` finishes, the http request is complete. Any queued entries (such as `@wait`, `$-commands`, etc) are not going to be sent to the HTTP client - you'll need to code using `@include`, `/inline` switches, and the like. - *%0* will be the pathname, e.g: "/", "/path/to", "/foo?bar=baz", etc. -- *%1* will be the body of the request. If it's json, use json_query to deal with it. If it's form-encoded, look at [formdecode()](#formdecode()) +- *%1* will be the body of the request. If it's json, use json_query to deal with it. If it's form-encoded, look at [formdecode()](/reference/sharpmush-help/pennhttp/#formdecode) Anything sent to the HTTP Handler player during evaluation of this code is included in the body sent to the HTTP Client. There is a maximum size of BUFFER_LEN for the body of the response. To modify the response headers, use the command `@respond` -See also: [http2](#http2) + +### See Also +- [http2] ## HTTP2 To use SharpMUSH HTTP Handler: @@ -35,34 +46,42 @@ You will very likely want to set the http_handler option in your mush.cnf file t By default, SharpMUSH will respond with a **404 NOT FOUND**. You will need to use `@respond` to control what is sent to the client. -See also: -- [http examples](#http examples) -- [http sitelock](#http sitelock) -- [event http](#event http) -See also: [http3](#http3) +### See Also +- [- [http examples] +- [http sitelock] +- [event http] + + +### See Also +- [http3] ## HTTP3 HTTP connections to SharpMUSH are limited to BUFFER_LEN in header and body size. -Incoming headers will be set in Q-registers: *%q<headers>* contains a list of all headers by name. Individual headers will be set in *%q<hdr.[name]>*, prefixed with hdr. e.g: *%q<hdr.host>* to obtain the value to the Host: header. Or *%q<hdr.Cookie>* for Cookies. +Incoming headers will be set in Q-registers: *%q<headers>* contains a list of all headers by name. Individual headers will be set in *%q<hdr.[name](/reference/sharpmush-help/pennconf/#name)>*, prefixed with hdr. e.g: *%q<hdr.host>* to obtain the value to the Host: header. Or *%q<hdr.Cookie>* for Cookies. Multiple header lines will be added to the same q-register name, but %r-delimited. So two "Cookie:" lines becomes *%q<Cookies>* with two %r-delimited lines. HTTP Responses are limited to BUFFER_LEN in response size. Anything sent to the HTTPHandler player, whether it uses think or is `@pemitted`, is added to the response buffer. -See also: -- [@respond](#@respond) -- [formdecode()](#formdecode()) -- [json_query()](#json_query()) -- [urlencode()](#urlencode()) -- [urldecode()](#urldecode()) + +### See Also +- [- [@respond](/reference/sharpmush-help/pennconf/#respond) +- [formdecode()](/reference/sharpmush-help/pennhttp/#formdecode) +- [json_query()](/reference/sharpmush-help/pennfunc/#jsonquery) +- [urlencode()](/reference/sharpmush-help/pennfunc/#urlencode) +- [urldecode()](/reference/sharpmush-help/pennfunc/#urldecode) ## @RESPOND -- `@respond <code> <text>` -- `@respond/type <content-type>` -- `@respond/header <name>=<value>` +## @RESPOND/TYPE + +## @RESPOND/HEADER + +`@respond <code> <text>` +`@respond/type <content-type>` +`@respond/header <name>=<value>` Within the context of an HTTP Player connection, `@respond` is used to modify the headers sent back to the HTTP client. @@ -76,9 +95,10 @@ If an attribute exists, Penn defaults to **200 OK**, and Content-Type **"text/pl If `@respond` is run outside of an HTTP Context, the enactor will see "(HTTP): ..." for debugging, but it isn't buffered for output as if it was an active http request. -See also: -- [@respond2](#@respond2) -- [@respond3](#@respond3) + +### See Also +- [- [@respond2](/reference/sharpmush-help/pennconf/#respond2) +- [@respond3](/reference/sharpmush-help/pennhttp/#respond3) ## @RESPOND2 `@respond` examples: @@ -111,7 +131,7 @@ Adding a Content-Length header is not allowed - SharpMUSH calculates it from the To vaguely comply with most HTTP requirements: `@respond <code> <text>` -- *\<code\>* must be 3 digits, followed by a space, then printable ascii text +- *<code>* must be 3 digits, followed by a space, then printable ascii text - Total length must be < 40 characters - This will be prepended by HTTP/1.1 when sent back to the client @@ -125,7 +145,7 @@ To vaguely comply with most HTTP requirements: ## FORMDECODE() `formdecode(<string>[, <paramname>[, <osep>]])` -formdecode() is intended for use with the HTTP Handler. See [http](#http) for more. +formdecode() is intended for use with the HTTP Handler. See [http] for more. formdecode() converts form-encoded data, such as HTTP GET paths (after the ?) or the contents of POST with form-urlencoded data. It searches for the parameter named *<paramname>* and returns with its decoded value. @@ -162,10 +182,11 @@ Examples all assume the following: > @config/set http_handler=pmatch(HTTPHandler) ``` -See also: -- [http simple](#http simple) -- [http get](#http get) -- [http post](#http post) + +### See Also +- [- [http simple] +- [http get] +- [http post] ## HTTP SIMPLE The examples on this page are all simple, single-result handlers. diff --git a/src/content/docs/reference/sharpmush-help/pennlock.md b/src/content/docs/reference/sharpmush-help/pennlock.md index 8c3e2f9..bd576ac 100644 --- a/src/content/docs/reference/sharpmush-help/pennlock.md +++ b/src/content/docs/reference/sharpmush-help/pennlock.md @@ -1,12 +1,13 @@ --- -title: Lock Help -description: Helpfiles on SharpMUSH Locks. +title: "Locks" +description: "SharpMUSH documentation for Locks" --- + ## LOCK KEYS -There are many key types, and it is also possible to form more complex locks by using boolean symbols and grouping. See [@lock-complex](#@lock-complex) for examples. +There are many key types, and it is also possible to form more complex locks by using boolean symbols and grouping. See [@lock-complex](/reference/sharpmush-help/pennlock/#lock-complex) for examples. -The types of keys are outlined below. Detailed help for each is available by typing [@lock-key](#@lock-key), replacing *<key>* with the word on the left. +The types of keys are outlined below. Detailed help for each is available by typing [@lock-<key>](/reference/sharpmush-help/penncmd/#lock-key), replacing *<key>* with the word on the left. - **Simple** - Always true, always false, or locking to a specific object. - **Name** - Check the name of the object attempting to pass the lock. @@ -19,9 +20,10 @@ The types of keys are outlined below. Detailed help for each is available by typ - **Dbreflist** - Check if the dbref of the object trying to pass the lock is in a list set in an attribute. - **Host** - Check for players connecting from a particular host/ip. -You can negate lock keys, and combine multiple keys, as explained in [lockkeys2](#lockkeys2). +You can negate lock keys, and combine multiple keys, as explained in [lockkeys2](/reference/sharpmush-help/pennlock/#lockkeys2). ## LOCK KEYS2 +## @LOCK-COMPLEX A lock key can be negated by prefixing the key with an "!". For example: @@ -54,13 +56,16 @@ You can group together different sets of keys by enclosing each group in parenth allows non-players to pass, or players who do not have the "unregistered" flag set. -See also: -- [@lock](#@lock) -- [locktypes](#locktypes) -- [@clock](#@clock) -- [objid()](#objid()) + +### See Also +- [- [@lock](/reference/sharpmush-help/pennlock/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [@clock](/reference/sharpmush-help/pennchat/#clock) +- [objid()](/reference/sharpmush-help/pennfunc/#objid) ## @LOCK-SIMPLE +## @LOCK-OBJID + ### SIMPLE LOCKS You can lock an object in several different ways. The simplest lock is one that always succeeds (#true) or always fails (#false), or that matches a specific object by prefixing it with an "=": @@ -73,7 +78,7 @@ This lock will always fail. ``` > @lock My Toy = =me ``` -This locks the object "My Toy" to you and you alone. It is recommended that you `@lock me = =me` in order to prevent anyone else from picking you up. The two = signs are NOT a typo! The first is part of the @lock syntax (as shown at the top of [@lock](#@lock)) the second is a lock key that means "only this exact object". +This locks the object "My Toy" to you and you alone. It is recommended that you `@lock me = =me` in order to prevent anyone else from picking you up. The two = signs are NOT a typo! The first is part of the @lock syntax (as shown at the top of [@lock](/reference/sharpmush-help/penncmd/#lock)) the second is a lock key that means "only this exact object". For backwards compatibility, `OBJID^<object>` is an alias for `=<object>`. @@ -133,8 +138,11 @@ The difference between this and an attribute lock is that the *<attribute>* is t The person trying to pass the lock is %# and *<object>* is %! when the evaluation takes place. The evaluation is done with the powers of *<object>*. If you try to do something (like [get(%#/*<attribute>*)]) and *<object>* doesn't have permission to do that, the person will automatically fail to pass the lock. -See also: [@lock-eval2](#@lock-eval2) +### See Also +- [@lock-eval2](/reference/sharpmush-help/pennlock/#lock-eval2) + +## @LOCK-EVAL2 ## @LOCK-EVALUATION2 Example: @@ -148,7 +156,9 @@ Whenever someone tries to pass through the exit, the attribute "whichday" will b If you have an evaluation lock that just does [hasflag(%#,FLAGNAME)], you should probably use a bit lock instead. -See also: [@lock-bit](#@lock-bit) + +### See Also +- [@lock-bit](/reference/sharpmush-help/pennlock/#lock-bit) ## @LOCK-NAME @@ -165,6 +175,10 @@ For example, to lock "Bob's Tools" to only people with a name beginning with Bob ``` ## @LOCK-BIT +## @LOCK-FLAG +## @LOCK-TYPE +## @LOCK-POWER +## @LOCK-CHANNEL ### BIT LOCKS You can test for set flags, powers, or object types in a lock directly, without using an evaluation lock, with these formats: @@ -184,6 +198,7 @@ You can also test for channel membership with: `@lock <object>=channel^<channel>` +## @LOCK-DBREFLIST ## @LOCK-LIST ### LIST LOCK @@ -201,7 +216,7 @@ For example: ## @LOCK-INDIRECT ### INDIRECT LOCKS -An "indirect" lock allows you to lock something to the same thing as another object (very useful in setting channel locks; see [@clock](#@clock)): +An "indirect" lock allows you to lock something to the same thing as another object (very useful in setting channel locks; see [@clock](/reference/sharpmush-help/pennchat/#clock)): ``` @lock Second Puppet=@First Puppet ``` @@ -228,14 +243,18 @@ For example: ``` This locks *<object>* to players (and the objects of players) currently connected from the computer the MUSH is running on. -See also: -- [ipaddr()](#ipaddr()) -- [hostname()](#hostname()) -- [LASTSITE](#LASTSITE) +### See Also +- [- [ipaddr()] +- [hostname()](/reference/sharpmush-help/pennfunc/#hostname) +- [LASTSITE](/reference/sharpmush-help/penntop/#lastsite) + +## LOCKTYPES +## LOCKLIST ## LOCK TYPES +## LOCK LIST -These are the standard lock types supported by SharpMUSH. For more detailed information about any lock type, see [@lock-lock](#@lock-lock). +These are the standard lock types supported by SharpMUSH. For more detailed information about any lock type, see [@lock/<lock>]. Standard Lock Types: - `@lock/basic` - Who can pick up the player/thing, or go through the exit. @@ -250,9 +269,12 @@ Standard Lock Types: - `@lock/mail` - Who can @mail the player - `@lock/user:<name>` - User-defined. No built-in function of this lock, but users can test it with elock() -See also: [locktypes2](#locktypes2) + +### See Also +- [locktypes2](/reference/sharpmush-help/pennlock/#locktypes2) ## LOCK TYPES2 +## LOCKTYPES2 More standard lock types: @@ -280,145 +302,181 @@ More standard lock types: - `@lock/mailforward` - Who can forward mail to this object via @mailforward - `@lock/chown` - Who can @chown this CHOWN_OK object? -See also: -- [@lock](#@lock) -- [@lset](#@lset) -- [@clock](#@clock) -- [FAILURE](#FAILURE) + +### See Also +- [- [@lock](/reference/sharpmush-help/pennlock/#lock) +- [@lset](/reference/sharpmush-help/penncmd/#lset) +- [@clock](/reference/sharpmush-help/pennchat/#clock) +- [FAILURE](/reference/sharpmush-help/penntop/#failure) ## @LOCK/BASIC +## @LOCK/ENTER +## @LOCK/LEAVE +## @LOCK/TELEPORT ### Basic Lock For exits, this lock controls who can pass through the exit. For players and things, it controls who can "get" the object. For rooms, it determines whether the @success or @failure verbs are triggered when someone "look"s at the room. However, even when the lock is failed, the "look" still occurs. -See also: -- [@success](#@success) -- [@failure](#@failure) -- [goto](#goto) -- [get](#get) -- [look](#look) + +### See Also +- [- [@success](/reference/sharpmush-help/pennconf/#success) +- [@failure](/reference/sharpmush-help/penncmd/#failure) +- [goto](/reference/sharpmush-help/penncmd/#goto) +- [get](/reference/sharpmush-help/penncmd/#get) +- [look](/reference/sharpmush-help/penncmd/#look) ### Enter Lock For players and things, the Enter lock controls who can "enter" an ENTER_OK object, as well as who can "empty" it. It has no meaning for exits or rooms. -See also: -- [@enter](#@enter) -- [@efail](#@efail) -- [ENTER_OK](#ENTER_OK) -- [enter](#enter) -- [empty](#empty) + +### See Also +- [- [@enter](/reference/sharpmush-help/pennconf/#enter) +- [@efail](/reference/sharpmush-help/penncmd/#efail) +- [ENTER_OK](/reference/sharpmush-help/pennflag/#enterok) +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [empty](/reference/sharpmush-help/penncmd/#empty) ### Leave Lock For players, things and rooms, the Leave lock controls who can leave the object, via "leave", "@teleport" or "goto". It has no meaning for exits. -See also: -- [@leave](#@leave) -- [@lfail](#@lfail) -- [leave](#leave) + +### See Also +- [- [@leave](/reference/sharpmush-help/pennconf/#leave) +- [@lfail](/reference/sharpmush-help/penncmd/#lfail) +- [leave](/reference/sharpmush-help/penncmd/#leave) ### Teleport Lock For rooms, the Teleport lock controls who can "@teleport" into the room, if it has the JUMP_OK flag set. It has no meaning for players, things or exits. -See also: -- [JUMP_OK](#JUMP_OK) -- [@teleport](#@teleport) -- [@lock](#@lock) -- [locktypes](#locktypes) -- [lockkeys](#lockkeys) + +### See Also +- [- [JUMP_OK](/reference/sharpmush-help/pennconf/#jumpok) +- [@teleport](/reference/sharpmush-help/penncmd/#teleport) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys) ## @LOCK/FOLLOW +## @LOCK/FORWARD +## @LOCK/DROPTO ### Follow Lock For players and things, controls who may "follow" the object. Has no meaning for rooms or exits. -See also: [FAILURE](#FAILURE) + +### See Also +- [FAILURE](/reference/sharpmush-help/penntop/#failure) ### Forward Lock For players, things and rooms, controls who can forward sound to an object, via @forwardlist or @debugforwardlist. Meaningless for exits. -See also: -- [@forwardlist](#@forwardlist) -- [@debugforwardlist](#@debugforwardlist) -- [@lock/mailforward](#@lock/mailforward) + +### See Also +- [- [@forwardlist](/reference/sharpmush-help/pennconf/#forwardlist) +- [@debugforwardlist](/reference/sharpmush-help/penncmd/#debugforwardlist) +- [@lock/mailforward] ### Dropto Lock For rooms, only objects which pass this lock will be sent to the rooms Drop-To. Has no meaning for players, things or exits. -See also: -- [DROP-TOS](#DROP-TOS) -- [drop](#drop) -- [empty](#empty) -- [@lock](#@lock) -- [locktypes](#locktypes) -- [lockkeys](#lockkeys) + +### See Also +- [- [DROP-TOS](/reference/sharpmush-help/pennconf/#drop-tos) +- [drop](/reference/sharpmush-help/penncmd/#drop) +- [empty](/reference/sharpmush-help/penncmd/#empty) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys) ## @LOCK/USE +## @LOCK/COMMAND +## @LOCK/LISTEN ### Use Lock For players, things and rooms, this lock controls who may "use" the object. You must also pass an object's Use lock to trigger $-commands or ^-listens on it (as well as the Command/Listen lock; see below). When an object is used as a Channel Mogrifier, only players who pass the object's Use lock will have their speech on the channel mogrified. Has no meaning for exits. -See also: -- [@use](#@use) -- [@ufail](#@ufail) -- [use](#use) -- [$-commands](#$-commands) -- [^](#^) -- [MOGRIFY](#MOGRIFY) + +### See Also +- [- [@use](/reference/sharpmush-help/pennconf/#use) +- [@ufail](/reference/sharpmush-help/penncmd/#ufail) +- [use](/reference/sharpmush-help/penncmd/#use) +- [$-commands] +- [^] +- [MOGRIFY](/reference/sharpmush-help/pennconf/#mogrify) ### Command Lock For players, things and rooms, you must pass this lock (as well as the Use lock) to trigger $-commands on the object. Meaningless for exits. -See also: -- [$-commands](#$-commands) -- [FAILURE](#FAILURE) + +### See Also +- [- [$-commands] +- [FAILURE](/reference/sharpmush-help/penntop/#failure) ### Listen Lock For players, things and rooms, you must pass this lock (as well as the Use lock) to trigger ^-listen patterns on the object when it's set MONITOR. Meaningless for exits. -See also: [^](#^) + +### See Also +- [^] ## @LOCK/PAGE +## @LOCK/SPEECH +## @LOCK/MAIL +## @LOCK/MAILFORWARD +## @LOCK/INTERACT ### Page Lock For players, things and rooms, you must pass this lock to page or @pemit to the object, or @remit inside it. Meaningless for exits. -See also: -- [FAILURE](#FAILURE) -- [@haven](#@haven) + +### See Also +- [- [FAILURE](/reference/sharpmush-help/pennconf/#failure) +- [@haven](/reference/sharpmush-help/penncmd/#haven) ### Speech Lock Controls who can speak (via say, pose, @*emit or teach) inside an object. Meaningless for exits. -See also: [FAILURE](#FAILURE) + +### See Also +- [FAILURE](/reference/sharpmush-help/penntop/#failure) ### Mail Lock Controls who can send @mail to this object. -See also: -- [@mail](#@mail) -- [FAILURE](#FAILURE) + +### See Also +- [- [@mail](/reference/sharpmush-help/pennmail/#mail) +- [FAILURE](/reference/sharpmush-help/penntop/#failure) ### Mailforward Lock Controls who can forward @mail to this object via @mailforward. -See also: -- [@mail](#@mail) -- [@mailforward](#@mailforward) -- [@lock/forward](#@lock/forward) + +### See Also +- [- [@mail](/reference/sharpmush-help/pennmail/#mail) +- [@mailforward](/reference/sharpmush-help/penncmd/#mailforward) +- [@lock/forward] ### Interact Lock Controls whose indirect speech you'll hear (from say, pose, channels, @emit, etc). Does not block sound directed specifically at you, such as page, whisper, @pemit, etc; use @lock/page for those. **Note**: if sound is blocked by the interact lock, the speaker will not be informed. ## @LOCK/DROP +## @LOCK/DROPIN +## @LOCK/GIVE +## @LOCK/FROM +## @LOCK/PAY +## @LOCK/RECEIVE +## @LOCK/TAKE ### Drop Lock For players and things, controls who can drop the object. Has no meaning for exits. On rooms, has the same meaning as @lock/dropin. -See also: -- [drop](#drop) -- [empty](#empty) + +### See Also +- [- [drop](/reference/sharpmush-help/pennconf/#drop) +- [empty](/reference/sharpmush-help/penncmd/#empty) ### Dropin Lock When set on a player, thing or room, controls who can drop objects into them. Has no meaning for exits. @@ -438,20 +496,24 @@ Controls what may be given to this object. ### Take Lock Controls who can take from this container. -See also: -- [give](#give) -- [buy](#buy) -- [@lock/basic](#@lock/basic) -- [@lock/enter](#@lock/enter) + +### See Also +- [- [give](/reference/sharpmush-help/pennconf/#give) +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [@lock/basic] +- [@lock/enter] ## @LOCK/FILTER +## @LOCK/INFILTER ### Filter Lock +### Infilter Lock These are lock versions of @filter and @infilter, respectively. Anyone who fails to pass the lock will have their speech filtered. The sound being made is passed to evaluation locks as %0. -See also: -- [@filter](#@filter) -- [@infilter](#@infilter) + +### See Also +- [- [@filter](/reference/sharpmush-help/pennconf/#filter) +- [@infilter](/reference/sharpmush-help/penncmd/#infilter) ## @LOCK/CONTROL ## @LOCK/DESTROY @@ -460,72 +522,88 @@ See also: ### Control Lock Allows objects which would not normally control something to do so. Does not work for players. -See also: [CONTROL](#CONTROL) + +### See Also +- [CONTROL](/reference/sharpmush-help/penntop/#control) ### Destroy Lock Limits who can @destroy a DESTROY_OK object. -See also: -- [@destroy](#@destroy) -- [DESTROY_OK](#DESTROY_OK) + +### See Also +- [- [@destroy](/reference/sharpmush-help/pennconf/#destroy) +- [DESTROY_OK](/reference/sharpmush-help/pennflag/#destroyok) ### Examine Lock Limits who can examine a VISUAL object. -See also: -- [examine](#examine) -- [VISUAL](#VISUAL) + +### See Also +- [- [examine](/reference/sharpmush-help/pennconf/#examine) +- [VISUAL](/reference/sharpmush-help/pennflag/#visual) ## @LOCK/ZONE +## @LOCK/CHZONE +## @LOCK/CHOWN +## @LOCK/PARENT +## @LOCK/LINK +## @LOCK/OPEN ### Zone Lock Objects which pass a SHARED player's @lock/zone control all the objects the shared player owns. If the zone_control_zmp_only @config option is off, anything passing the @lock/zone of other objects will control everything @chzoned to the object. -See also: -- [@chzone](#@chzone) -- [SHARED](#SHARED) -- [ZONES](#ZONES) -- [ZMR](#ZMR) + +### See Also +- [- [@chzone](/reference/sharpmush-help/pennconf/#chzone) +- [SHARED](/reference/sharpmush-help/pennflag/#shared) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [ZMR](/reference/sharpmush-help/pennconf/#zmr) ### Chzone Lock If set, controls who can @chzone an object to this zone. -See also: -- [@chzone](#@chzone) -- [ZONES](#ZONES) + +### See Also +- [- [@chzone](/reference/sharpmush-help/pennconf/#chzone) +- [ZONES](/reference/sharpmush-help/penntop/#zones) ### Chown Lock If set, controls who can change the owner of this CHOWN_OK object via @chown. -See also: -- [CHOWN_OK](#CHOWN_OK) -- [@chown](#@chown) + +### See Also +- [- [CHOWN_OK](/reference/sharpmush-help/pennconf/#chownok) +- [@chown](/reference/sharpmush-help/penncmd/#chown) ### Parent Lock Controls who can @parent something to this LINK_OK object. -See also: -- [@parent](#@parent) -- [LINK_OK](#LINK_OK) + +### See Also +- [- [@parent](/reference/sharpmush-help/pennconf/#parent) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) ### Link Lock Controls who can @link this unlinked exit, or who can @link an exit to this LINK_OK room/thing. -See also: -- [@link](#@link) -- [LINK_OK](#LINK_OK) -- [LINK_ANYWHERE POWER](#LINK_ANYWHERE POWER) + +### See Also +- [- [@link](/reference/sharpmush-help/pennconf/#link) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) +- [LINK_ANYWHERE POWER](/reference/sharpmush-help/pennconf/#linkanywhere-power) ### Open Lock Controls who can @open an exit from this OPEN_OK room. -See also: -- [@open](#@open) -- [@dig](#@dig) -- [OPEN_OK](#OPEN_OK) -- [OPEN_ANYWHERE POWER](#OPEN_ANYWHERE POWER) + +### See Also +- [- [@open](/reference/sharpmush-help/pennconf/#open) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [OPEN_OK](/reference/sharpmush-help/pennconf/#openok) +- [OPEN_ANYWHERE POWER](/reference/sharpmush-help/pennconf/#openanywhere-power) ## @LOCK/USER +## @LOCK/USER:<NAME> ### User-defined Locks User-defined locks have no hardcoded meaning. They allow you to set locks for any purpose, which you can test using the elock() function. *<name>* can be anything which is a valid attribute name. For example, in a combat system you might use a "wield" @lock on weapons, similar to: @@ -536,9 +614,10 @@ User-defined locks have no hardcoded meaning. They allow you to set locks for an and then test it with `elock(War Hammer/wield, %#)`. -See also: -- [elock()](#elock()) -- [valid()](#valid()) -- [@lock](#@lock) -- [locktypes](#locktypes) -- [lockkeys](#lockkeys) \ No newline at end of file + +### See Also +- [- [elock()] +- [valid()](/reference/sharpmush-help/pennfunc/#valid) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [locktypes](/reference/sharpmush-help/pennlock/#locktypes) +- [lockkeys](/reference/sharpmush-help/pennlock/#lockkeys) \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/pennmail.md b/src/content/docs/reference/sharpmush-help/pennmail.md index ed44329..c1f8720 100644 --- a/src/content/docs/reference/sharpmush-help/pennmail.md +++ b/src/content/docs/reference/sharpmush-help/pennmail.md @@ -1,11 +1,13 @@ --- -title: Mail Help -description: Helpfiles on SharpMUSH Internal Mail. +title: "Mail System" +description: "SharpMUSH documentation for Mail System" --- + ## MAIL +## @MAIL -`@mail[/<switches>] [<msg-list>[=<target>]]` -`@mail[/<switches>] <player-list>=[<subject>/]<message>` +- `@mail[/<switches>] [<msg-list>[=<target>]]` +- `@mail[/<switches>] <player-list>=[<subject>/]<message>` @mail invokes the built-in MUSH mailer, which allows players to send and receive mail. Pronoun/function substitution is performed on any messages you may try to send. @@ -24,28 +26,32 @@ A *<player-list>* is a space-separated list of recipients, which may be: * Player names * Player dbref #'s * Message #'s, in which case you send to the sender of that message -* An alias name (see [@malias](#@malias)) - -See also: -- [mail-sending](#mail-sending) -- [mail-reading](#mail-reading) -- [mail-folders](#mail-folders) -- [mail-forward](#mail-forward) -- [mail-other](#mail-other) -- [mail-admin](#mail-admin) -- [@malias](#@malias) -- [mail-reviewing](#mail-reviewing) -- [@mailquota](#@mailquota) +* An alias name (see [@malias](/reference/sharpmush-help/pennmail/#malias)) + + +### See Also +- [- [mail-sending](/reference/sharpmush-help/pennmail/#mail-sending) +- [mail-reading](/reference/sharpmush-help/pennmail/#mail-reading) +- [mail-folders](/reference/sharpmush-help/pennmail/#mail-folders) +- [mail-forward](/reference/sharpmush-help/pennmail/#mail-forward) +- [mail-other](/reference/sharpmush-help/pennmail/#mail-other) +- [mail-admin](/reference/sharpmush-help/pennmail/#mail-admin) +- [@malias](/reference/sharpmush-help/pennmail/#malias) +- [mail-reviewing](/reference/sharpmush-help/pennmail/#mail-reviewing) +- [@mailquota](/reference/sharpmush-help/pennmail/#mailquota) ## MAIL-READING +## @MAIL/READ +## @MAIL/LIST +## @MAIL/CSTATS -`@mail <msg #>` -`@mail/read <msg-list>` +- `@mail <msg #>` +- `@mail/read <msg-list>` * This displays messages which match the msg# or msg-list from your current folder. -`@mail` -`@mail <msg-list, but not a single msg #>` -`@mail/list <msg-list>` +- `@mail` +- `@mail <msg-list, but not a single msg #>` +- `@mail/list <msg-list>` * This gives a brief list of all mail in the current folder, with sender name, time sent, and message status. * The status field is a set of characters (ex: NC-UF+) which mean: * N = New (unread) message @@ -59,8 +65,10 @@ See also: * Shows how many messages you have, in the same format as the automatic mail check when you connect. ## MAIL-SENDING +## @MAIL/SEND +## @MAIL/FWD -`@mail[/switch] <player-list>=[<subject>]/<msg>` +- `@mail[/switch] <player-list>=[<subject>]/<msg>` * This sends the message *<msg>* to all players in *<player-list>*. * If no subject is given, the message subject is the beginning of the message itself. To include a literal / in the subject, double it up (//). * All function substitutions are valid in *<msg>* including mail(#) which will allow you to forward mail you have received to other users. @@ -73,22 +81,29 @@ The following switches are available: If you have an @mailsignature attribute set on yourself, its contents will be evaluated and appended to the message unless the /nosig switch is given. -`@mail/fwd <msg-list>=<player-list>` +- `@mail/fwd <msg-list>=<player-list>` * This sends a copy of all the messages in *<msg-list>* to all the players in *<player-list>*. The copy will appear to have been sent by you (not the original sender), and its status will be "Forwarded". ## MAIL-OTHER - -`@mail/clear [<msg-list> | all]` -`@mail/unclear [<msg-list> | all]` +## @MAIL/CLEAR +## @MAIL/UNCLEAR +## @MAIL/PURGE +## @MAIL/TAG +## @MAIL/UNTAG +## @MAIL/UNREAD +## @MAIL/STATUS + +- `@mail/clear [<msg-list> | all]` +- `@mail/unclear [<msg-list> | all]` * These commands mark mail in the current folder as cleared or uncleared. Mail marked for clearing is deleted when you disconnect, or if you use @mail/purge. * If no msg-list is specified, all mail in your current folder is cleared. * If "all" is given instead of a msg-list, all mail in **all** folders is cleared/uncleared. -`@mail/purge` +- `@mail/purge` * Actually deletes all messages marked for clearing with @mail/clear. This is done automatically when you log out. -`@mail/tag [<msg-list> | all]` -`@mail/untag [<msg-list> | all]` +- `@mail/tag [<msg-list> | all]` +- `@mail/untag [<msg-list> | all]` * These commands tag or untag mail in the current folder. * Tagged mail can be later acted on en masse by using "tagged" as the msg-list for other commands (which does **not** untag them afterward). * If no msg-list is specified, all messages in the current folder are tagged/untagged. @@ -103,49 +118,56 @@ To clear all mail from Paul and Chani: @mail/untag all ``` -`@mail/unread [<msg-list> | all]` +- `@mail/unread [<msg-list> | all]` * Mark messages which have already been read as new/unread. -`@mail/status [<msg-list> | all]=<status>` +- `@mail/status [<msg-list> | all]=<status>` * Set the status of the given messages. * *<status>* can be one of: tagged, untagged, cleared, uncleared, read, unread, urgent or unurgent. * Read marks a new message as read without reading it, urgent/unurgent toggle the urgent flag, and the others are equivalent to @mail/tag, @mail/untag, @mail/clear, @mail/unclear and @mail/unread respectively. ## MAIL-FOLDERS +## @MAIL/FOLDER +## @MAIL/UNFOLDER +## @MAIL/FILE The MUSH mail system allows each player 16 folders, numbered from 0 to 15. Mail can only be in 1 folder at a time. Folder 0 is the "inbox" where new mail is received. Most @mail commands operate on only the current folder. -`@mail/folder` +- `@mail/folder` * This commands lists all folders which contain mail, telling how many messages are in each, and what the current folder is. -`@mail/folder <folder#|foldername>` +- `@mail/folder <folder#|foldername>` * This command sets your current folder to *<folder#>*. -`@mail/folder <folder#> = <foldername>` +- `@mail/folder <folder#> = <foldername>` * This command gives *<folder#>* a name. -`@mail/unfolder <folder#|foldername>` +- `@mail/unfolder <folder#|foldername>` * This command removes a folder's name -`@mail/file <msg-list>=<folder#>` +- `@mail/file <msg-list>=<folder#>` * This command moves all messages in *<msg-list>* from the current folder to a new folder, *<folder#>*. -See also: [@mailfilter](#@mailfilter) + +### See Also +- [@mailfilter](/reference/sharpmush-help/pennmail/#mailfilter) ## MAIL-REVIEWING +## @MAIL/REVIEW +## @MAIL/RETRACT -`@mail/review [<player>]` +- `@mail/review [<player>]` * Reviews the messages you have sent to *<player>*, or all messages you've sent if no *<player>* is specified. -`@mail/review <player>=<msglist>` +- `@mail/review <player>=<msglist>` * Reads the messages you have sent to *<player>*. -`@mail/retract <player>=<msglist>` +- `@mail/retract <player>=<msglist>` * Retracts (deletes) unread messages you have sent to *<player>*. ## @MAILQUOTA -`@mailquota <player>[=<limit>]` +- `@mailquota <player>[=<limit>]` This attribute allows wizards to change the maximum number of messages a player can have in their inbox, override the mail_limit @config option for specific people. *<limit>* should be a number between 1 and 50000, inclusive. @@ -157,6 +179,7 @@ Example: ``` ## @MAILFILTER +## MAILFILTER The @mailfilter attribute specifies automatic filing of incoming @mail messages into folders. When an @mail message is received, the contents of @mailfilter are evaluated, with the following arguments passed: * `%0` - dbref of message sender @@ -171,11 +194,14 @@ Example: Filter urgent messages into folder 1 > @mailfilter me=if(strmatch(%3,*U*),1) ``` -See also: [mail-folders](#mail-folders) + +### See Also +- [mail-folders](/reference/sharpmush-help/pennmail/#mail-folders) ## @MAILSIGNATURE +## MAILSIGNATURE -`@mailsignature <object>[=<signature>]` +- `@mailsignature <object>[=<signature>]` When set, this attribute is evaluated and appended to any @mail messages sent by *<object>*, unless the @mail/nosig command is used. @@ -184,18 +210,21 @@ Example: > @mailsignature me=%r%r-- %n%r%r[u(funny_quote)] ``` -See also: [@mail](#@mail), [mail-sending](#mail-sending) + +### See Also +- [@mail](/reference/sharpmush-help/pennmail/#mail) +- [mail-sending](/reference/sharpmush-help/pennmail/#mail-sending) ## MAIL-ADMIN The @mail command can also take the following switches: -`@mail/stats [<player>]` - Basic mail statistics. -`@mail/dstats [<player>]` - Also provides read/unread count. -`@mail/fstats [<player>]` - Does all that, plus gives space usage. +- `@mail/stats [<player>]` - Basic mail statistics. +- `@mail/dstats [<player>]` - Also provides read/unread count. +- `@mail/fstats [<player>]` - Does all that, plus gives space usage. -`@mail/debug <action>[=<player>]` -`@mail/nuke` +- `@mail/debug <action>[=<player>]` +- `@mail/nuke` Only wizards may stats players other than themselves. @@ -208,7 +237,7 @@ The /nuke switch destroys the post office, erasing all @mail everywhere. It may ## @MALIAS -`@malias [<alias>]` +- `@malias [<alias>]` The @malias command is used to create, view, and manipulate @mail aliases, or lists. An alias is a shorthand way of specifying a list of players for @mail. Aliases begin with the '+' (plus) prefix, and represent a list of dbrefs; aliases may not include other aliases. @@ -216,14 +245,16 @@ The @malias command is used to create, view, and manipulate @mail aliases, or li `@malias` with a single argument (the name of an alias) lists the members of that alias, if you're allowed to see them. Other forms of the same command are `@malias/members <alias>` or `@malias/who <alias>` -See also: [@malias2](#@malias2) + +### See Also +- [@malias2](/reference/sharpmush-help/pennmail/#malias2) ## @MALIAS2 -`@malias[/create] <alias>=<player list>` -`@malias/desc <alias>=<description>` -`@malias/rename <alias>=<newalias>` -`@malias/destroy <alias>` +- `@malias[/create] <alias>=<player list>` +- `@malias/desc <alias>=<description>` +- `@malias/rename <alias>=<newalias>` +- `@malias/destroy <alias>` The first form above creates a new alias for the given list of players. @@ -233,13 +264,15 @@ The first form above creates a new alias for the given list of players. `@malias/destroy` destroys the alias completely. -See also: [@malias3](#@malias3) + +### See Also +- [@malias3](/reference/sharpmush-help/pennmail/#malias3) ## @MALIAS3 -`@malias/set <alias>=<player list>` -`@malias/add <alias>=<player list>` -`@malias/remove <alias>=<player list>` +- `@malias/set <alias>=<player list>` +- `@malias/add <alias>=<player list>` +- `@malias/remove <alias>=<player list>` `@malias/set` resets the list of players on the alias to *<player list>*. @@ -247,12 +280,14 @@ See also: [@malias3](#@malias3) `@malias/remove` removes players from the alias. If a player is on the alias more than once, a single remove will remove only one instance of that player. -See also: [@malias4](#@malias4) + +### See Also +- [@malias4](/reference/sharpmush-help/pennmail/#malias4) ## @MALIAS4 -`@malias/use <alias>=<perm list>` -`@malias/see <alias>=<perm list>` +- `@malias/use <alias>=<perm list>` +- `@malias/see <alias>=<perm list>` `@malias/use` controls who may use an alias. Players who may use an alias will see it in their @malias list, and can @mail to the alias. @@ -262,14 +297,16 @@ An empty permission list allows any player. The permission list may also be a sp By default, the owner and alias members may see and use the alias, but only the owner may list the members. Note that admin may always list aliases and their members, regardless of these settings, but are treated like anyone else when trying to @mail with an alias. -See also: [@malias5](#@malias5) + +### See Also +- [@malias5](/reference/sharpmush-help/pennmail/#malias5) ## @MALIAS5 -`@malias/all` -`@malias/stat` -`@malias/chown <alias>=<player>` -`@malias/nuke` +- `@malias/all` +- `@malias/stat` +- `@malias/chown <alias>=<player>` +- `@malias/nuke` `@malias/all` is an admin-only command that lists all aliases in the MUSH. @@ -284,36 +321,38 @@ See also: [@malias5](#@malias5) Mail functions work with @mail. Available functions: -* [folderstats](#folderstats) -* [mail](#mail) -* [maildstats](#maildstats) -* [mailfrom](#mailfrom) -* [mailfstats](#mailfstats) -* [maillist](#maillist) -* [mailsend](#mailsend) -* [mailstats](#mailstats) -* [mailstatus](#mailstatus) -* [mailsubject](#mailsubject) -* [mailtime](#mailtime) -* [malias](#malias) +* [folderstats](/reference/sharpmush-help/pennconf/#folderstats) +* [mail](/reference/sharpmush-help/pennmail/#mail) +* [maildstats](/reference/sharpmush-help/pennmail/#maildstats) +* [mailfrom](/reference/sharpmush-help/pennmail/#mailfrom) +* [mailfstats](/reference/sharpmush-help/pennmail/#mailfstats) +* [maillist](/reference/sharpmush-help/pennmail/#maillist) +* [mailsend](/reference/sharpmush-help/pennmail/#mailsend) +* [mailstats](/reference/sharpmush-help/pennmail/#mailstats) +* [mailstatus](/reference/sharpmush-help/pennmail/#mailstatus) +* [mailsubject](/reference/sharpmush-help/pennmail/#mailsubject) +* [mailtime](/reference/sharpmush-help/pennmail/#mailtime) +* [malias](/reference/sharpmush-help/pennconf/#malias) ## FOLDERSTATS() -`folderstats()` -`folderstats(<folder #>)` -`folderstats(<player>)` -`folderstats(<player>, <folder #>)` +- `folderstats()` +- `folderstats(<folder #>)` +- `folderstats(<player>)` +- `folderstats(<player>, <folder #>)` folderstats() returns the number of read, unread, and cleared messages in a specific folder, or, if none is given, the player's current folder. Only Wizards may use forms which get other players' mail information. -See also: [mailstats](#mailstats) + +### See Also +- [mailstats](/reference/sharpmush-help/pennmail/#mailstats) ## MAIL() -`mail()` -`mail(<player name>)` -`mail([<folder #>:]<mail message #>)` -`mail(<player>, [<folder #>:]<mail message #>)` +- `mail()` +- `mail(<player name>)` +- `mail([<folder #>:]<mail message #>)` +- `mail(<player>, [<folder #>:]<mail message #>)` Without arguments, mail() returns the number of messages in all the player's mail folders. With a player name argument, mail() returns the number of read, unread, and cleared messages *<player>* has in all folders. Only Wizards can use this on other players. @@ -325,13 +364,16 @@ Example: (text of the second message in the player's third folder) ``` -See also: [maillist](#maillist), [mailfrom](#mailfrom) + +### See Also +- [maillist](/reference/sharpmush-help/pennmail/#maillist) +- [mailfrom](/reference/sharpmush-help/pennmail/#mailfrom) ## MAILLIST() -`maillist([<player>, ]<message-list>)` +- `maillist([<player>, ]<message-list>)` -maillist() returns a list of all *<player>*'s @mail messages which match the given *<message-list>* (the same as @mail/list *<message-list>*). If no *<player>* is given, the executor's mail is matched. The *<message-list>* argument is described in [mail](#mail). +maillist() returns a list of all *<player>*'s @mail messages which match the given *<message-list>* (the same as @mail/list *<message-list>*). If no *<player>* is given, the executor's mail is matched. The *<message-list>* argument is described in [mail](/reference/sharpmush-help/pennmail/#mail). Examples: ``` @@ -343,27 +385,38 @@ Examples: 1:1 1:2 ``` -See also: [mail](#mail), [mailfrom](#mailfrom) + +### See Also +- [mail](/reference/sharpmush-help/pennmail/#mail) +- [mailfrom](/reference/sharpmush-help/pennmail/#mailfrom) ## MAILFROM() +## MAILTIME() +## MAILSTATUS() +## MAILSUBJECT() -`mailfrom([<player>, ][<folder #>:]<mail message #>)` -`mailtime([<player>, ][<folder #>:]<mail message #>)` -`mailstatus([<player>, ][<folder #>:]<mail message #>)` -`mailsubject([<player>, ][<folder #>:]<mail message #>)` +- `mailfrom([<player>, ][<folder #>:]<mail message #>)` +- `mailtime([<player>, ][<folder #>:]<mail message #>)` +- `mailstatus([<player>, ][<folder #>:]<mail message #>)` +- `mailsubject([<player>, ][<folder #>:]<mail message #>)` * mailfrom() returns the dbref number of the sender of a mail message. * mailtime() is similar, but returns the time the mail was sent. * mailsubject() is similar, but returns the subject of the message. * mailstatus() returns the mail's status characters (as per @mail/list). -See also: [mail](#mail), [maillist](#maillist) + +### See Also +- [mail](/reference/sharpmush-help/pennmail/#mail) +- [maillist](/reference/sharpmush-help/pennmail/#maillist) ## MAILSTATS() +## MAILDSTATS() +## MAILFSTATS() -`mailstats([<player>])` -`maildstats([<player>])` -`mailfstats([<player>])` +- `mailstats([<player>])` +- `maildstats([<player>])` +- `mailfstats([<player>])` The mail*stats() functions return data like @mail/*stats does. You either must use this on yourself, or you must be a wizard. The information will be joined together as a space separated list of numbers. @@ -376,19 +429,21 @@ Example: <# received unread> <# received cleared> <# received bytes> ``` -See also: [folderstats](#folderstats) + +### See Also +- [folderstats](/reference/sharpmush-help/pennconf/#folderstats) ## MAILSEND() -`mailsend(<player>,[<subject>/]<message>)` +- `mailsend(<player>,[<subject>/]<message>)` This function sends a message to a player, just like @mail/send. It returns nothing if successful, or an error message. ## MALIAS() -`malias([<delimiter>])` -`malias(<malias name>)` -`malias(<malias name>[,<delimiter>])` +- `malias([<delimiter>])` +- `malias(<malias name>)` +- `malias(<malias name>[,<delimiter>])` With no arguments, malias() returns the list of all malias names which are visible to the player. With two arguments, returns the list of dbrefs that are members of the given malias, delimited by *<delimiter>*. diff --git a/src/content/docs/reference/sharpmush-help/pennpueb.md b/src/content/docs/reference/sharpmush-help/pennpueb.md index c18bd91..5ede654 100644 --- a/src/content/docs/reference/sharpmush-help/pennpueb.md +++ b/src/content/docs/reference/sharpmush-help/pennpueb.md @@ -1,6 +1,6 @@ --- -title: Enhanced Client Help -description: Helpfiles on SharpMUSH Client Enhancements. +title: "Pueblo Client" +description: "SharpMUSH documentation for Pueblo Client" --- ## PUEBLO @@ -9,7 +9,9 @@ Pueblo is a client made by Chaco (a now defunct company). It attempts to mix HTM SharpMUSH will automatically detect a Pueblo client (rather, the client will announce itself and SharpMUSH will detect that), and set up that connection for Pueblo use. -See also: [pueblo2](#pueblo2) + +### See Also +- [pueblo2](/reference/sharpmush-help/pennpueb/#pueblo2) ## PUEBLO2 @@ -28,22 +30,24 @@ While Pueblo brings a number of new features and markups to MUSHes, in many ways > &cmd`who Globals=$+who: @nspemit %#=tagwrap(pre, u(fun`who)) ``` -See also: -- [pueblo()](#pueblo()) -- [HTML Functions](#HTML Functions) + +### See Also +- [- [pueblo()] +- [HTML Functions](/reference/sharpmush-help/pennpueb/#html-functions) ## HTML Hyper Text Markup Language (http://www.w3.org) -The only HTML implementation supported by the MUSH is the one supported by Pueblo (see [pueblo](#pueblo) for more info). To utilize HTML, use one of the MUSH HTML Functions (see [HTML Functions](#HTML Functions) for a list). +The only HTML implementation supported by the MUSH is the one supported by Pueblo (see [pueblo](/reference/sharpmush-help/pennpueb/#pueblo) for more info). To utilize HTML, use one of the MUSH HTML Functions (see [HTML Functions](/reference/sharpmush-help/pennpueb/#html-functions) for a list). HTML tags are stripped when sent to non-HTML capable players. -See also: -- [HTML Functions](#HTML Functions) -- [PUEBLO](#PUEBLO) -- [html()](#html()) + +### See Also +- [- [HTML Functions](/reference/sharpmush-help/pennconf/#html-functions) +- [PUEBLO](/reference/sharpmush-help/pennpueb/#pueblo) +- [html()](/reference/sharpmush-help/pennpueb/#html) ## PUEBLO() @@ -55,11 +59,14 @@ If used on a player/descriptor which is not connected, pueblo() returns #-1 NOT When used with a *<player>* argument, the most recently active connection is used if the *<player>* is logged in more than once. -See also: -- [terminfo()](#terminfo()) -- [html()](#html()) -- [PUEBLO](#PUEBLO) +### See Also +- [- [terminfo()] +- [html()](/reference/sharpmush-help/pennpueb/#html) +- [PUEBLO](/reference/sharpmush-help/pennpueb/#pueblo) + +## @VRML_URL +## VRML_URL ## VRML `@vrml_url <object>[=<url>]` @@ -73,9 +80,10 @@ Example: To learn about the VRML Format, have a look at the Pueblo Help, which mentions several good sites for learning. -See also: -- [HTML](#HTML) -- [PUEBLO](#PUEBLO) + +### See Also +- [- [HTML](/reference/sharpmush-help/pennconf/#html) +- [PUEBLO](/reference/sharpmush-help/pennpueb/#pueblo) ## HTML FUNCTIONS @@ -121,12 +129,13 @@ Will output (in HTML): Non-wizards should see the tag(), endtag(), and tagwrap() functions, which are similar but can be used by mortals. -See also: -- [PUEBLO](#PUEBLO) -- [HTML](#HTML) -- [HTML Functions](#HTML Functions) -[... Previous content ...] +### See Also +- [- [PUEBLO](/reference/sharpmush-help/pennpueb/#pueblo) +- [HTML](/reference/sharpmush-help/pennpueb/#html) +- [HTML Functions](/reference/sharpmush-help/pennpueb/#html-functions) + +[... Previous content ...](/reference/sharpmush-help/pennconf/#previous-content) ## TAG() @@ -144,10 +153,11 @@ Will output (in HTML): <img src="http://www.pennmush.org/image.jpg" align="left" width="300"> ``` -See also: -- [endtag()](#endtag()) -- [tagwrap()](#tagwrap()) -- [html()](#html()) + +### See Also +- [- [endtag()] +- [tagwrap()](/reference/sharpmush-help/pennpueb/#tagwrap) +- [html()](/reference/sharpmush-help/pennpueb/#html) ## ENDTAG() @@ -165,10 +175,11 @@ Will output (in HTML): </b> ``` -See also: -- [tag()](#tag()) -- [tagwrap()](#tagwrap()) -- [html()](#html()) + +### See Also +- [- [tag()] +- [tagwrap()](/reference/sharpmush-help/pennpueb/#tagwrap) +- [html()](/reference/sharpmush-help/pennpueb/#html) ## TAGWRAP() @@ -188,10 +199,11 @@ Will output (in HTML): A particularly important use of this function is `tagwrap(pre, <string>)`. Because Pueblo works like an html browser, spaces and tabs are compressed to a single space. If you have code (a +who function, for example) that relies on exact spacing, surround its output with a tagwrap(pre,...) so that Pueblo will render it as "preformatted" text. -See also: -- [tag()](#tag()) -- [endtag()](#endtag()) -- [html()](#html()) + +### See Also +- [- [tag()] +- [endtag()](/reference/sharpmush-help/pennpueb/#endtag) +- [html()](/reference/sharpmush-help/pennpueb/#html) ## WEBSOCKETS @@ -208,26 +220,28 @@ The different kinds of markup that can be sent to clients are: Without using any HTML markup functions, output is rendered as normal plain text (including ANSI and xterm256 color). -See [HTML Functions](#HTML Functions) for functions used to embed HTML markup tags one at a time. -See [wshtml()](#wshtml()) for help embedding large segments of raw HTML markup to be sent to WebSocket clients. +See [HTML Functions](/reference/sharpmush-help/pennpueb/#html-functions) for functions used to embed HTML markup tags one at a time. +See [wshtml()](/reference/sharpmush-help/pennpueb/#wshtml) for help embedding large segments of raw HTML markup to be sent to WebSocket clients. Support for Pueblo links depends on the WebSocket client, however the example client above supports xch_cmd for command links and xch_hint for tooltip text popups. For clickable command links, embed a link tag with the command to be executed in the "xch_cmd" attribute, e.g. `<a xch_cmd="+who">Who is online?</a>`. You can also send data encapsulated in a JSON object. -See [json()](#json()) for information about formatting data into JSON object strings. -See [wsjson()](#wsjson()) for help sending formatted JSON object strings to WebSocket clients as a JavaScript object. +See [json()](/reference/sharpmush-help/pennfunc/#json) for information about formatting data into JSON object strings. +See [wsjson()](/reference/sharpmush-help/pennpueb/#wsjson) for help sending formatted JSON object strings to WebSocket clients as a JavaScript object. -See [@prompt](#@prompt) for information about sending telnet GOAHEAD prompts. Support for prompts depends on the WebSocket client. The example client above shows prompts on their own line, separating the input and output windows, but requires PROMPT_NEWLINES to be turned off. +See [@prompt](/reference/sharpmush-help/penncmd/#prompt) for information about sending telnet GOAHEAD prompts. Support for prompts depends on the WebSocket client. The example client above shows prompts on their own line, separating the input and output windows, but requires PROMPT_NEWLINES to be turned off. -See also: -- [HTML Functions](#HTML Functions) -- [json()](#json()) -- [pueblo](#pueblo) -- [wshtml()](#wshtml()) -- [wsjson()](#wsjson()) + +### See Also +- [- [HTML Functions](/reference/sharpmush-help/pennconf/#html-functions) +- [json()](/reference/sharpmush-help/pennfunc/#json) +- [pueblo](/reference/sharpmush-help/pennpueb/#pueblo) +- [wshtml()](/reference/sharpmush-help/pennpueb/#wshtml) +- [wsjson()](/reference/sharpmush-help/pennpueb/#wsjson) ## WSHTML() +## WSJSON() `wshtml(<html string>[, <default string>])` `wsjson(<json string>[, <default string>])` @@ -236,7 +250,7 @@ These functions are used to embed HTML and JSON markup into the output for WebSo **wshtml()** embeds *<html string>* as HTML markup, to be rendered as HTML by a WebSocket client. -**wsjson()** embeds *<json string>* as a JSON object which can be captured by a WebSocket client. See [json()](#json()) for information about formatting JSON object strings. +**wsjson()** embeds *<json string>* as a JSON object which can be captured by a WebSocket client. See [json()](/reference/sharpmush-help/pennfunc/#json) for information about formatting JSON object strings. In both cases, the *<default string>* is shown as plain text if the recipient is not WebSocket-enabled. @@ -258,8 +272,9 @@ while non-WebSocket connections and listening objects would see Go to http://pennmush.org ``` -See also: -- [WebSockets](#WebSockets) -- [Pueblo](#Pueblo) -- [HTML Functions](#HTML Functions) -- [JSON Functions](#JSON Functions) \ No newline at end of file + +### See Also +- [- [WebSockets](/reference/sharpmush-help/pennconf/#websockets) +- [Pueblo](/reference/sharpmush-help/pennpueb/#pueblo) +- [HTML Functions](/reference/sharpmush-help/pennpueb/#html-functions) +- [JSON Functions](/reference/sharpmush-help/pennfunc/#json-functions) \ No newline at end of file diff --git a/src/content/docs/reference/sharpmush-help/penntop.md b/src/content/docs/reference/sharpmush-help/penntop.md new file mode 100644 index 0000000..0979f4f --- /dev/null +++ b/src/content/docs/reference/sharpmush-help/penntop.md @@ -0,0 +1,2362 @@ +--- +title: "Top-Level Topics" +description: "SharpMUSH documentation for Top-Level Topics" +--- + +## help +This is the index to the MUSH online help files. + + For an explanation of the help system, type: help newbie + For a walkthrough of PennMUSH systems, type: help getting started + For help finding the helpfile you want: help helpfile + + For the list of MUSH commands, type: help commands + For the list of MUSH topics, type: help topics + For an alphabetical list of all help entries: help entries + For information about PennMUSH: help code + + For a list of flags: help flag list + For a list of functions: help function list + For a list of attributes: help attribute list + To see the configuration of this MUSH: `@config` + + On many MUSHes, list local commands with: `+help` + + If there are any errors in the help text, please notify a wizard in the game, or file an issue at https://github.com/pennmush/pennmush/issues, which is the bug-tracking site for PennMUSH (and its distributed help files) but probably has no relation to this MUSH in particular. + +## help search + +## help/search + +## helpfile + `help <textname>` + `help <namepattern>` + `help/search <pattern>` + `help/query[/brief] <sqlite3query>` + + These commands and switches also work with other things using our helpfile setup: news, ahelp, and any others added. + + help `<textname>` is how to see a help file. +``` + > help helpfile + > help @search +``` + + help `<namepattern>` is a good way to read long helpfilenames or find a pattern you're looking for. If `<namepattern>` matches multiple entries, it will show you their names. +``` + > help @tri*2 + > help sort*() +``` + + If you want to find helpfiles that _contain_ a pattern, use "help/search". For example: +``` + > help/search @trigger + > help/search @switch +``` + + help/query is a more advanced and complex way to search our helpfiles, see [helpfile2](/reference/sharpmush-help/penntop/#helpfile2) for more. + + To add more categories and commands (like 'news'), read "game/txt/README" + + +### See Also +- [textfile()](/reference/sharpmush-help/pennfunc/#textfile) +- [textentries()](/reference/sharpmush-help/pennfunc/#textentries) +- [textsearch()](/reference/sharpmush-help/pennfunc/#textsearch) + +## helpfile2 + +## help query + Displays help entries that match `<pattern>` using an advanced full text search. If the /brief switch is given, only shows the names of matching entries. Without it, also shows a fragment of the entry with matches underlined. + + The pattern is one or more phrases, where each phrase is one or more words (enclosed with quote marks if there's more than one word, or searching for a word with characters like @ or +). A * at the end treats the phrase as a prefix. Phrases can be combined with AND (The default), OR and NOT. The function NEAR(phrase phrase...) matches entries where two or more phrases are near each other. An optional second argument controls how close the matching is. All these operators must appear in upper case. For full details, see https://www.sqlite.org/fts5.html#full_text_query_syntax + + + Examples: +``` + help/query cosine OR tangent + help/query "treated as" + help/query NEAR(player wizard, 20) + help/query "@attrib"* +``` + +## newbie + If you are new to MUSHing, the help files may seem confusing. Most of them are written in a specific style, however, and once you understand it the files are extremely helpful. + + The first line of a help file on a command or function will normally be the syntax of the command. "Syntax" means the way the command needs to be typed in. In the help files, when the syntax of a command is described, square brackets [] mean that that part of the command is optional and doesn't have to be typed in. Also, pointy brackets <> mean that that part of the command needs to be replaced with a specific piece of information. + + You should not type the [] or <> brackets when entering a command. + + See [newbie2](/reference/sharpmush-help/penntop/#newbie2) + +## newbie2 + For example, the syntax of the help command is: + + `help [<topic>]` + + What this means is that to get help, you would type first the word "help" and then you could optionally type the name of a more specific topic in order to get help on that topic. Just typing "help" will work too (that's why the `<topic>` part is optional). + + Some common commands that you should look at help for are: + + look say go page pose get give home + + Just type help `<command>` for help. Example: help page + + See [newbie3](/reference/sharpmush-help/penntop/#newbie3) + +## newbie3 + There is help available on every standard MUSH command. If you see a command or someone mentions one to you that you want to know more about, try just typing: help `<command name>` -- that will most likely bring up the help file on it. + + Please note that just because there is help available on a command does not necessarily mean that the command can be used on this MUSH. The siteadmin of the MUSH can choose to turn off some commands. If there's something that you would like available, and it isn't, please ask a wizard why not. + + It is also highly recommended that any new player read the MUSH manual, written by Amberyl. It is available from http://download.pennmush.org/Manuals/ + + +### See Also +- [Getting Started](/reference/sharpmush-help/penntop/#getting-started) + +## Getting Started + +## GS + +## Walkthrough + This helpfile is a quick walkthrough of some of PennMUSH's standard systems. It uses the same syntax as the other helpfiles; if you're not familiar with the syntax of the PennMUSH helpfiles, please read [newbie](/reference/sharpmush-help/penntop/#newbie) first, as it's explained there. + + For help with getting around, please see [gs moving](/reference/sharpmush-help/penntop/#gs-moving). + + To talk to people in the room with you, see [gs talking](/reference/sharpmush-help/penntop/#gs-talking). + + For a brief guide to the PennMUSH chat system, see [gs chat](/reference/sharpmush-help/penntop/#gs-chat). + + For information on how to send and read mail using PennMUSH's built-in mail system, `@mail`, please type 'help gs mail'. + +## GS MOVING + To see the room you're in, type 'look'. You'll probably see something similar to this (though some MUSHes customize the appearance of rooms): + + Example Room + This is an example room. It has a rather boring description. + Contents: + Bob + Sports car + Obvious exits: + Next Room and Out + + The first line is the name of the room you're in, followed by the room's description, a list of other people (and objects) in the room, and finally a list of exits to other rooms. + + To move through one of the exits, you can simply type its name (Out), or you can use the "goto" command (goto Out). + + See [gs moving2](/reference/sharpmush-help/penntop/#gs-moving2) + +## GS MOVING2 + All players on a MUSH have a "home", which is usually the room you started in. You can go back to your home by just typing 'home', or 'goto home'. Some MUSHes may also allow you to change your home to somewhere else; you can do that by typing '`@link` me=here' when you're in the room. + + There may be some objects on the game that you can go inside (wagons or cars, for instance). You can do that by typing 'enter `<object>`', and can leave again by typing 'leave'. For instance, 'enter sports car'. + + It's also sometimes possible to teleport from one room to another, using the '`@teleport`' command. However, most new players on a game probably won't be able to do that - it's mentioned here only for completeness. + + +### See Also +- [goto](/reference/sharpmush-help/penncmd/#goto) +- [home](/reference/sharpmush-help/penntop/#home) +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [@teleport](/reference/sharpmush-help/penncmd/#teleport) +- [@link](/reference/sharpmush-help/penncmd/#link) + +## GS TALKING + You can talk to others in the room with you (those listed in the 'Contents' of the room) in a number of ways. The easiest is to use the 'say' command. + + For example, when you type: + say Hello! + you'll see: + You say, "Hello!" + and everyone else in the room will see: + Lisa says, "Hello!" + + You can abbreviate the command to just: + "Hello! + if you wish; it works exactly the same. + + See [gs talking2](/reference/sharpmush-help/penntop/#gs-talking2) + +## GS TALKING2 + You can also perform actions, using the 'pose' command, or ':' for short. + For example: + pose waves! or + :waves! + will both show: + Lisa waves! + to everyone in the room (including yourself). If you don't want a space after your name, use 'semipose' (or ';') instead: + ;'s waving! + will show: + Lisa's waving! + + If you don't want your name to be added at all, you can use the '`@emit`' command, or '\' for short: + `@emit` Smiling, Lisa waves, "Hello!" + will show everyone in the room: + Smiling, Lisa waves, "Hello!" + + However, make sure you include your name somewhere, so people know who's talking. + + +### See Also +- [GS CHAT](/reference/sharpmush-help/penntop/#gs-chat) +- [say](/reference/sharpmush-help/penncmd/#say) +- [pose](/reference/sharpmush-help/penncmd/#pose) +- [semipose](/reference/sharpmush-help/penncmd/#semipose) +- [@emit](/reference/sharpmush-help/penncmd/#emit) + +## GS CHAT + +## GS CHANNELS + PennMUSH has a built-in channel system, which allows you to talk with players who are on the same channels as you, even if you're in different rooms. + + Most games have a number of different channels, either for discussing different subjects, or for different groups/factions of players to chat on. + + To see a list of channels, type '`@channel`/list'. This shows the names of all the channels, whether or not you're on the channel, and some other information (the rest is explained in [channel-list](/reference/sharpmush-help/pennchat/#channel-list)). + + To join a channel, type '`@channel`/on `<channel>`'. To leave it again, use '`@channel`/leave `<channel>`'. If you want to stop hearing a channel for a while without leaving it totally, use '`@channel`/gag `<channel>`'. + + See [gs chat2](/reference/sharpmush-help/penntop/#gs-chat2) + +## GS CHAT2 + When you've joined a channel, you can chat on it in two ways: + + +`<channel>` `<message>` + `@chat` `<channel>`=`<message>` + + You don't need to type the entire channel name, just enough letters to make it distinct from other channels. For instance, '`+pub` Hello'. + + When you talk on a channel, everyone who is on the channel will see the channel name in '<>' angle brackets, then your name and the message. + For example, '`+pub` Hello' will show everyone + `<Public>` Skye says, "Hello" + If the `<message>` starts with a ':' or ';' it will be posed or semiposed, respectively. For example, '`+pub` :waves' shows + `<Public>` Skye waves. + + Some games customize the appearance of channels a little (for instance, adding color or using '[]' square brackets instead of angle brackets), so it may look a little different. + + There's much more you can do with the channel system - see [`@channel`] for the other commands. + +### See Also +- [GS TALKING](/reference/sharpmush-help/penntop/#gs-talking) +- [@channel](/reference/sharpmush-help/pennchat/#channel) +- [@chat](/reference/sharpmush-help/pennchat/#chat) + +## GS MAIL + PennMUSH has a built-in mail system that lets you send messages to players, even if they aren't online. You can keep mail you receive for as long as you like, and re-read it any time. + + To list all the messages you've received, type '`@mail`'. You'll see something like: + + ------------------------- MAIL (folder 0) ---------------------------- + [-----](/reference/sharpmush-help/pennconf/) 0:1 One Welcome! Wed Dec 08 09:57 + [-----](/reference/sharpmush-help/pennconf/) 0:2 *Mike Example Mail Sat Dec 11 07:55 + ------------------------------------------------------------------------- + + The number after the ':' is the message number; to read that message, type '`@mail` `<number>`'. + + See [gs mail2](/reference/sharpmush-help/penntop/#gs-mail2) + +## GS MAIL2 + To send mail to someone, type: + `@mail` `<recipients>`=[`<subject>`/]`<message>` + + You can send a message to more than one person at a time, just include the names of all the people you want to send to in `<recipients>`. The `<subject>` is optional. For example: + + `@mail` qa'toq anne=Test/Hi! This is a test message! + + You can do other, slightly more complex things with the mail system, too, like filing your messages into different folders. See [`@mail`] for more information. + + +### See Also +- [@mail](/reference/sharpmush-help/pennmail/#mail) + +## topics +Help is available on the following topics: + + ACTION LISTS ANCESTORS ANONYMOUS ATTRIBUTES + ATTRIB-OWNERSHIP ATTRIBUTES BOOLEAN VALUES + CHAT CLIENTS CONTROL + COPYRIGHT COSTS CREDITS + DBREFS DROP-TO ENACTOR + EVALUATION EXECUTOR EXITS + FAILURE FLAGS FUNCTIONS + GENDER GLOBALS HERE + HOMES INTERIORS LINKING + LISTENING LISTS LOOPING + MASTER ROOM MATCHING ME + + See [topics2](/reference/sharpmush-help/penntop/#topics2) + +## topics2 + MONEY MUSHCODE NON-STANDARD ATTRIBUTES + PARENTS POWERS PUPPETS + QUEUE REGEXPS REGISTERS + SEMAPHORES SETTING-ATTRIBUTES SPOOFING + STACK STRINGS SUBSTITUTIONS + SUCCESS SWITCHES TYPES OF OBJECTS + USER-DEFINED COMMANDS VERBS WARNINGS + WILDCARDS ZONE MASTER ROOMS ZONE MASTERS + ZONES + +Type 'help `<topic name>`' for help. +For a list of all topics, see [entries](/reference/sharpmush-help/pennconf/#entries). + +## ACTION LISTS + An "action list" is simply a list of MUSH commands which are run together, one after the other. Each command in the list is separated by a semicolon. Action lists appear in many places: in user-defined commands, triggered in `@a`-attributes by the MUSH, and even as arguments to other commands, like `@switch` and `@dolist`. + + If part of the command (such as the text in an `@emit`, for example) contains a semi-colon, you may need to enclose that part in curly braces {}. You can also nest action lists inside each other by enclosing each action list in braces {}. + + Substitution will be performed on the contents of action lists before they are executed. + + See [action2](/reference/sharpmush-help/penntop/#action2) + +### See Also +- [@-ATTRIBUTES](/reference/sharpmush-help/penncmd/#attributes) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [$-COMMANDS] + +## ACTION2 + Example 1: +``` + > @asuccess Gift=@pemit %#={The box pops open; surprise!} ; @name me=New Toy ; @desc me=A shiny new toy, just for %n! + > take gift + The box pops open; surprise! + > look new toy + New Toy + A shiny new toy, just for Cyclonus! +``` + + Example 2: +``` + > &TEST me=$test:@emit {Testing; testing; one, two.} ; @dolist 1 2 3={think Test %i0, success.} + > test + Testing; testing; one, two. + Test 1, success. + Test 2, success. + Test 3, success. +``` + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [SUBSTITUTION](/reference/sharpmush-help/pennconf/#substitution) +- [@asuccess](/reference/sharpmush-help/penncmd/#asuccess) +- [@dolist](/reference/sharpmush-help/penncmd/#dolist) + +## ANCESTORS + ANCESTORS + + Objects can inherit attributes and locks from other objects through the use of parents. An object's parent, its parent's parent, its parent's parent's parent, etc. constitute the object's "parent chain" and lookups work the way up the chain until an inheritance occurs. + + Ancestors are "virtual parents" that are assumed to be last on every parent chain. There is one ancestor for each object type (room, exit, thing, player), and `@config` lists the dbref of each ancestor object (`@config` ancestor_room, etc). Under normal circumstances, if an attribute/lock can't be retrieved from an object or any of its explicit parents, the attribute will be looked for on the appropriate ancestor. The ORPHAN flag may be set on an object to cause lookups on that object to ignore ancestors (like the pre-ancestor behavior). + + Ancestors may themselves have parent chains, but these are (obviously) not virtually terminated by ancestors. + + Note that the choice of which ancestor to look up is based on the type of the *child* object, as is the check of the ORPHAN flag. Also note that ancestors are *not* checked for `$-commands` or ^-commands; you should use the master room for global commands, instead. + + +### See Also +- [PARENTS](/reference/sharpmush-help/penntop/#parents) +- [ORPHAN](/reference/sharpmush-help/pennflag/#orphan) + +## ANONYMOUS ATTRIBUTES + +## LAMBDA + +## #LAMBDA + +## #APPLY + In many cases where a function expects a object/attribute pair that refers to an attribute to evaluate, you can use the form + + #lambda/<code> + + instead, and the code will be treated as an attribute's body. The code will normally be parsed twice, so special characters should be escaped where needed. + + If the #lambda just calls one other function, the form + + #apply[<number of arguments>](/reference/sharpmush-help/pennconf/#number-of-arguments)/<function name> + + can be used instead. If the argument count is left out, it defaults to 1. + + These anonymous attributes should be used for short and simple pieces of code. Anything long or complicated should go in an actual attribute, for readability and maintainability. + + See [ANONYMOUS2](/reference/sharpmush-help/penntop/#anonymous2) + +## ANONYMOUS2 + +## LAMBDA2 + +## #LAMBDA2 + A typical usage of anonymous attributes would be to convert a list of dbrefs to names, as so: + +``` + > say map(#lambda/name(\%0), #3 #12 #23) + You say, "Joe Robert Sally" +``` + + The following version uses #apply instead: + +``` + > say map(#apply/name, #3 #12 #23) +``` + + Because the code is parsed twice, you can actually build parts of it in place, which is very convenient. Consider this implementation of a lattrval function, which is like `lattr()` but it only returns non-empty attributes: + +``` + > &lattrval me=filter(#lambda/hasattrval([decompose(before(%0, /))], \%0), lattr(%0)) +``` + + The first time '#lambda/hasattrval([decompose(before(%0, /))], \%0)' is parsed in a call like 'u(lattrval, #1234)', it is turned into '#lambda/hasattrval(#1234, %0)', thus avoiding the need for a `setq()` or the like to store the top-level %0 for use in a real attribute called by `filter()`. However, this can lead to problems with evaluating un-trusted code. Use `decompose()` where neccessary. + + See [ANONYMOUS3](/reference/sharpmush-help/penntop/#anonymous3) + +## ANONYMOUS3 + +## LAMBDA3 + +## #LAMBDA3 + You can also use `lit()` to avoid having the code evaluated twice, if needed. For example, this code, which returns all unlinked exits in a room: + + &lunlinked me=filter(lit(#lambda/strmatch(loc(%0), #-1)), lexits(%0)) + + This approach is useful both for security in making it harder to evaluate a string that shouldn't be, and for making the code look nicer by not having to escape percent signs, brackets, and other special characters. However, it also makes it harder to build the code string on the fly. Use what's most appropriate. + + Finally, a multiple argument example of #apply, which requires less escaping than #lambda for cases where you're just calling another function: + +``` + > think mix(#apply2/ansi, r g b, foo bar baz) +``` + + See [ANONYMOUS4](/reference/sharpmush-help/penntop/#anonymous4) + +## ANONYMOUS4 + +## LAMBDA4 + +## #LAMBDA4 + +## LAMBDA FUNCTIONS + The following functions support anonymous attributes: + + filter() filterbool() fold() foreach() map() mapsql() + mix() munge() namelist() sortby() sortkey() speak() + `step()` + +## ATTRIB-OWNERSHIP + ATTRIBUTE OWNERSHIP + + The latest person to set an attribute on an object is the owner of that attribute. If you lock an attribute, using the `@atrlock` command, only the person who owns the attribute will be able to alter the attribute. This allows you to create standard commands on objects and then `@chown` them to others without letting them alter them. + + Attribute ownership is NOT changed when the object itself is `@chown`'ed. To change attribute ownership, you must use the `@atrchown` command. + + You must control an object in order to set attributes on it. + + +### See Also +- [@atrlock](/reference/sharpmush-help/penncmd/#atrlock) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +- [owner()](/reference/sharpmush-help/pennfunc/#owner) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) + +## ATTRIBUTES + +## ATTRIBUTES LIST + +## ATTRIBUTE LIST + Attributes with (*) after them are special, cannot be set by players, and may only be visible to wizards or admin. For those attributes, there is no @-command, so you can just type 'help `<attribute name>`' for help. For all other attributes, type 'help @`<attribute name>`' for help. + +Standard Attributes: (see `@list`/attribs for the complete list) + AAHEAR ACLONE ACONNECT ADESCRIBE ADISCONNECT + ADROP AEFAIL AENTER AFAILURE AHEAR + ALEAVE ALFAIL AMHEAR AMOVE APAYMENT + ASUCCESS AWAY CHARGES COST DESCRIBE + DROP EALIAS EFAIL ENTER FAILURE + FORWARDLIST HAVEN IDESCRIBE IDLE LALIAS + LAST (*) LASTIP (*) LASTLOGOUT(*) LASTSITE (*) LEAVE + LFAIL LISTEN MOVE ODESCRIBE ODROP + OEFAIL OENTER OFAILURE OLEAVE OLFAIL + OMOVE OPAYMENT OSUCCESS OXENTER OXLEAVE + OXMOVE PAYMENT QUEUE (*) RQUOTA (*) RUNOUT + SEX STARTUP SUCCESS TFPREFIX + + See [attributes2](/reference/sharpmush-help/penntop/#attributes2) + +## ATTRIBUTES2 + An attribute is part of the code on an object that makes it unique. An attribute can contain any sort of text -- from a single word, to a long paragraph, to a piece of MUSHcode. Some attributes are standard in PennMUSH. That means that their effects are pre-set. + + Standard attributes can be set using one of the following commands: + @`<attribute name>` `<object>`=`<content>` + `@set` `<object>`=`<attribute name>`:`<content>` + &`<attribute name>` `<object>`=`<content>` + + It is also possible to have non-standard attributes, which can be named anything you like. Please see [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) for more information on those. + + See [attributes3](/reference/sharpmush-help/penntop/#attributes3) + +## ATTRIBUTES3 + Any attribute name can be shortened, but a shorter forms run the risk of conflicting with other attribute names. This could result in you setting an unwanted attribute. + + For example: + `@adesc` me=think %n looks at you. + will set your ADESCRIBE attribute just as + `@adescribe` me=think %n looks at you. + would. + + To see the attributes that are set on you or on any of the objects you own, you should use the "examine" command. See [examine](/reference/sharpmush-help/penncmd/#examine). + + See [attributes4](/reference/sharpmush-help/penntop/#attributes4) + +## ATTRIBUTES4 + Attributes can be owned by someone other than the object they are set on. This allows the person to change the content of just that attribute while not the rest of the object. Attributes can also be locked, which prevents them from being changed by anyone. + + In addition to the standard attributes with pre-set effects, there are some special attributes that date from the days before you could set non-standard attributes with any name you wanted. These are the attributes VA-VZ, WA-WZ, XA-XZ. These attributes have no pre-set effects, and were just to allow players to store any text or MUSHcode that they wished in those attributes. Now that non-standard attributes are available, it is highly recommended that you instead use them, since you can use longer and descriptive names for attributes, which makes it much easier to examine and work on objects. + + +### See Also +- [ATTRIB-OWNERSHIP](/reference/sharpmush-help/penntop/#attrib-ownership) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [examine](/reference/sharpmush-help/penncmd/#examine) +- [@atrchown](/reference/sharpmush-help/penncmd/#atrchown) +- [@atrlock](/reference/sharpmush-help/penncmd/#atrlock) +- [hasattr()](/reference/sharpmush-help/pennfunc/#hasattr) +- [get()](/reference/sharpmush-help/pennfunc/#get) +- [v()](/reference/sharpmush-help/pennfunc/#v) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +- [SETTING-ATTRIBUTES](/reference/sharpmush-help/penntop/#setting-attributes) +- [ATTRIBUTE TREES](/reference/sharpmush-help/pennattr/#attribute-trees) + +## BOOLEAN VALUES + + A boolean variable, for those of you not familiar with programming, is a variable that is either true or false. Normally, a value of 1 is considered "true" and a value of 0 is considered "false". Many MUSH functions return either 1 if they are true or 0 if false. For example, the `hasflag()` function tests to see if an object has a certain flag set on it. If hasflag(`<object>`,`<flag name>`) is true (the object has the flag), it will return 1. If it is false, it will return 0. + + Other functions expect to operate on boolean values. What they consider "true" or "false", however, depends on the setting of the "tiny_booleans" config option (`@config` tiny will show this). + + See [boolean2](/reference/sharpmush-help/penntop/#boolean2) + +## BOOLEAN2 + If tiny_booleans is... + no FALSE: null string, 0, any negative db + TRUE: everything else + yes TRUE: numbers other than 0, strings beginning with numbers other than 0 + FALSE: everything else + + Or, put another way: + Value tiny_booleans=no tiny_booleans=yes Gotcha + 0 FALSE FALSE + non-zero number TRUE TRUE + #<non-negative> TRUE FALSE * + #<negative> FALSE FALSE + + null string FALSE FALSE + 0<non-numbers..> TRUE FALSE * + <non-numbers...> TRUE FALSE * + + See [boolean3](/reference/sharpmush-help/penntop/#boolean3) + +## BOOLEAN3 + + Examples (assuming tiny_booleans is "no"): + not(foo) = 0 + not(`<null string>`) = 1 + not(-66) = 0 + not(0) = 1 + not(#-1) = 1 + not(#12) = 0 + And so on... + (note: These rules only apply when a function expects a Boolean value, not for strings that expect other values.) + + +### See Also +- [BOOLEAN FUNCTIONS](/reference/sharpmush-help/pennfunc/#boolean-functions) +- [not()](/reference/sharpmush-help/pennfunc/#not) +- [t()](/reference/sharpmush-help/pennfunc/#t) + +## CLIENTS + Clients are special software programs that you can use to connect to MUSHes. They are usually much nicer to use than raw telnet and give you many additional features, such as larger text buffers (so you can type more), backscroll, history of previous commands, macros, and so on. + + Here is a list of common clients and the web sites where they can be found. Please note that the below sites are subject to change. The below are listed solely for your information and possible benefit. The developers of PennMUSH have nothing to do with the clients. Except for Potato, which is made by Mike. Not that this is a shameless plug. Noooo. Carry on. + + OPERATING + SYSTEM CLIENT WEB SITE + ----------------------------------------------------------------------- + UNIX Tinyfugue http://tinyfugue.sourceforge.net + Potato http://www.potatomushclient.com + WINDOWS MUSHClient http://www.mushclient.com + SimpleMU http://simplemu.onlineroleplay.com + MuckClient http://www.xcalibur.co.uk/MuckClient/ + Potato http://www.potatomushclient.com + MAC OS X Savitar http://www.heynow.com/Savitar/ + Atlantis http://www.riverdark.net/atlantis/ + Potato http://www.potatomushclient.com + Unix clients will also run on OS X. + +## CONTROL + Controlling an object basically means that you have the power to change the object's characteristics such as flags and attributes. It may also mean that you have the ability to destroy it. + + These checks are performed, from top to bottom, to see if object O controls object V: + 1. If O has the Guest power, O does not control V + 2. If O and V are the same object, O controls V + 3. If V is God, O does not control V + 4. If O is a Wizard, O controls V + 5. If V is a Wizard, O does not control V + 6. If V is Royalty and O is not, O does not control V + 7. If O is MISTRUST, O does not control V + 8. If O and V are owned by the same player, and either: + a. V is not set TRUST, or + b. O is set TRUST + then O controls V + 9. If V is a player, or set TRUST, O does not control V + 10. If the zone_control_zmp_only `@config` option is set to 'No', V is on a Zone, and O passes the Zone's `@lock`/zone, O controls V + 11. If V is owned by a SHARED player, and O passes the owner's `@lock`/zone, O controls V + 12. If V has an `@lock`/control, and O passes the lock, O controls V + 13. O does not control V + + +### See Also +- [controls()](/reference/sharpmush-help/pennfunc/#controls) +- [TRUST](/reference/sharpmush-help/pennconf/#trust) +- [MISTRUST](/reference/sharpmush-help/pennconf/#mistrust) +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [SHARED PLAYERS](/reference/sharpmush-help/penntop/#shared-players) + +## COSTS + Some things on the MUSH cost pennies. The default costs are shown below: + + `@dig`: 10 pennies + `@create`: 10 pennies (or more) + `@search`: 100 pennies * + `@link`: 1 penny (if you didn't already own it, +1 to the previous owner) + `@open`: 1 penny (2 pennies if linked at the same time) + + Type '`@config`/list costs' to get the costs for the MUSH you are on. + + +### See Also +- [MONEY](/reference/sharpmush-help/penntop/#money) +- [money()](/reference/sharpmush-help/pennfunc/#money) +- [score](/reference/sharpmush-help/penncmd/#score) + +## CREDITS + Maintainer: Raevnos [SW] + Developers: Greg Millam [GM], Mike Griffiths [MG], Intrevis, Tim Krajcar/Rince [TK] + Past Porters: Nick Gammon [NJG](/reference/sharpmush-help/pennconf/#njg) (win32), Dan Williams [DW] (MacOS), Sylvia (OS/2) + Former developers: Rhyanna [RLM](/reference/sharpmush-help/pennconf/#rlm), Trivian [TN], Halatir [LdW](/reference/sharpmush-help/pennconf/#ldw), Talek [TAP](/reference/sharpmush-help/pennconf/#tap), Javelin, Ervin Hearn III [EEH](/reference/sharpmush-help/pennconf/#eeh) + + The original TinyMUSH 1.0 code was written by Lawrence Foard, and was based upon James Aspnes' TinyMUD server. Since then, the code has been modified by the programmers of MicroMUSE (then MicroMUSH), and Joseph Traub (Moonchilde of PernMUSH). From January 1992 to January 1995, Lydia Leong (Amberyl of PernMUSH / Polgara of Belgariad) maintained the code currently known as PennMUSH 1.50. From January 1995 until July 2006, Alan Schwartz (Paul of DuneMUSH / Javelin elsewhere) maintained this code, along with a development team. From July 2006 on, Raevnos has been the maintainer. + + Big thanks to the developers of TinyMUSH 2.0, 2.2 [2.2](/reference/sharpmush-help/pennconf/#22), 3.0 [3], MUX2, and Rhost [Rhost](/reference/sharpmush-help/pennconf/#rhost) servers, as well as to the players of Belgariad MUSH, DuneMUSH, and M*U*S*H, and everyone else using this server! + + +### See Also +- [code](/reference/sharpmush-help/penncode/#code) +- [license](/reference/sharpmush-help/penncode/#license) + +## DATABASE + +## DBREFS + +## DBREF NUMBER + +## DBREF # + You will find the term "dbref" or "dbref number" used frequently in these help files and in MUSHcode. It is an abbreviation of "database reference number". + + The database is the part of MUSH that stores all the information about this particular MUSH. Players, things, rooms, and exits are all objects in the database. Each object in the database has a unique dbref number that is set when the object is created. You can use the dbref number to refer to an object that is not in your current location, and it is especially important for global code. + + Using DBREFs is also faster than using names, even if the object is in your location. This is because whenever you try to do something with an object (such as look at it, take it, etc.), the MUSH first has to locate the object. Since the dbref is unique, it can immediately find the object rather than checking through all the contents of your area to see if one matches the name. + + See [dbref2](/reference/sharpmush-help/penntop/#dbref2) + +## DBREF2 + + If you own or control an object, you will see its dbref number listed right after its name when you look at it (unless you are set MYOPIC). + + + Example: +``` + > look me + Cyclonus(#3PWenAMc) + A very short desc. +``` +``` + The dbref number is indicated by the number/pound sign (#). Cyclonus's dbref is #3. The letters following the dbref are the abbreviations of the flags set on the object. NOTE: the abbreviation of the OPAQUE flag is 'O' (o), which looks like '0' (zero) on some clients. Make sure you have the right number before using it in your code! +``` + +### See Also +- [MYOPIC](/reference/sharpmush-help/pennflag/#myopic) +- [OPAQUE](/reference/sharpmush-help/pennflag/#opaque) +- [MUSHCODE](/reference/sharpmush-help/penntop/#mushcode) +- [MATCHING](/reference/sharpmush-help/penntop/#matching) +- [OBJIDS](/reference/sharpmush-help/penntop/#objids) + +## OBJIDS + +## OBJECT IDS + + When an object is destroyed, its dbref number will eventually be recycled and given to a newly created object. This can cause problems in code, particularly in database code which stores members of a group, as code which was meant to refer to the old object ends up referring to the new one by mistake. + + To avoid this problem, you can use the "object id", or objid, instead of the dbref. An object id consists of the object's dbref, a colon, and then the object's creation time. Objids can be used anywhere dbrefs can and, because the creation time is different each time the dbref is recycled, the objid is totally unique to each object. + + The `objid()` function returns the object id of an object, and the %: substitution evaluates to the objid of the enactor. + + +### See Also +- [objid()](/reference/sharpmush-help/pennfunc/#objid) +- [@lock-objid](/reference/sharpmush-help/pennlock/#lock-objid) +- [DBREFS](/reference/sharpmush-help/penntop/#dbrefs) + +## DROP-TOS + +## DROPTOS + + When you use the `@link` command on a room, it sets another room or object as the DROP-TO location. By default, any non-STICKY object that someone drops in the room will automatically be transported to the drop-to location, rather than staying in the room. Any STICKY object dropped in the room will go to its home. + + If the room is set STICKY, objects will stay in the room until the last player leaves or disconnects, at which point they will be transported as described above. + + Drop-tos work on things and players alike. + + If the room has a `@lock`/dropto set on it, only objects that pass the lock will be transported (either immediately or when the last player leaves if the room is STICKY). This can be used to prevent the dropto from acting on, say, objects containing connected players. + + +### See Also +- [@link](/reference/sharpmush-help/penncmd/#link) +- [STICKY](/reference/sharpmush-help/pennflag/#sticky) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) +- [@lock](/reference/sharpmush-help/penncmd/#lock) + +## %# + +## %n + +## %k + +## %~ + +## %: + +## ENACTOR + The enactor is the object which causes something to happen. This is an important concept in MUSH, because the way many commands work will depend on who enters the command (ie, who the enactor is). Note that while the enactor is the object which -caused- code/a command to run, it is not necessarily the object which is running the code (that's the executor). Any type of object can be an enactor. + + There are eight %-substitutions that involve the enactor: + %# = the enactor's dbref + %n = the enactor's name + %~ = the enactor's accented name + %k = the enactor's name, colored by their `@moniker` (if any) + %: = the enactor's unique identifier, like objid(%#) + %a, %o, %p, %s = pronoun substitutions, based on the enactor's `@sex`. See [gender](/reference/sharpmush-help/penntop/#gender) for more information. + + If, for example, you have an `@osuccess` on an object that includes the %n subtitution, whenever someone picks up the object, that %n will evaluate to the name of the enactor (the person who typed 'get `<object>`' in this case). + + +### See Also +- [EXECUTOR](/reference/sharpmush-help/penntop/#executor) +- [CALLER](/reference/sharpmush-help/penntop/#caller) +- [SUBSTITUTIONS](/reference/sharpmush-help/penntop/#substitutions) +- [DBREF](/reference/sharpmush-help/pennconf/#dbref) + +## %! + +## EXECUTOR + The executor of a command is the object actually carrying out the command or running the code. This differs from the enactor, because the enactor is the object that sets off the command. In some cases, the enactor and the executor will be the same. The substitution %! evaluates to the dbref of the executor of the code. + + For example: +``` + > @emit %n (%#) is the enactor and %! is the executor! + Cyclonus (#6) is the enactor and #6 is the executor! + > @create Box + Created: Object #10 + > &EMIT box=$emit: @emit %n (%#) is the enactor and %! is the executor! + > emit + Cyclonus (#6) is the enactor and #10 is the executor! +``` + + In the first case, Cyclonus directly entered the command and was therefore both the enactor and the executor. In the second, Cyclonus set off the command on the box, so Cyclonus was still the enactor, but the box was the object that was actually doing the `@emit`, and was thus the executor. + + +### See Also +- [ENACTOR](/reference/sharpmush-help/penntop/#enactor) +- [CALLER](/reference/sharpmush-help/penntop/#caller) +- [SUBSTITUTIONS](/reference/sharpmush-help/penntop/#substitutions) + +## %@ + +## CALLER + The caller is the object which causes an attribute to be evaluated (for instance, by using `ufun()` or a similar function). The substitution %@ evaluates to the caller's dbref. It's particularly useful for functions with side-effects, to check that the object evaluating the function has permission. + + + Example: +``` + > &cmd_test Foo=$test: @emit ufun(Bar/fun_test) + > &fun_test Bar=%n(%#) typed 'test', and [name(%@)](%@) ufun()'d this! + > test + Mike(#5) typed 'test', and Foo(#6) ufun()'d this! +``` +``` + > &wizfun Foo=if(hasflag(%@, Wizard), ufun(wizfun2), #-1 Sorry) +``` + +### See Also +- [ENACTOR](/reference/sharpmush-help/penntop/#enactor) +- [EXECUTOR](/reference/sharpmush-help/penntop/#executor) + +## EVALUATION ORDER + Whenever some text is entered by an object, the MUSH attempts to match it against a valid game command in the following order of possible commands: + + Socket commands (*): QUIT, SCREENWIDTH, etc + Single-token commands: ", :, ;, +, \, # + MUX-style channel aliases, if enabled (see [muxcomm](/reference/sharpmush-help/pennconf/#muxcomm)) + Exits in the room + &attribute setting + Regular game commands: get, inventory, `@emit`, etc + `@attribute` setting + Enter aliases + Leave aliases + User-defined commands on nearby objects. All such `$-commands` are matched and executed. + If there are no user-defined commands nearby: + If the zone of the player's location is a zone master room, + Zone master room exits + Zone master room user-defined commands + Else + User-defined commands on the zone of the player's location + + (*) Socket commands are only matched when the command is entered by a player directly from their client. + + See [evaluation2](/reference/sharpmush-help/penntop/#evaluation2) + +## EVALUATION2 + If still nothing is matched: + User-defined commands on the player's personal zone + If nothing, including zone commands, has been matched: + Global exits + Global user-defined commands: all `$-commands` in the Master Room are matched. Local commands are always checked first and ALWAYS negate global commands. + If still nothing has matched, run huh_command to show a Huh? message + + Because local `$-commands` overrule global `$-commands`, you can easily prevent a global `$-command` from working in a specific room by setting a copy of the global `$-command` in that room. Alternatively, if a global `$-command` is oddly not working in a room, you should check for copies of the command word in the room (using `@scan`). Wizards who want to ensure a global `$-command` always takes precedence over a local one should use `@command`/add and `@hook`/override, to make the command run as a regular game command instead of a softcoded global. + + +### See Also +- [@command](/reference/sharpmush-help/penncmd/#command) +- [@hook](/reference/sharpmush-help/penncmd/#hook) +- [$-commands] +- [huh_command](/reference/sharpmush-help/penncmd/#huhcommand) + +## FAILURE + FAILURE + + A "failure" usually occurs when you try to do something that is governed by an `@lock` and you don't pass the lock. If you try to take a player or thing, or pass through an exit, and you don't pass its Basic `@lock`, you will set off their `@failure`/`@ofailure`/`@afailure` attributes. A few failures have special attributes, while others use `<locktype>`_LOCK`FAILURE, `<locktype>`_LOCK`OFAILURE and `<locktype>`_LOCK`AFAILURE attributes. + + See [failure2](/reference/sharpmush-help/penntop/#failure2) + + See [@lock](/reference/sharpmush-help/penncmd/#lock) + + +### See Also +- [verbs](/reference/sharpmush-help/penntop/#verbs) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@failure](/reference/sharpmush-help/penncmd/#failure) +- [@efail](/reference/sharpmush-help/penncmd/#efail) +- [@lfail](/reference/sharpmush-help/penncmd/#lfail) + +## failure2 + The following failures are defined in PennMUSH: + + Failure to... Lock Attribute + --------------------------------------------- -------- -------------------- + "get" a player/thing, pass through an exit, Basic `@failure` + or "look" in a room + run an `$-command` on an object Command* COMMAND_LOCK`FAILURE + use `zwho()` Zone ZONE_LOCK`FAILURE + leave your current location Leave `@lfail` + "take" from an object Take TAKE_LOCK`FAILURE + "drop" a thing, or drop something in a room Drop DROP_LOCK`FAILURE + enter an object Enter `@efail` + "follow" an object Follow FOLLOW_LOCK`FAILURE + "give" an object away Give GIVE_LOCK`FAILURE + "give" money to or "buy" from an object Pay PAY_LOCK`FAILURE + "`@chzone`" something to a zone Chzone CHZONE_LOCK`FAILURE + "use" an object Use `@ufail` + speak via say/pose/@*emit/teach in a room Speech SPEECH_LOCK`FAILURE + "page" or "`@pemit`" to an object Page PAGE_LOCK`FAILURE** + "`@mail`" a player Mail MAIL_LOCK`FAILURE + + * The Use lock can also prevent you from running an `$-command`, but it will still trigger COMMAND_LOCK`FAILURE. + ** `@haven` or `@away` will also be shown on failure to "page", if set + +## GENDER + +## SEX + Gender on a MUSH is entirely up to you. You can set yourself (or any of your objects) to be male, female, neuter, or plural. If whatever is in the SEX attribute is not recognizable, the MUSH will assume the object is neuter. Setting a gender attribute will enable pronoun substitution by the MUSH. The SEX attribute is visual to anyone who wants to see it. + + The `obj()`, `subj()`, `poss()` and `aposs()` functions return different pronouns for an object based on its `@sex`, and the %o, %s, %p and %a substitutions return the same pronouns for the enactor. + + +### See Also +- [@sex](/reference/sharpmush-help/penncmd/#sex) +- [SUBSTITUTION](/reference/sharpmush-help/pennconf/#substitution) + +## GLOBALS + +## GLOBAL COMMANDS + A command is "global" if it can be used anywhere in the world of the MUSH. The standard/built-in MUSH commands are all global, so this term is usually used to refer to user-defined commands on objects in the Master Room of the MUSH. Global commands very greatly from MUSH to MUSH, but you can usually find MUSH-specific help on them by typing "`+help`". + + +### See Also +- [MASTER ROOM](/reference/sharpmush-help/penntop/#master-room) +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) + +## HERE + The word 'here' refers to the room you are in. For example, to rename the room you're in (if you control it), you could use: + +``` + > @name here=<new name> +``` + + +### See Also +- [MATCHING](/reference/sharpmush-help/penntop/#matching) + +## HOMES + +## HOME + Every thing or player has a home, which is usually the room where it was created. You can reset your home or the home of any object you own with the `@link` command: `@link` [me | `<object>`]=`<location>`. You must also control `<location>`, unless that location (room or thing) is set ABODE or LINK_OK. + + When a player types 'home', she is sent back to the home room. When a thing with the STICKY flag set on it is dropped, it also goes to its home location. Note that if the FIXED flag is set on a player, she cannot use the 'home' command. + + You can create an exit that sends players home by doing: +``` + > @link <exit name>=home + You can set the drop-to in a room to home by doing: + > @link <room dbref or "here">=home +``` + + The home of an exit is its source (the room it's located in). You can change the home/source of an exit by `@teleporting` it to another room. + + The home of a room is its drop-to. + + +### See Also +- [DROP-TOS](/reference/sharpmush-help/penntop/#drop-tos) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [STICKY](/reference/sharpmush-help/pennflag/#sticky) +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) +- [FIXED](/reference/sharpmush-help/pennflag/#fixed) +- [EXITS](/reference/sharpmush-help/penntop/#exits) +- [home()](/reference/sharpmush-help/pennfunc/#home) +- [loc()](/reference/sharpmush-help/pennfunc/#loc) + +## INTERIORS + Here's a quick description of how to make things that can be entered: + + `@create` Car + `@desc` Car=A shiny red car. + `@idesc` car=You are sitting inside a luxurious sportscar. + `@set` Car=enter_ok + `@oxleave` car=climbs out of the car. { The 'ox' messages are shown to + `@oxenter` car=climbs into the car. { those OUTSIDE the object. + `@oenter` car=joins you inside the car. { The 'o' messages are shown to + `@oleave` car=gets out of the car. { those INSIDE the object + `@enter` car=You get into the car. { The plain messages are shown to + `@leave` car=You get out of the car. { the one entering or leaving + + See [interiors2](/reference/sharpmush-help/penntop/#interiors2) + +## INTERIORS2 + Now, if you want people inside to be able to hear and communicate with the outside, you also need to do the following. + + `@set` car=audible (lets people outside hear what's being said in the car. + `@listen` car=* (lets people inside hear what's being said outside. + `@prefix` car=From inside the car, + `@inprefix` car=From outside, + `@filter` car=* has arrived.,* has left.,joins you inside the car., gets out of the car. + `@infilter` car=* has arrived.,* has left.,* climbs out of the car., * climbs into the car. + + (The filters will keep people on the outside from seeing the 'o' messages and people on the inside from seeing the 'ox' messages which is a good thing.) + + +### See Also +- [enter](/reference/sharpmush-help/penncmd/#enter) +- [leave](/reference/sharpmush-help/penncmd/#leave) +- [@prefix](/reference/sharpmush-help/penncmd/#prefix) +- [@filter](/reference/sharpmush-help/penncmd/#filter) +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) +- [@listen](/reference/sharpmush-help/penncmd/#listen) + +## LAST +## LASTLOGOUT + +## LAST + +## LASTLOGOUT + LAST and LASTLOGOUT + + These attributes show the last times you connected and disconnected from the MUSH. + + +### See Also +- [LASTSITE](/reference/sharpmush-help/penntop/#lastsite) + +## LASTSITE + +## LASTIP + LASTSITE and LASTIP + + The LASTSITE attribute gives the name of the site you last connected from. The LASTIP attribute gives the IP address you last connected from. Mortals cannot set them. + + +### See Also +- [LAST](/reference/sharpmush-help/penntop/#last) + +## LINKING + + You can link to a room if you control it, or if it is set LINK_OK or ABODE. Being able to link means you can set the homes of objects or yourself to that room if it is set ABODE, and can set the destination of exits to that room if it is LINK_OK. + + +### See Also +- [LINK_OK](/reference/sharpmush-help/pennflag/#linkok) +- [ABODE](/reference/sharpmush-help/pennflag/#abode) +- [@link](/reference/sharpmush-help/penncmd/#link) + +## LISTENING + + There are two basic ways to trigger action on the MUSH. The basic way is to type in commands such as 'look' or '`@emit`'. These commands are not seen or heard by other players, although the results of the commands may be. + + The other way is to "listen" for something said/emitted in your hearing. There are two ways to listen for something in a room. The easiest way is to use a combination of `@listen` and `@ahear`/`@aahear`/`@amhear`. + + For example: +``` + > @listen Welcome Mat=* has arrived. + > @ahear Welcome Mat="Welcome, %n! + Breaker has arrived. + Welcome Mat says, "Welcome, Breaker!" +``` + + To trigger an object's `@listen`, you must pass its `@lock`/listen. + + See [listening2](/reference/sharpmush-help/penntop/#listening2) + +## ^ + +## ^-LISTENS + +## LISTENING2 + If you need an object to "listen" for more than one pattern, you can also use ^-patterns. These work similar to user-defined commands, using ^ instead of $. An object must be set MONITOR to have ^-patterns activated. + + Syntax: &`<attribute>` `<object>` = ^`<pattern>`:`<action list>` + + For example: +``` + > @set Welcome Mat = MONITOR + > &greet Welcome Mat=^* has arrived.:"Welcome, %n! + > &goodbye Welcome Mat=^* has left.:POSE says as %n leaves, "Bye!" + Grimlock has arrived. + Welcome Mat says, "Welcome, Grimlock!" + Grimlock has left. + Welcome Mat says as Grimlock leaves, "Bye!" +``` + + Such attributes can also be `@triggered` as if the ^`<pattern>`: did not exist. + + In order to trigger an object's ^-listen patterns, you must pass BOTH its `@lock`/use and its `@lock`/listen. + + See [listening3](/reference/sharpmush-help/penntop/#listening3) + +## LISTENING3 + By default, ^-patterns work like `@ahear`. To have them work like `@amhear`, set the AMHEAR attribute flag on the attribute; to have them work like `@aahear`, set the AAHEAR attribute flag on the attribute (Note that the triggering object is whatever happens to be %#, so, for example, when you `@set` an object MONITOR, you are %# with regard to the "Object is now listening" message, and this message can be picked up with an ^-pattern.) + + Additionally, unlike `$-commands`, ^-patterns are NOT inherited via `@parent`, unless the LISTEN_PARENT flag is set on the listener. `@listen` is never inherited. + + Listen patterns are checked after the object's normal `@listen` attribute. + + +### See Also +- [@listen](/reference/sharpmush-help/penncmd/#listen) +- [@ahear](/reference/sharpmush-help/penncmd/#ahear) +- [@amhear](/reference/sharpmush-help/penncmd/#amhear) +- [@aahear](/reference/sharpmush-help/penncmd/#aahear) +- [MONITOR](/reference/sharpmush-help/pennflag/#monitor) +- [LISTEN_PARENT](/reference/sharpmush-help/pennconf/#listenparent) +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [INTERIORS](/reference/sharpmush-help/penntop/#interiors) + +## LISTS + The word "list" is used in the help files to refer to a string that is a series of smaller strings separated by one or more spaces. A list can also have its elements separated by some other kind of character -- the separating character is called the "delimiter". For example, the following are all lists: + + #6 #10 #14 #12 + Rumble|Krystal|Bobatron|Rodimus Prime ('|' is the delimiter here) + foo bar whee blarg + -eek- .boing. yawp #5 7 + + Lots of MUSHCode depends on lists and manipulating them. Normally, a + list is made up of similar items (so the fourth list in the example + is NOT a typical one). + + +### See Also +- [STRINGS](/reference/sharpmush-help/penntop/#strings) +- [List Functions](/reference/sharpmush-help/pennfunc/#list-functions) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) + +## LOOPING + Looping in an object can have its good parts and its bad parts. The good part is when you activate part of a program multiple times to exhaustively perform an operation. This can be done like this: + + &PART1 object=`<action list>` ; `@trigger` me/PART2 + &PART2 object= `@select` `<test for being done>`=`<false>`,`@trigger` me/PART1 + + Looping can be a problem when it goes on without stopping. The `@ps` command can be used to see if you are looping. Beware! A looping machine that isn't `@halt`'d will drain your pennies while you are away from the mush! + + The `@retry` and `@include` commands, and %= substitution, can also be useful for building code which needs to loop. + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [HALT](/reference/sharpmush-help/pennconf/#halt) +- [COSTS](/reference/sharpmush-help/penntop/#costs) +- [@trigger](/reference/sharpmush-help/penncmd/#trigger) +- [@retry](/reference/sharpmush-help/penncmd/#retry) +- [SUBSTITUTIONS3](/reference/sharpmush-help/penntop/#substitutions3) + +## MASTER ROOM + + The Master Room enables global commands and exits. Exits in the Master Room may be used from any location on the MUSH. All objects left in the Master Room are checked for user-defined `$-commands`. Those `$-commands` are considered global, meaning that they can be used anywhere on the MUSH. Normally, only wizards will have access to the Master Room; if you have a global command that you would like to see enabled for the MUSH, speak to a wizard. + + +### See Also +- [EVALUATION](/reference/sharpmush-help/pennconf/#evaluation) +- [GLOBAL COMMANDS](/reference/sharpmush-help/penntop/#global-commands) + +## ME + The word 'me' refers to yourself. Some things to do when starting out: + 1) give yourself a description: `@desc` me=`<description>` + 2) check your desc.: look me + 3) lock yourself: `@lock` me==me + 4) set your gender: `@sex` me=`<male|female|neuter|plural>` + + +### See Also +- [NEWBIE](/reference/sharpmush-help/penntop/#newbie) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [@describe](/reference/sharpmush-help/penncmd/#describe) +- [@sex](/reference/sharpmush-help/penncmd/#sex) +- [MATCHING](/reference/sharpmush-help/penntop/#matching) + +## MONEY + The MUSH has a built-in money system, which gives a starting amount of money to new players and hands out a daily allowance thereafter. MUSH money (the default name is "pennies", but this may be different depending on the particular MUSH) is spent on some MUSH commands that are computationally expensive or alter the database. In addition, every time you "queue" a command, it costs you a certain amount of money -- this prevents looping from getting out of control, since when all your money is spent, you can't queue any more commands. + + The money system can also be used on player-created objects by setting `@cost`/`@payment`/`@opayment`/`@apayment` attributes and using the "give" command to give pennies, or by setting `@pricelist`/`@buy`/`@obuy`/`@abuy` attributes and buying items with the "buy" command. The Pay `@lock` on an object controls who can give it pennies. + + The "score" command tells you how many pennies you have. + + +### See Also +- [COSTS](/reference/sharpmush-help/penntop/#costs) +- [give](/reference/sharpmush-help/penncmd/#give) +- [@cost](/reference/sharpmush-help/penncmd/#cost) +- [@payment](/reference/sharpmush-help/penncmd/#payment) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [buy](/reference/sharpmush-help/penncmd/#buy) +- [@buy](/reference/sharpmush-help/penncmd/#buy) +- [score](/reference/sharpmush-help/penncmd/#score) +- [money()](/reference/sharpmush-help/pennfunc/#money) + +## MONIKERS + + Monikers are ansi templates which allow objects to have colored names. They can be set via the `@moniker` command, and can always be viewed via the `moniker()` function and %k substitution. Monikers may also be used automatically by MUSH commands, depending on how the "monikers" `@config` option is set. + + By default, anyone can use the `@moniker` command to set a moniker for themselves or their objects. However, where monikers are displayed - and for what types of objects - is controlled via the "monikers" `@config` option. + + See [monikers2](/reference/sharpmush-help/penntop/#monikers2) + +## MONIKERS2 + + The "monikers" `@config` option should be a list of one or more of these: + + chat - In `@chat` messages + say - Non-channel speech (say, pose, page, `@wall`, etc) + movement - Movement messages (Joe has arrived., exit `@osucc`/`@odrop`, etc) + look - "look" - contents/exit lists, when looking at an object, etc + unparse - In "examine", and other places which show Name(#123flags) + who - In WHO, DOING and SESSION + system - All other messages generated by the MUSH with player names. + announcements - Connection messages and "GAME: *" announcements. + everywhere - All of the above. + + You can also limit the types of objects which monikers are used for with 'players', 'things', 'rooms', and/or 'exits'. Use 'alltypes' for all. + + Objects with the MONIKER flag set will always be monikered (though still only in the places specified), even if their type is excluded from the "monikers" option; if no types are included, only objects set MONIKER will be monikered. + + Setting the option empty disables all automatic displaying of monikers, and they will only be available via softcode (`moniker()` and %k). + + You can use !`<value>` to remove something, so 'everywhere !who' shows monikers everywhere except in WHO, '!everywhere !alltypes' will disable them entirely, etc. + + +### See Also +- [@moniker](/reference/sharpmush-help/penncmd/#moniker) +- [moniker()](/reference/sharpmush-help/pennfunc/#moniker) +- [MONIKER](/reference/sharpmush-help/pennconf/#moniker) + +## MUSHCODE + +## SOFTCODE + + MUSHcode is the programming language available within the MUSH itself with which you can create user-defined commands and macros. It is sometimes called "softcode" to distinguish it from "hardcode", which is the language that the source code for the MUSH server is written in. (Incidentally, hardcode is written in the C programming language.) + + At its most basic, writing MUSHcode is just stringing together a series of commands that you would otherwise just type in one at a time. You can store MUSHcode in attributes on any type of object you own or control (including yourself!). The series of commands can be triggered by using a user-defined command or by using `@trigger`. + + See [mushcode2](/reference/sharpmush-help/penntop/#mushcode2) + +## MUSHCODE2 + + If you would like to learn more about MUSHcoding and how to create `$-commands` for yourself, the following help files may be useful. You may also find it useful to download a copy of Amberyl's MUSH manual and follow the examples described there. However, the manual is quite old now, and some parts may no longer be relevant or entirely accurate. The manual is available for download at http://download.pennmush.org/Manuals/ + + Related Help Topics (in no particular order) + ------------------- + ATTRIBUTES SUBSTITUTION NON-STANDARD ATTRIBUTES + ENACTOR EXECUTOR USER-DEFINED COMMANDS + DBREFS EVALUATION TYPES OF OBJECTS + WILDCARDS STRINGS LISTS + ACTION LISTS + +## NON-STANDARD ATTRIBUTES + While there are many standard attributes in MUSH, objects can also have an enormous number of attributes, with any name you wish to use. In the past, you were limited to attributes named VA-VZ, WA-WZ, XA-XZ; these are still available as standard attributes. However, it is strongly recommended that you use non-standard attributes and meaningful names in order to make maintaining your MUSHCode easier. + + To set a non-standard attribute, you can use these formats: + &`<attribute name>` `<obj>`=`<value>` OR + `@_`<attribute_name> `<obj>`=`<value>` OR + `@set` `<obj>`=`<attribute_name>`:`<value>` + + You can get the value of attributes using the functions `v()`, `get()`, and `xget()`. You can evaluate attributes using `u()`, `eval()`, and `get_eval()`. All attributes can be used in attribute locks and can be 'owned' independent of object ownership. + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [ATTRIB-OWNERSHIP](/reference/sharpmush-help/penntop/#attrib-ownership) +- [Attribute Functions](/reference/sharpmush-help/pennfunc/#attribute-functions) +- [ATTRIBUTE TREES](/reference/sharpmush-help/pennattr/#attribute-trees) +- [ATTRIBUTE FLAGS](/reference/sharpmush-help/pennattr/#attribute-flags) + +## PARENT + +## PARENTS + +## OBJECT PARENTS + + Objects may have "parent" objects, from which they can inherit attributes. Once an object is given a parent, it may use the attributes on the parent just as if the attributes were on the object itself, including checking for `$-commands`. Use the `@parent` command to change the parent of an object. + + Objects may have multiple levels of parents - thus, if #100 is the parent of #101, which is the parent of #102, object #102 checks itself, #101, and #100 for attributes. Attributes are checked on the object itself first, followed by its parent, followed by that parent's parent, and so on. There is a (configurable) maximum length of the parent chain for an object; the default is 10. + + After the parent chain is exhausted, the type-specific ancestor is also checked in similar fashion. See [ANCESTORS](/reference/sharpmush-help/penntop/#ancestors) for more about ancestors. + + See [parents2](/reference/sharpmush-help/penntop/#parents2) + +## PARENTS2 + + Note that the only properties inherited are attributes and locks. In particular, flags and exits are NOT inherited from the parent object. Also, commands which walk the attribute list (such as "examine", the `LATTR()` function, the `HASATTR()` function, `@set`, and `@edit`) only affect attributes that are on the object itself, although there are variants which also check parents (examine/parent, `lattrp()`, `hasattrp()`, etc). + + There are some limitations to the use of `@parent`. The most important is that ^-pattern checking is not done on the parent of an object, unless the object is set LISTEN_PARENT. For the purposes of automated game checks, the following attributes are not inherited: + CHARGES, EALIAS, LALIAS, LAST, LASTSITE, LISTEN, QUEUE, RQUOTA, SEMAPHORE, and STARTUP. + + See [parents3](/reference/sharpmush-help/penntop/#parents3) + +## PARENTS3 + If a child and its parent both have the same attribute set, the attribute on the child will always be used first. However, a child can use the `pfun()` function to get the value of an attribute from its parent, even when it has an attribute with the same name. + + For example: +``` + > &TEST Bar=$test:@emit I'm the parent ([name(me)]) + > &TEST Foo=$check:@emit I'm the child ([name(me)]) + > @parent Foo=Bar + > test + Huh? (Type "help" for help.) + > check + I'm the child (Foo) +``` + + See [parents4](/reference/sharpmush-help/penntop/#parents4) + +## PARENTS4 + If a parent has the same `$-command` name in a different attribute, however, BOTH the parent and child commands will execute: + + (continued from previous example) +``` + > &CHECK Bar=$check:@emit No, I'm the parent! ([name(me)]) +``` +``` + > check + I'm the child (Foo) + No, I'm the parent! (Foo) +``` + + The attributes inherited from the parent are treated just like its own attributes by the child. Thus, when a `$-command` or `@trigger` is executed, "me", for example, refers to the child, not the parent, and the `$-command`'s associated actions are performed by the child. + + `@parent` is most useful when several objects use common attributes. + + See [parents5](/reference/sharpmush-help/penntop/#parents5) + +## PARENTS5 + + While ancestors are checked for attributes at the end of the parent chain, they are NOT checked for `$-commands` or ^-listens. + + If you are "mass-marketing" your objects, you can create blank copies, and `@parent` those copies to a template object. You can then customize necessary attributes on the copy. When a buyer `@chowns` his copy, the parent does not change, so unless you're putting data into the parent that you want to make impossible to read, it's safe to allow the purchasers of your object to `@chown` their copy. + + Locks can also be inherited, but are flagged no-inherit by default. Use `@lset` to change that on a per-lock basis. + + +### See Also +- [@parent](/reference/sharpmush-help/penncmd/#parent) +- [$-COMMANDS] +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [ANCESTORS](/reference/sharpmush-help/penntop/#ancestors) +- [ORPHAN](/reference/sharpmush-help/pennflag/#orphan) +- [pfun()](/reference/sharpmush-help/pennfunc/#pfun) + +## PUPPETS + A thing is turned into a puppet by setting the PUPPET flag on it. A puppet object is an extension of its owner and relays everything it sees and hears to its owner, except if it is in the same room as the owner (a puppet with the VERBOSE flag will relay even if it's in the same room). Things relayed by the puppet will be prefixed by the name of the puppet. + + Puppets are useful for keeping track of what is going on in two rooms at once, as extensions of a player (such as a pet, for example), or for testing code. + + You can control your puppets using the `@force` command. It is important to remember the DBREF numbers of your puppets so you can control them even if they are not in the same room with you. You can also have your puppets follow you by using the 'follow' command. + + See [puppets2](/reference/sharpmush-help/penntop/#puppets2) + +## PUPPETS2 + An example of a puppet: + +``` + > @create Punch + Created: Object #18. + > drop Punch + Dropped. + > @set punch=puppet + Punch is now listening. + Punch - PUPPET set. + > @force punch=go north + Punch has left. + Punch> The Finishing Place + Punch> + Punch> Obvious exits: + Punch> Door <S> + > @force #18=:waves hello + Punch> Punch waves hello + > #18 say Hello. + Punch> You say, "Hello." +``` + + To have an object relay things it hears to players other than its owner, use `@forwardlist`. + + +### See Also +- [PUPPET](/reference/sharpmush-help/pennflag/#puppet) +- [@force](/reference/sharpmush-help/penncmd/#force) +- [DBREF](/reference/sharpmush-help/pennconf/#dbref) + +## QUEUE + QUEUE + + The queue is the waiting line for action lists to be executed by the MUSH. Each time you enter an action list, it goes into the queue and stays there until its turn comes up, at which time the MUSH processes the commands and you see the results. The MUSH can execute thousands of commands every second, so normally you see results right away. + + There are actually two distinct queues: + * Incoming socket commands. These are run immediately, so a "look" or "`@ps`" will happen before any other softcode that is waiting to run. A socket may 'burst' up to 100 commands, then 1 per second after that. + * Command queue. These enter the queue via `@trigger`, `@force`, or many other ways. + + There is also a Wait queue, where commands queued via the `@wait` command go, and a Semaphore queue, where semaphore `@waits` go. These commands are moved to the command queue at the appropriate time, either when the `@wait` time elapses, or when the semaphore is `@notified`. + + You can see which commands are currently queued with the `@ps` command, and with the `getpids()`, `lpids()` and `pidinfo()` functions. Queued commands can be cancelled with `@halt` and/or `@drain`. + +See [queue2](/reference/sharpmush-help/penntop/#queue2) + +## QUEUE2 + There are several `@config` options which affect queueing. + + The option 'player_queue_limit' controls how many action lists can be queued by one object at any given time. Wizards and objects with the Queue `@power` can queue more commands (equal to the player_queue_limit plus the current number of objects in the database, including garbage). + + Normally each object has its own queue count, but if the 'owner_queues' option is enabled, objects share a queue count with their owner. + + 'queue_chunk' controls how many commands PennMUSH runs before checking again for incoming socket commands or connections. + + It costs a certain number of pennies to queue an action list; the exact amount is set in the 'queue_cost' `@config` option. These pennies are returned after the action list is run. Sometimes, you'll lose a penny when queueing a command; the chance of this happening is controlled by the 'queue_loss' option. + + +### See Also +- [@ps](/reference/sharpmush-help/penncmd/#ps) +- [LOOPING](/reference/sharpmush-help/penntop/#looping) +- [ACTION LISTS](/reference/sharpmush-help/penntop/#action-lists) + +## QUOTAS + The Quota system controls how many objects a player may own. It is only used of the 'use_quota' `@config` option is set to Yes. + + Each object created normally costs one quota (though this can be altered with the 'quota_cost' `@config` option), and every player starts with a fixed amount of quota, controlled with the 'starting_quota' `@config` option. Whenever you create an object of any type, your remaining quota, stored in the RQUOTA attribute, is decreased by the quota_cost. + + Wizards can give specific players (for example, builder characters) unlimited quota by giving them the No_Quota `@power`. + + You can view your current quota with the `@quota` command. Wizards can adjust a specific player's quota qith the `@squota` command, and God can see or alter all players' quotas with `@allquota`. + + +### See Also +- [@quota](/reference/sharpmush-help/penncmd/#quota) +- [quota()](/reference/sharpmush-help/pennfunc/#quota) +- [Quotas Power](/reference/sharpmush-help/pennconf/#quotas-power) +- [No_Quota Power](/reference/sharpmush-help/pennconf/#noquota-power) + +## REGEXP + +## REGEXPS + (This help text is largely from TinyMUSH 2.2.4, with permission) + + The majority of matching in MUSH is done with wildcard ("globbing") patterns. There is a second type of matching, using regular expressions, that is available in certain circumstances. + + For attributes that are `$-commands` or ^-listen-patterns, setting that attribute "regexp" (with '`@set` `<object>`/`<attribute>`=regexp') causes patterns to be matched using regular expressions rather than globbing. In addition, the function `regmatch()` performs regular expression matching. + + In a regular expression match, the substring of the string which matched the regexp pattern is %0; %1 through %9 are the substrings of the string which matched parenthesized expressions within the regexp pattern. + + See [regexps2](/reference/sharpmush-help/penntop/#regexps2) + +## REGEXPS2 + Regular expressions are extremely useful when you want to enforce a data type. For example, if you have a command where you want a player to enter a string and a number ('`+setnum` `<player>`=`<number>`', for example), you might do it like this: + +``` + > &DO_NUM Command Object=$^\+setnum (.+)=([0-9]+)$: @va me=Data: %1 = %2 + > @set Command Object/DO_NUM=regexp +``` + + Then, '`+setnum` cookies=30' would set VA to "Data: cookies = 30". This eliminates your having to check to see if the player entered a number, since the regular expression matches only numbers. Furthermore, the '+' guarantees that there needs to be at least one character there, so a player can't enter '`+setnum` cookies=' or '`+setnum` =10' or similarly malformed input. + + The '+' sign in the command has to be escaped out, or it is taken as a regexp token. Furthermore, the pattern-match has to be anchored with ^ and $, or something like 'try `+setnum` cookies=30 now' would also match. + + However, keep in mind that players who attempt to use the command and give invalid input (such as "`+setnum` cookies=thirty") will receive the normal, non-descriptive Huh? message. Using a broader match and validating the input in softcode, so you can give more descriptive error messages, may be desirable. + + Regular expression syntax is explained in [regexp syntax](/reference/sharpmush-help/penntop/#regexp-syntax). + +## REGEXP SYNTAX + PennMUSH uses PCRE for its regular expression engine. PCRE is an open source library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. The text below is excerpted from its man page. PCRE was written by Philip Hazel <ph10@cam.ac.uk>, and is Copyright (c) 1997-1999 University of Cambridge, England. You can find it at ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ + + (Note that in PennMUSH, if the regular expression is in an eval'd context (like an argument to regmatch), you'll have to do a lot of escaping to make things work right. One way to escape an argument like %0 is: regeditall(%0,\\W,\\$0) or similar). + + Regular expression matching in PennMUSH can be used on user-defined command or listen patterns. In this usage, regular expressions are matched case-insensitively unless the attribute has the CASE flag set. Regular expressions can also be matched in MUSHcode using `regmatch()`, `regrab()`, regedit, etc. function families, which usually come in case-sensitive and case-insensitive versions. + + See [regexp syntax2](/reference/sharpmush-help/penntop/#regexp-syntax2) + +## regexp syntax2 + A regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. + + There are two different sets of meta-characters: those that are recognized anywhere in the pattern except within square brackets, and those that are recognized in square brackets. Outside square brackets, the meta-characters are as follows: + + \ general escape character with several uses + ^ assert start of subject + $ assert end of subject + . match any character except newline + [ start character class definition + | start of alternative branch ("or") + ( start subpattern + ) end subpattern + ? 0 or 1 quantifier (after a unit to quantify) or, minimal match (after a quantifier) or, extends the meaning of ( after a ( + * 0 or more quantifier + + 1 or more quantifier + + Continued in '"help regexp syntax3'. + +## regexp syntax3 + Part of a pattern that is in square brackets is called a "character class". It matches any character listed in the class. In a character class, the only metacharacters are: + + \ general escape character + ^ negate the class, if the first character in the class + - indicates character range (e.g. A-Z, 0-4) + [:NAME:] A symbol for a group of characters that can vary according to the language the mush is using. See [regexp classes](/reference/sharpmush-help/penntop/#regexp-classes) for more information. + ] terminates the character class + + A backslash will escape most metacharacters, and can turn some normal characters into generic character types: + + \d any decimal digit + \D any character that is not a decimal digit + \s any whitespace character + \S any character that is not a whitespace character + \w any "word" character (letter, digit, or underscore) + \W any "non-word" character + + Continued in '"help regexp syntax4'. + +## regexp syntax4 + A backlash can also be used for two useful assertions -- conditions that must be met at a particular point in a match: + + \b word boundary + \B not a word boundary + + A word boundary is a position in the subject string where the current character and the previous character do not both match \w or \W (i.e. one matches \w and the other matches \W), or the start + or end of the string if the first or last character matches \w, respectively. + + Continued in '"help regexp syntax5'. + +## regexp syntax5 + Quantifiers specify repetition of characters. Four are available: + * match 0 or more of whatever came before + + match 1 or more of whatever came before + ? match 0 or 1 of whatever came before + {m,n} match between 'm' and 'n' of whatever came before. if 'm' is omitted, it matches between 0 and 'n'. if 'n' is omitted, matches at least 'm'. Note the MUSH parser often requires escaping the braces and the comma. + + Quantifiers are usually greedy -- they match as much as possible. Adding a ? after a quantifier causes it to match as little as possible instead. + + Continued in '"help regexp syntax6'. + +## regexp syntax6 + Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing subpattern earlier (i.e. to its left) in the pattern, provided there have been that many previous capturing left parentheses. A back reference matches whatever actually matched the capturing subpattern in the current subject string, rather than anything matching the subpattern itself. So the pattern + + (sens|respons)e and \1ibility + + matches "sense and sensibility" and "response and responsibility", but not "sense and responsibility". + + You can give names to subpatterns and refer to them that way instead of using numbers. + + (?P`<NAME>`subexpr) (Note: Literal <>'s) is a named capture, and (?P=NAME) refers back to it. The above pattern might be written: + + (?P`<word>`sens|respons)e and (?P=word)ibility + + In a `$-command`, the value of the named pattern can be accessed via the r(`<name>`, args). Softcode functions which work with regexps allow you to access the named subpatterns via $`<NAME>` (the <> are literal here). + + Continued in '"help regexp syntax7'. + +## regexp syntax7 + An assertion is a test on the characters following or preceding the current matching point that does not actually consume any characters. There are two kinds: those that look ahead of the current position in the subject string, and those that look behind it. + + An assertion subpattern is matched in the normal way, except that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?! for negative assertions. For example, Lookbehind assertions start with (?<= for positive assertions and (?<! for negative assertions. + + Assertion subpatterns are not capturing subpatterns, and may not be repeated, because it makes no sense to assert the same thing several times. If an assertion contains capturing subpatterns within it, these are always counted for the purposes of numbering the capturing subpatterns in the whole pattern. + + Continued in '"help regexp syntax8'. + +## regexp syntax8 + PCRE's engine can also do conditional subpattern matching, embedded comments in regexps, and a bunch of other things. See a regexp book for details. + +## REGEXP CLASSES + In a character class, you can use a number of additional keywords that match certain types of characters. The keywords are enclosed in [: and :](/reference/sharpmush-help/pennconf/#and), within the character class, so the whole thing looks like [[:NAME:](/reference/sharpmush-help/pennconf/#name)]. + + These keywords can be mixed with other things in the character class, like [ab[:digit:](/reference/sharpmush-help/pennconf/#abdigit)], which will match 'a, 'b', or a digit. [:^NAME:](/reference/sharpmush-help/pennconf/#name) reverses the meaning of NAME - it expands to everything but characters that would match [:NAME:](/reference/sharpmush-help/pennconf/#name). + + Some recognized NAMEs: + digit, for numbers. [[:digit:](/reference/sharpmush-help/pennconf/#digit)] is the same as \d. [[:^digit:](/reference/sharpmush-help/pennconf/#digit)] is the same as \D. + alpha, for letters. + alnum, for numbers and letters. + lower, for lower-case letters. + upper, for upper-case letters. + word, for word characters. [[:word:](/reference/sharpmush-help/pennconf/#word)] is the same as \w. [[:^word:](/reference/sharpmush-help/pennconf/#word)] is the same as \W. + space, for whitespace characters. [[:space:](/reference/sharpmush-help/pennconf/#space)] is the same as \s. [[:^space:](/reference/sharpmush-help/pennconf/#space)] is the same as \S. + + See [regexp classes2](/reference/sharpmush-help/penntop/#regexp-classes2) + +## REGEXP CLASSES2 + These keywords (Or the corresponding \codes) should be used instead of explicit ranges where possible to improve portability. For example, [A-Za-z](/reference/sharpmush-help/pennconf/#a-za-z) and [[:alpha:](/reference/sharpmush-help/pennconf/#alpha)] are not the same thing in languages with accented characters. + + + Examples: +``` + > say regmatch(foo_bar, lit(^[[:word:]]+$)) + You say "1" + > say regmatch(foo bar, lit(^[[:word:]]+$)) + You say "0" +``` +``` + Other, less useful, character class keywords include ascii, cntrl, graph, print, punct, and xdigit. +``` + +## REGEXP EXAMPLES + The regexp pattern '.' is equivalent to the wildcard '?'; it matches one and only one of an arbitrary character. + + The regexp pattern '.*' is equivalent to the wildcard '*'; it matches zero or more arbitrary characters. To match one or more arbitrary characters, the regexp pattern is '.+'. + + To match a string of numbers, use: [0-9](/reference/sharpmush-help/pennconf/#0-9)+ or \d+ + To match a string of letters only, use: [A-Za-z](/reference/sharpmush-help/pennconf/#a-za-z)+ or \w+ + + See [regexp syntax](/reference/sharpmush-help/penntop/#regexp-syntax) + +## REGISTERS + A register is essentially a little reserved piece of computer memory that can hold some variable information that you want to pass on to another command. There are thirty registers on the MUSH available via the %0-%9 substitutions and v(0)-v(9) and r(0,args) to r(29,args). There are also many setq registers available via %q- substitution (%q0 - %q9, %qA - %qZ and arbitrary names), or the `r()` function. + + The basic registers are filled with information that matches the wildcard pattern of the command trigger. (Before you say "Huh?", here's an example.) + +``` + > &COMMAND me=$command *=*:@emit %0 is in register 0 and %1 is in register 1. + > command whee=blert foo + whee is in register 0 and blert foo is in register 1. +``` + + See [registers2](/reference/sharpmush-help/penntop/#registers2) + +## REGISTERS2 + As you can see from the above example, the command trigger had two wildcards separated by a "=" sign. When the user types in the command with some words taking the place of the wildcards, the first register (register 0) is filled with whatever part of the command replaces the first wildcard (in this case, "whee") and the second register is filled with whatever replaces the second ("blert foo"). + + They can also be filled with information that is passed by an `@trigger` command: + +``` + > &SOMECODE me=@emit %0 is in register 0 and %1 is in register 1. + > @trigger me/somecode=whee,foo bar + whee is in register 0 and foo bar is in register 1. +``` + + Please see [`setq()`] for more information about the setq registers. + + +### See Also +- [SUBSTITUTIONS](/reference/sharpmush-help/penntop/#substitutions) +- [@trigger](/reference/sharpmush-help/penncmd/#trigger) +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +- [setq()](/reference/sharpmush-help/pennfunc/#setq) +- [v()](/reference/sharpmush-help/pennfunc/#v) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [registers()](/reference/sharpmush-help/pennfunc/#registers) +- [listq()](/reference/sharpmush-help/pennfunc/#listq) +- [letq()](/reference/sharpmush-help/pennfunc/#letq) +- [unsetq()](/reference/sharpmush-help/pennfunc/#unsetq) +- [strmatch()](/reference/sharpmush-help/pennfunc/#strmatch) + +## RQUOTA + RQUOTA + + This attribute tracks remaining building quota if it is implemented. It is settable in-game only by a wizard, and is only visible to wizards. + + +### See Also +- [@quota](/reference/sharpmush-help/penncmd/#quota) +- [@squota](/reference/sharpmush-help/penncmd/#squota) + +## SEMAPHORES + The most complicated thing about semaphores is their name. Before you try to use semaphores, you should first be familiar with the "`@wait`" command. If you are, then you know that normally, you type: + + `@wait` `<number of seconds>`=`<action>` + + and the action takes place after that number of seconds has passed. With a semaphore, you instead type: + + `@wait` `<object>`=`<action>` + `@wait` `<object>`/`<number of seconds before timeout>`=`<action>` + + and the action takes place after the object has been "notified" that its time for it to happen. You can also set a timeout -- if the object hasn't been notified by the time that number of seconds has passed, the action will take place. Any object (player, thing, exit, room) that you control or that is set LINK_OK can be used to wait actions on. + + See [semaphores2](/reference/sharpmush-help/penntop/#semaphores2) + +## SEMAPHORES2 + + An object is notified using the "`@notify`" command. When you type "`@wait` `<object>`=`<action>`", you are adding one to the SEMAPHORE attribute on the object. When you type "`@notify` `<object>`", you are decreasing the SEMAPHORE attribute on the object by one. Whenever the attribute decreases, one of the actions waiting on the object takes place. The actions occur in the order they were added. + + You can make the semaphore attribute of an object negative by `@notify`-ing it more times than things have been `@wait`-ed on it. If you do so, anything `@wait`-ed on the object will add one to the SEMAPHORE attribute and the action will take place immediately. You can also make all the actions waiting on an object take place right away by using "`@notify`/all", or wipe all the commands out and clear the SEMAPHORE attribute by using "`@drain`". Please note that all SEMAPHORE attributes are cleared out whenever the MUSH is restarted. + + Semaphores can be used to make sure that events occur in the right order, or to make sure that two players can't use the same object at the same time. + + See [semaphores3](/reference/sharpmush-help/penntop/#semaphores3) + +## SEMAPHORES3 + + It's important to remember that the actions will be carried out NOT by the object that they are being `@waited` on, but by whichever object entered the `@wait`. + + + Examples: +``` + > @wait semaphore=:tests. + > @notify semaphore + Wizard tests. +``` +``` + > @wait timer/30=:waits 30 seconds. + [ 30 seconds passes. ] + Wizard waits 30 seconds. +``` + See [semaphores4](/reference/sharpmush-help/penntop/#semaphores4) + +## SEMAPHORES4 + Semaphores can be used to enforce mutual exclusion - to prevent the same object from being used simultaneously by two players. The basic strategy is to ensure that the object always has a SEMAPHORE of -1, to enclose commands in an `@wait`, and to conclude the set of commands with an `@notify` me: + +``` + > &doit obj=$doit: @wait me={&doer me = %n; @trigger me/report} + > &report obj=say [v(doer)] did it!; @notify me + > @startup obj=@drain me; @notify me + > @notify obj + > ex obj/SEMAPHORE + SEMAPHORE [#1ic+]: -1 + > doit + obj says, "Talek did it! + > ex obj/SEMAPHORE + SEMAPHORE [#1ic+]: -1 +``` + + If a second player types doit as well, the second player's command is put on the semaphore queue and not run until the `@notify` me at the end of the REPORT attribute. Note the STARTUP attribute - because semaphores are cleared when the MUSH starts up, you must insure that the object gets `@notify`'d once when it starts up. + + See [semaphores5](/reference/sharpmush-help/penntop/#semaphores5) + +## SEMAPHORES5 + Normally, semaphores use the SEMAPHORE attribute. However, other attributes can be used, as long as they follow a few simple rules: If the attribute is already set, it has to have the same owner (God) and flags as the SEMAPHORE attribute would (typically no_inherit, no_clone, and locked - see [`@set`] and '`@atrlock`'), and have a numeric or empty value. If it's not set, it can't be one of the built in attributes (See `@list` attribs) unless, naturally, it is SEMAPHORE. + + See the help on `@wait`, `@notify` and `@drain` for details, but, briefly, you can use named semaphores with `<object>`/`<attribute>` where you would normally just use `<object>` in those commands. This means you can't have an untimed semaphore on an attribute with a numeric name. + + See [semaphores6](/reference/sharpmush-help/penntop/#semaphores6) + + +### See Also +- [@wait](/reference/sharpmush-help/penncmd/#wait) +- [@drain](/reference/sharpmush-help/penncmd/#drain) +- [@notify](/reference/sharpmush-help/penncmd/#notify) + +## SEMAPHORES6 + An example: + +``` + > @wait me/semtest=think blah + > ex me/semtest + SEMTEST [#1ic+]: 1 + > @ps + ... + Semaphore Queue: + [#8/SEMTEST]Raevnos(#8P):think blah + ... + > @notify me/semtest + Notified. + blah +``` + + This allows you to use one object to control many different things -- for example, fights in a turn-based combat sytem. + +## SETTING-ATTRIBUTES + +## SETTING ATTRIBUTES + Standard attributes are set using @`<attrib>` `<obj>`=`<value>` + Nonstandard attributes are set using &`<attrib>` `<obj>`=`<value>` + Attributes may also be set using `@set` `<obj>`=`<attrib>`:`<value>` or the `attrib_set()` or `set()` functions. + + Attributes are cleared using @`<attrib>` `<obj>` or &`<attrib>` `<obj>`, `attrib_set()`, or with `@wipe` or `wipe()`. + + Note that if the empty_attrs configuration option is set (`@config` empty_attrs to check), there is a difference between clearing an attribute and setting an attribute to a null value: + `@va` me <--- wipes out my VA attribute + `@va` me= <--- sets my VA attribute to be empty + + Empty attributes retain their flags and atrlock status. Wiped attributes are gone forever. + + +### See Also +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [NON-STANDARD ATTRIBUTES](/reference/sharpmush-help/penntop/#non-standard-attributes) +- [@set](/reference/sharpmush-help/penncmd/#set) +- [@wipe](/reference/sharpmush-help/penncmd/#wipe) +- [attrib_set()](/reference/sharpmush-help/pennfunc/#attribset) +- [set()](/reference/sharpmush-help/pennfunc/#set) +- [wipe()](/reference/sharpmush-help/pennfunc/#wipe) +- [ATTRIBUTE FLAGS](/reference/sharpmush-help/pennattr/#attribute-flags) + +## SPOOFING + Spoofing is the act of making other characters think that a person said or did something that they did not. This is very easy to accomplish, and has some good effects, which is why it is allowed. However, abusing it is very twinkish and will most likely get you in hot water with your wizards. Note that if you are being spoofed and want to know who is doing it, you can set yourself NOSPOOF and you will be notified who is making the `@emits`. + + Most @*emit commands have a wizard-only `@ns`*emit version, which does not show nospoof information. These are useful for writing global commands. + + Some @*emit commands also take a /spoof switch, which causes nospoof information to show that sound originated from the enactor (%#) instead of the executor (%!). This switch allows staff to write global `$-commands` for speech which show more helpful nospoof tags. + + +### See Also +- [@emit](/reference/sharpmush-help/penncmd/#emit) +- [@pemit](/reference/sharpmush-help/penncmd/#pemit) +- [@remit](/reference/sharpmush-help/penncmd/#remit) +- [@oemit](/reference/sharpmush-help/penncmd/#oemit) +- [NOSPOOF](/reference/sharpmush-help/pennflag/#nospoof) +- [PARANOID](/reference/sharpmush-help/pennconf/#paranoid) + +## STACK + For those unfamiliar with the term stack, it refers to a programming data structure that follows a LIFO (Last-In-First-Out) principle. The stack in MUSH holds the REGISTERS. The first ten registers can be accessed via the %0-%9 %-substitutions and v(0)-v(29), while all 30 registers can be accessed via the `r()` function (r(0, args) up to v(29,args)). + + When using regexp `$-commands` with named subpatterns, the named arguments can be accessed via r(`<name>`, args). + + +### See Also +- [REGISTERS](/reference/sharpmush-help/penntop/#registers) +- [r()](/reference/sharpmush-help/pennfunc/#r) +- [v()](/reference/sharpmush-help/pennfunc/#v) + +## STRINGS + A string is simply a bunch of characters. A word is a string that begins and ends with the space character. A sentence is a string made up of smaller substrings that are words. Please note that a "word" or "sentence" in this technical sense does not have to make sense in English (or in any other language, for that matter). As far as mush functions and commands are concerned, this is a perfectly good sentence: + + Foozle 09blert bar baz foo. + + +### See Also +- [string functions](/reference/sharpmush-help/pennfunc/#string-functions) + +## % + +## %b + +## %t + +## %% + +## SUBSTITUTIONS + The % symbol is used in MUSH commands to indicate a substitution -- some other character(s) or words are substituted for whatever follows the % symbol. Some common substitutions are: + + %b = a single space (just like [space(1)]) + %r = a blank line + %t = A tab. Note that this may not look right on some screens. + %# = dbref of the ENACTOR (object that set off the command) + %n = the ENACTOR's name + %N = the ENACTOR's name, first letter capitalized + %~ = the ENACTOR's accented name, like accname(%#) + %: = the ENACTOR's unique identifier, like objid(%#) + %k = the ENACTOR's name, colored by `@moniker`, like moniker(%#) + %% = a literal % + + Case makes a difference in all substitutions; capitalizing the first letter after the % will capitalize the first letter of the resulting substitution. + + See [substitutions2](/reference/sharpmush-help/penntop/#substitutions2) + +## SUBSTITUTIONS2 + +## %2 + +## %v + +## %w + +## %x + If the ENACTOR's gender is set, you can use these substitutions to get the + right pronoun for him/her: + %s = subjective pronoun: he, she, it, they. Same as subj(%#) + %o = objective pronoun: him, her, it, them. Same as obj(%#) + %p = possessive pronoun: his, her, its, their. Same as poss(%#). + %a = absolute possessive: his, hers, its, theirs. Same as aposs(%#). + + Case makes a difference: %S will return He, She, It, They. + + Some attributes can be retrieved via substitutions: + %va-%vz = the contents of the object's VA-VZ attributes, respectively + %wa-%wz, %xa-%xz = as above, for WA-WZ and XA-XZ + These are the equivilent of get(me/`<attribute>`). + + See [substitutions3](/reference/sharpmush-help/penntop/#substitutions3) + +## SUBSTITUTIONS3 + +## %3 + +## %L + +## %c + +## %u + +## %? + +## %= + +## %+ + Other substitutions: + %0-%9 = the contents of the REGISTERS 0-9, respectively + %@ = the caller's dbref number. Initially same as %#, changes when something like `ufun()` is called. + %! = the dbref number of the object the command is on (the EXECUTOR) + %L = the dbref of the ENACTOR's location + %c = text of the last command, _before_ evaluation + %u = text of the last command, after evaluation, available to locks/hooks + %? = The current function invocation and depth counts + %= = The dbref/attribute currently being evaluated + %+ = The number of arguments passed to the current ufun. + %qN = the equivalent of r(N) for registers 0-9 and A-Z set by the `setq()` function + %q`<N>` = the equivalent of r(N) for a named register set by the `setq()` function + %iN = equivalent of itext(N), the list element for `iter()`/`@dolist`. + %`$N` = equivalent of stext(N), the `<string>` in `switch()`/`@switch`. + + See [substitutions4](/reference/sharpmush-help/penntop/#substitutions4) + +### See Also +- [EVALUATION](/reference/sharpmush-help/pennconf/#evaluation) +- [ENACTOR](/reference/sharpmush-help/penntop/#enactor) +- [EXECUTOR](/reference/sharpmush-help/penntop/#executor) +- [DBREFS](/reference/sharpmush-help/penntop/#dbrefs) +- [REGISTERS](/reference/sharpmush-help/penntop/#registers) +- [v()](/reference/sharpmush-help/pennfunc/#v) + +## SUBSTITUTIONS4 + +## %4 + + Example: +``` + > @sex me=male + > @drop box=%n just dropped %p box. + > drop box + Cyclonus just dropped his box. +``` +``` + Let's say that Cyclonus's dbref number is #10 and the box's dbref number is #11. The dbref of the room Cyclonus is standing in is #13. When Cyclonus dropped the box above, these were the values of the following %-subs: +``` +``` + %n = Cyclonus + %# = #10 + %@ = #10 + %! = #11 + %L = #13 +``` + +## SUCCESS + A "success" normally occurs when you attempt to do something that is restricted by an `@lock` and you pass the `@lock`. (Note that if no lock is set, you automatically pass it.) For example, the "basic" lock restricts who can pick up a player/thing or who can go through an exit. Whenever you successfully do either of these things, you will set off the basic success messages on the object whose lock you have just successfully passed. + + Many other actions can also be locked - see `@lock` and locktypes for more information. Many of these actions have standard attributes that you can set messages in for when someone succeeds. + + +### See Also +- [FAILURE](/reference/sharpmush-help/penntop/#failure) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [VERBS](/reference/sharpmush-help/penntop/#verbs) +- [ATTRIBUTES](/reference/sharpmush-help/penntop/#attributes) +- [@success](/reference/sharpmush-help/penncmd/#success) +- [@asuccess](/reference/sharpmush-help/penncmd/#asuccess) +- [@osuccess](/reference/sharpmush-help/penncmd/#osuccess) + +## SWITCHES + + Commands can have "switches" which modify the behavior of the command. Switches are attached after the end of a command. For example, most people are familiar with the command + + `@lock` me==me + + The "enter" switch to `@lock` allows you to lock who can enter: + + `@lock`/enter me==me + + A command may have multiple switches: + + `@pemit`/noeval/silent me=Hi! + + Help on the switches available for a command is available in the help file for that command. + (If you are looking for information on `@switch`, see [`@switch`].) + +## TYPES OF OBJECTS + +## TYPES + +## OBJECTS + Everything on a MUSH is an object in the MUSH database. There are four main types of objects: players, things (once called 'objects'), rooms and exits. You can see the type of an object when you 'examine' it, or with the `type()` function. + + There is also a 'garbage' type, used for objects which have been created and then `@destroyed`. Garbage objects cannot be used in any way, and their dbrefs will be recycled (with a new objid) when something new is created. + + For more information on any of the types, see [`<type>`]. + + The `@stats` command lists how many objects of each type currently exits in the database. + + +### See Also +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) + +## PLAYERS + Players can be created at the login screen (or with `@pcreate`) and connected to. They can also receive `@mail`, and have a number of attributes set on them by the MUSH automatically, including LAST, LASTSITE, etc. They can have multiple `@aliases`, and are checked for `$-commands` and ^-listens. + + `@linking` a player sets their home. + + +### See Also +- [TYPES OF OBJECTS](/reference/sharpmush-help/penntop/#types-of-objects) +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [@pcreate](/reference/sharpmush-help/penncmd/#pcreate) + +## ROOMS + Rooms are outermost-containers: they cannot be moved. They are created with `@dig`. Rooms can contain exits. They are checked for `$-commands` and ^-listens. Rooms do not have aliases. + + `@linking` a room creates a drop-to. Rooms have no location; `loc()` on a room returns its drop-to (as does `home()`). + + +### See Also +- [TYPES OF OBJECTS](/reference/sharpmush-help/penntop/#types-of-objects) +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [@dig](/reference/sharpmush-help/penncmd/#dig) +- [DROP-TOS](/reference/sharpmush-help/penntop/#drop-tos) + +## THINGS + Things are created with `@create`. They can move around the MUSH, be entered and carried. They are checked for `$-commands` and ^-listens. Things do not have aliases. + + `@linking` a thing sets its home. + + +### See Also +- [TYPES OF OBJECTS](/reference/sharpmush-help/penntop/#types-of-objects) +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [@create](/reference/sharpmush-help/penncmd/#create) + +## EXITS + Exits are created with `@open`. They link rooms together, and can be used by players and things to move from one room to another with the GOTO command. Exits cannot move (though they can be `@teleported` to another room). They can have multiple aliases in their `@alias`. They are NOT checked for `$-commands` or ^-listens. Exits can have variable destinations; see [`@destination`] for more information. + + You can change the destination of an exit with the `@link` command. `home()` returns the source room of an exit, and `loc()` returns its destination. + + Setting an exit CLOUDY and/or TRANSPARENT causes its destination's description and/or contents to be shown after the exit's description when looked at. + + Sound is propagated through exits which are set AUDIBLE, as long as their source room (home) is also set AUDIBLE. + + +### See Also +- [TYPES OF OBJECTS](/reference/sharpmush-help/penntop/#types-of-objects) +- [type()](/reference/sharpmush-help/pennfunc/#type) +- [hastype()](/reference/sharpmush-help/pennfunc/#hastype) +- [@open](/reference/sharpmush-help/penncmd/#open) +- [@link](/reference/sharpmush-help/penncmd/#link) +- [@destination](/reference/sharpmush-help/penncmd/#destination) +- [AUDIBLE](/reference/sharpmush-help/pennflag/#audible) + +## GARBAGE + Garbage objects previously existed as one of the four main types (player, thing, exit or room) but were destroyed with `@destroy`/`@nuke`. They exist only as placeholders in the database; you can do nothing with them. The dbrefs of garbage objects will be reused when new objects are created (but with a different creation time/object id). + + The total number of garbage objects, and the next garbage object to be recycled, is shown in `@stats`. You can use lsearch(all,type,garbage) to get a list of all garbage dbrefs. + + +### See Also +- [@destroy](/reference/sharpmush-help/penncmd/#destroy) +- [@stats](/reference/sharpmush-help/penncmd/#stats) + +## $-COMMANDS + +## MACROS + +## USER-DEFINED COMMANDS + User-defined commands can be created by setting `$-commands` on players, things, and rooms. Exits are not checked for `$-commands`. To set a `$-command`: + + &`<attribute>` `<object>`=$`<command pattern>`:`<action list>` + + Whenever someone in the same room as the object types the command name, the action list is carried out by the object, as long as: + + - the person typing the command is not set GAGGED, passes the object's `@lock`/use and `@lock`/command + - the object is not set NO_COMMAND or HALT + + `$-commands` can be run by players, things, and exits. + + Such attributes can also be `@triggered` as if the $`<command name>`: did not exist. + + It is recommended that `<command pattern>` not begin with "@", as many of PennMUSH's built-in commands start with "@". Conventionally, global `$-commands` are often named with the "+" prefix, and local `$-commands` commonly have a "+" or "." prefix. + + See [user-defined2](/reference/sharpmush-help/penntop/#user-defined2) + +## $-COMMANDS2 + +## MACROS2 + +## USER-DEFINED2 + Any number of wildcards, * and ?, may be in present in `<command pattern>`. A * matches any number of characters (including none), and ? matches exactly one character. When the action list is executed, the values on the stack in %0-%9 and v(10)-v(29) are the portions of what the user types that match the first 30 *'s or ?'s. You can also match a regular expression rather than wildcards by setting the REGEXP attribute flag on `<attribute>`; see [regexps](/reference/sharpmush-help/penntop/#regexps) for details. When using named regexp captures, the named arguments can be accessed via r(`<name>`, args). + + For example, to make a 'wave' command, you could do the following: +``` + > &DO_WAVE me=$wave *: pose waves to %0. + You could then type: + > wave Guest + Rhyanna waves to Guest. +``` + + If a command would match, but the enactor can't pass the lock, the object may define generic failure behavior by setting the COMMAND_LOCK`FAILURE, COMMAND_LOCK`OFAILURE, and/or COMMAND_LOCK`AFAILURE attributes. These are triggered on all objects with matching commands and failing locks, but only if no command successfully matched, and take the place of the usual "Huh?" message. + + *BE SURE TO `@LOCK`/USE ME==ME IF YOU SET `$-COMMANDS` ON YOURSELF!* + + +### See Also +- [GLOBAL COMMANDS](/reference/sharpmush-help/penntop/#global-commands) +- [EVALUATION ORDER](/reference/sharpmush-help/penntop/#evaluation-order) +- [STACK](/reference/sharpmush-help/penntop/#stack) +- [SUBSTITUTIONS](/reference/sharpmush-help/penntop/#substitutions) +- [WILDCARDS](/reference/sharpmush-help/penntop/#wildcards) +- [@lock](/reference/sharpmush-help/penncmd/#lock) + +## VERBS + Verb attributes are ones which are shown (or triggered) when you use a particular command, or perform a certain action. There are normally three: the 'verb' attribute (shown to the enactor), the 'overb' attribute (shown to others in the enactor's location), and the 'averb' attribute (an action list which is triggered). One example is `@use`, `@ouse`, and `@ause`, which are shown/triggered when the 'use' command is run on an object. + + Some verbs which involve movement have a fourth attribute, 'oxverb', shown in the enactor's old location (for example, `@oxmove`), while some verbs have less (for example, `@oname`/`@aname` are shown when an object's name changes, but there is no `@name` attribute). + + You can create your own verbs for softcoded commands/actions with the `@verb` command. + + See [verbs2](/reference/sharpmush-help/penntop/#verbs2) + +## VERBS2 + +## NONAME + +## NOSPACE + Normally, the enactor's name and a space are prepended to the 'overb' and 'oxverb' attributes automatically. The NOSPACE attribute flag prevents a space being placed between the name and attribute value, and the NONAME attribute flag stops the name being added at all. + + + Example: +``` + > @ouse Foo=has used Foo! + > use Foo + Sketch has used Foo! +``` +``` + > @ouse Foo='s used Foo! + > @set Foo/ouse=nospace + > use Foo + Sketch's used Foo! +``` +``` + > @ouse Foo=Foo has been used by %n! + > @set Foo/ouse=noname + > use Foo + Foo has been used by Sketch! +``` + +### See Also +- [@verb](/reference/sharpmush-help/penncmd/#verb) +- [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags) + +## WARNINGS + + If the MUSH is configured to do so, players may receive regular warnings about potential building problems on objects that they own. The interval is set in the 'warn_interval' `@config` option; if set to 0, automatic warnings are disabled. You can also check warnings, either for a specific object or all objects you own, with `@wcheck`. + + For more information, see the following help topics: + `@warnings` `@wcheck` NO_WARN WARNINGS LIST + +## WARNINGS LIST + The building warning system supports the following types of warnings: + + exit-unlinked Warn on unlinked exits + exit-oneway Warn on exits with no return exit + exit-multiple Warn on multiple exits from A to B + exit-msgs Warn on missing succ/osucc/odrop/fail + exit-desc Warn on missing description + room-desc Warn on missing description + thing-msgs Warn on missing succ/osucc/odrop/fail + thing-desc Warn on missing description + my-desc Warn on missing player description + lock-checks Warn on `@lock` problems + + See [warnings list2](/reference/sharpmush-help/penntop/#warnings-list2) + +## WARNINGS LIST2 + These warnings combine the functionality of multiple warnings above: + + serious exit-unlinked, thing-desc, room-desc, my-desc, lock-checks + normal serious, exit-oneway, exit-multiple, exit-msgs + extra normal, thing-msgs + all all of the above + + The warning "none" indicates no warnings. + You can exclude warnings from a larger list by using !`<warning>` after the larger list. For example: `@warnings` me=all !exit-oneway + +## WILDCARDS + +## * + +## ? + +## ** + PennMUSH has two standard wildcards, which can be used in `$-commands`, as well as a number of softcode functions: an asterisk (*) matches zero or more of any characters, and a question mark (?) matches exactly one character. The most common use of wildcards is to allow people to pass arguments to `$-commands`. For example, let's say you want to have a 'wave' command which allows you to wave to a specific person: + +``` + > &cmd.wave me=$wave *: pose waves. +``` + + The "*" wildcard will match anything, allowing you to type "wave foo", "wave bar", etc. You can use the %0-%9 substitutions to get the values which matched the first ten wildcards in the command: + +``` + > &cmd.wave me=$wave *: pose waves to %0. + > wave to Muse + Mike waves to Muse. +``` + + A backslash (\) can be used to escape * and ? if you want to match a literal asterisk or question mark. (Note that you will often have to use \\ so that the softcode parser doesn't evaluate it away!) + +``` + > think strmatch(foobar, ?*?) + 1 + > think strmatch(foobar, \\?*\\?) + 0 + > think strmatch(?foobar?, \\?*\\?) + 1 +``` + + The "**" wildcard is also available for matching attribute names - see HELP ATTRIBUTE TREES2 for more information. + + It's also possible to use regular expressions, rather than wildcards, for matching strings. Regexps allow a lot more control over what is matched, but are therefore somewhat more complex. See [regexp](/reference/sharpmush-help/penntop/#regexp) for details. + + +### See Also +- [USER-DEFINED COMMANDS](/reference/sharpmush-help/penntop/#user-defined-commands) +- [REGEXP](/reference/sharpmush-help/penntop/#regexp) +- [STACK](/reference/sharpmush-help/penntop/#stack) +- [REGISTERS](/reference/sharpmush-help/penntop/#registers) + +## ZONE MASTER ROOMS + +## ZMRs + + Zone Master Rooms are a subset of zones. If a room is used as a zone, it is called a Zone Master Room (ZMR). ZMRs are like local "master" rooms; exits in the ZMR are global to that zone, and `$-commands` on objects in the ZMR are global to that zone (`$-commands` on the ZMR itself, like `$-commands` on the master room, are ignored). If a ZMR is a player's personal zone, objects in the ZMR are checked for commands that the player can use anywhere (but exits are not checked unless the player is in a zoned room). + + Zone Master Rooms are useful either if you need global exits for the zone, or if the zone has a lot of `$-commands` which need to be restricted to different groups, as they can go on separate use-locked objects. + + +### See Also +- [ZONES](/reference/sharpmush-help/penntop/#zones) +- [MASTER ROOM](/reference/sharpmush-help/penntop/#master-room) +- [EVALUATION](/reference/sharpmush-help/pennconf/#evaluation) + +## ZONE MASTERS + +## ZMPs + +## SHARED PLAYERS + SHARED PLAYERS + + Shared players are player objects which are used to mediate shared control of objects. A shared player is an object of type PLAYER which has the SHARED flag set. They are created like ordinary players, and can connect, build, etc. The only difference is that objects owned by a shared player are controlled by anything that passes the `@lock`/zone of the shared player. + + Anyone who passes the `@lock`/zone of the shared player can `@chown` objects to it. This, however, does not refund the original creator's money or quota, as does normal. + + Shared players used to be known as Zone Masters. The term was changed to emphasize the fact that they are not related to Zone Master Objects, which are used to allow area-specific `$-commands`. + + See [SHARED PLAYERS2](/reference/sharpmush-help/penntop/#shared-players2) + +## SHARED PLAYERS2 + Some suggested uses of shared players: + + 1. If you are working on a building project with several people, it may be useful to create a shared player and `@lock`/zone it to all of you. That way, all of the players working on the project will be able to modify the building, as long as the shared player owns all the objects being built. + + 2. If local wizards are desired, a shared player may be created and zone locked to the local wizards. Players building within that zone should be `@chowning` to the shared player, or logged in as it while creating objects. The local wizard will then be able to control anything within that domain as long as the object in question is owned by the shared player. + + +### See Also +- [SHARED](/reference/sharpmush-help/pennflag/#shared) +- [@lock](/reference/sharpmush-help/penncmd/#lock) +- [ZMO](/reference/sharpmush-help/pennconf/#zmo) + +## ZONES + +## ZONE OBJECTS + +## ZONE MASTER OBJECTS + +## ZONE MASTER THINGS + +## ZMOs + +## ZMTs + Zones are areas of the MUSH that can have the same user-defined commands without having to `@parent` every object in the zone or make the commands MUSH-wide globals. + + The default zone is NOTHING. Any building done by a player defaults to belonging to the same zone that the player belongs to. Every zone is defined by a Zone Master Object (ZMO). The ZMO is an ordinary MUSH object owned by some player. A wizard may change the zone of an object or player to a ZMO. + + If the ZMO is a room, it is called a "Zone Master Room." Most of the statements about ZMOs also apply to zone master rooms; for details, see [Zone Master Rooms](/reference/sharpmush-help/penntop/#zone-master-rooms). + + See [zones2](/reference/sharpmush-help/penntop/#zones2) + +## ZONES2 + `$-commands` on a ZMO are treated as global within that zone. The game attempts to match `$-commands` for the ZMO of the player's location, as well as `$-commands` for the player's own zone. + + If you want restricted global commands defined over only a small area, you can define that area to be part of a zone, and place the desired `$-commands` upon the ZMO. If you want players to be able to use special commands for a culture they belong to, the `$-commands` should go on the ZMO, and the players `@chzoned` to it so they can use the commands anywhere. + + +### See Also +- [@chzone](/reference/sharpmush-help/penncmd/#chzone) +- [SHARED PLAYERS](/reference/sharpmush-help/penntop/#shared-players) + +## MATCHING + Matching is the process the MUSH uses to determine which object you mean when you try to do something with an object. Different commands and functions do matching in different ways, but most will allow you to specify an object as: + * its dbref (#7) or objid (#7:123456789) + * the string "me" (yourself) + * the string "here" (the room you're in) + * a '*' followed by a playername (*javelin) + * its full name (Box of chocolates) + * part of any word in its name, if nothing else shares that part (Box) + + Using the object's name only works if the object is near you. + + You can usually qualify an object with an adjective (English matching) to help the MUSH determine which object you mean Adjectives include: + * my `<obj>` - an object you're carrying + * this `<obj>` - an object in your location (also: this here `<obj>`) + * toward `<exit>` - an exit in your location + * 1st, 2nd, etc. `<obj>` - one of a set of objects with the same names. Objects are ordered in the order in which they're listed in your inventory, room contents, and exit list (in that order). If there aren't enough objects, this will fail. You can use an adjective with an ordinal (my 1st `<obj>`, this 2nd `<obj>`, etc) + + In commands that take a list of space-separated names (like page), you'll need to enclose names with spaces in "double quotes". The same is true on the login screen. For example: + page "Leeroy Jenkins"=Stop doing that. + +## &HELP +This is the AHELP index. + +## RESTRICT + + Commands, functions and attributes can have their permission levels controlled in the mush config files, or by wizards from the game via `@command`, `@function` and `@attribute`. + + In the config file, the syntax is: + restrict_command `<command-name>` `<restriction>` [" `<error message>`] + restrict_function `<function-name>` `<restriction>` + restrict_attribute `<attribute-name>` `<restriction>` + + From the game: + `@command`/restrict `<command-name>`=`<restriction>` [" `<error message>`] + `@function`/restrict `<function-name>`=`<restriction>` + `@attribute`/access `<attribute-name>`=`<restriction>` + + For commands, if `<error message>` is given, that message is sent to the player who runs it instead of a generic, unhelpful error message. + + See [restrict2](/reference/sharpmush-help/penntop/#restrict2) + +## RESTRICT2 + + For commands, `<restriction>` should be an `@lock`-style boolexp (though, for backwards compatability, the restrictions below can be used, and will be converted into an `@lock` automatically). For functions, `<restriction>` should be any combination of the phrases below. For attributes, `<restriction>` is a list of attribute flags, or "none" to create a standard attribute with no restrictions (see [attribute flags](/reference/sharpmush-help/pennattr/#attribute-flags)). + + god Command or function is usable only by God. + wizard Usable only by wizards. + admin Usable only by Wiz/Roy. + nogagged Usable only by non-GAGGED objects. + nofixed Usable only by non-FIXED objects. + noguest Usable only by non-guest `@powered` objects. + nobody Nothing can use it. Same as the /disable switch to `@command` or `@function`. + logname When used, log cmd/fun name, and who is using it + logargs When used, log cmd/fun name and args, and who is using it + + Functions only: + noparse Function arguments are not evaluated. Only applies to `@functions`. + localize %q-registers are saved/restored when evaluating, as if the `@function` were wrapped in `localize()`. + userfn Function can only be called from within an `@function`. + nosidefx Don't allow side-effects for this function. See also the function_side_effects `@config` option. + deprecated This function should no longer be used. Warns the executor's owner whenever someone uses the function. + + Commands only: + noplayer Cannot be used by players. + Commands can also give any flag, power or type, to restrict to objects with one of those flags or powers, or of one of those types. + + See [restrict3](/reference/sharpmush-help/penntop/#restrict3) + +## RESTRICT3 + In cases where there are a function and command that do the same thing (like `pemit()` and `@pemit`), the command's restrictions are also checked when the function is called, so to use `pemit()` you must also be able to use `@pemit`. However, a function's restrictions are not checked when a command is called, to allow disabling side-effect functions. + + Some functions (like `name()`) have non-side-effect and side-effect versions depending on how many arguments they're called with. The side-effect version can be disabled while keeping the safe non-side-effect form with the 'nosidefx' restriction. This can also be used to disable pure side-effect functions. + + + Examples: +``` + Only allow admin to use ansi(): + > @function/restrict ansi=admin +``` +``` + Don't let anyone set SUSPECT or GAGGED use @emit, and log the name of anyone who uses it. + > @command/restrict @emit=logname + > @command/restrict @emit=!flag^suspect&!flag^gagged +``` + +### See Also +- [@command](/reference/sharpmush-help/penncmd/#command) +- [@function](/reference/sharpmush-help/penncmd/#function) +- [@attribute](/reference/sharpmush-help/penncmd/#attribute) +- [@lock](/reference/sharpmush-help/penncmd/#lock) + +## DESCRIPTOR + +## PORT + A descriptor (also called a port or socket descriptor) is a unique (though reusable) number assigned to each connection to the MUSH. The descriptor for each connection is shown on the Wizard WHO in the 'Des' column. + + Several commands and functions take a descriptor as an argument, or return the descriptor(s) associated with a player's connection. + + +### See Also +- [WHO](/reference/sharpmush-help/penncmd/#who) +- [ports()](/reference/sharpmush-help/pennfunc/#ports) +- [lports()](/reference/sharpmush-help/pennfunc/#lports) +- [player()](/reference/sharpmush-help/pennfunc/#player) +- [@boot](/reference/sharpmush-help/penncmd/#boot) +- [CONNECTION FUNCTIONS](/reference/sharpmush-help/pennfunc/#connection-functions) + +## UNICODE + +At the moment, PennMUSH has very minimal support for Unicode. Almost all text is treated internally as being in the Latin-1 character set. Clients that support telnet character set negotiation can send and receive UTF-8, but only characters in the Basic Latin and Latin-1 Supplement blocks are accepted (Others are replaced with question marks). + +A few functions support Unicode-aware text transformations: + + `stripaccents()` + +When the MUSH is compiled with the ICU library (See `@config` compile), additional functions support Unicode-aware text transformations: + + lcstr2() ucstr2() + +When using these functions, do not assume that they return the same number of characters as their argument.