Profession

From Bebot Wiki 2
Jump to navigationJump to search

Introduction

The professions core module offers a simple interface to lookup profession names by shortcut or full name, and to look up shortcuts for full profession names. Function full_name($profstr)

This function tries to identify which profession $profstr is pointing to by comparing to full names and pre-defined shortcuts. It returns an array as result, with error = true if no match was found, content got the error text then. On success it returns the full profession name in content with error = false. Function shortcut($profstr)

This function returns the shortcut for $profstr as content on success. If $profstr is no profession name it returns error = true.