() ( ITN, or Inter-user Talk Network, version 2.01, written by Sjade of ) ( HoloMUCK [collatz.mcrcim.mcgill.edu {132.206.78.1 5757}] ) ( This program is self contained and needs only a global action attached ) ( to it to make it function properly. A recommended global action is ) ( '.;itn;think' or some other such action. There is extensive online ) ( help, accessed via the '-help' command option once the program is set ) ( up. However, if there are any bugs to report or questions you may ) ( have, please mail them to Sjade at sjade@hobbes.cs.mcgill.ca, otherwise ) ( known as sjade@collatz.mcrcim.mcgill.edu. This program may be distributed ) ( in electronic form as long as it remains unchanged in any way. This ) ( program may not be reproduced by any other means than electronic, i.e. ) ( no hardcopies. Please respect the rights of the author. Thank you. ) () : say me @ swap notify ; : i? ( -- i ) me @ "i_itn" getpropstr "" stringcmp not if 0 else 1 then ; : gprop ( s s -- s ) swap intostr swap strcat trigger @ swap getpropstr ; : boxtop "+----------------------------------------------------+" say ; : boxsay me @ "_prefix" gprop dup "" strcmp not if pop "/" else 1 strcut pop then "%p" subst " " dup strcat over strlen strcut swap pop strcat "| " swap strcat " |" strcat say ; : do_help_index ( -- ) me @ "+----------------------------------------------------+" notify me @ "| MUF-ITN 2.01-beta, written by Sjade (of HoloMUCK) |" notify me @ "+----------------------------------------------------+" notify me @ "| >Commands: |" notify me @ "| |" notify me @ "| add channel find format invite |" notify me @ "| list listen lock msg quiet |" notify me @ "| remove unlock users where who |" notify me @ "| prefix interactive on |" notify me @ "| |" notify me @ "| >Miscellaneous: |" notify me @ "| |" notify me @ "| params help version credits changes |" notify me @ "| |" notify me @ "+------------+---------------------------------------+" notify me @ "| itn | send on ITN |" notify me @ "| itn : | pose on ITN |" notify me @ "+----------------------------------------------------+" notify "Use '%phelp ' to get more detailed help" boxsay me @ "+----------------------------------------------------+" notify ; : truncate_8 ( s -- s ) dup strlen 8 > if 8 strcut pop else " " over strlen strcut swap pop strcat then ; : truncate_16 ( s -- s ) " " over strlen strcut swap pop strcat ; : box ( s -- s ) "|" strcat "|" swap strcat ; : aprop ( s s s -- ) swap intostr swap strcat trigger @ swap rot 0 addprop ; : zot ( s -- s ) dup strlen 8 > if 8 strcut pop then ; : pose_it ( s -- s ) 1 strcut swap pop 3 pick "_posefmt" gprop dup "" strcmp not if pop " %n %m" then over 1 strcut pop "'>!?.," swap instr if "%n%m" "%n %m" subst then me @ name "%n" subst me @ "_ircch" gprop "%c" subst swap "%m" subst ; : say_it ( s -- s ) 3 pick "_sayfmt" gprop dup "" strcmp not if pop " %n: %m" then me @ name "%n" subst me @ "_ircch" gprop "%c" subst swap "%m" subst ; : fix_message ( s -- s ) dup dup ":" 1 strncmp not swap ";" 1 strncmp not or if pose_it else say_it then ; : illegal_listen_loop dup not if pop exit then over "_lock" strcat trigger @ swap getpropstr dup 3 pick 5 + pick intostr box instr not 3 pick 5 + pick "_ircch" gprop "quiet" strcmp and and if dup 3 + pick " ILLEGAL: Illegal listen...closed" notify dup 3 + pick "_ircl" gprop "" 4 pick box subst over 4 + pick "_ircl" aprop dup 3 + pick "_ircch" gprop 3 pick strcmp not if dup 3 + pick " ILLEGAL: Moved to 'public'" notify dup 3 + pick "public" swap "_ircch" aprop dup 3 + pick "_ircl" gprop "|public|" instr not if dup 3 + pick "_ircl" gprop "|public|" swap strcat over 4 + pick swap "_ircl" aprop then then then swap pop 1 - illegal_listen_loop ; : illegal_listen_punt dup not if pop exit then 1 strcut swap pop dup strlen 1 - strcut pop "||" explode illegal_listen_loop ; : punt_loop ( s d1 d2 .. dN N -- s ) dup 0 <= if pop exit then over "_ircl" gprop illegal_listen_punt over "_ircch" gprop "_lock" strcat trigger @ swap getpropstr dup 4 pick intostr box instr not 4 pick "_ircch" gprop dup "quiet" strcmp swap "public" strcmp and and and if over " ILLEGAL: On illegal channel...moved to 'public'" notify over "public" swap "_ircch" aprop over "_ircl" gprop "|public|" instr not if over "_ircl" gprop "|public|" swap strcat 3 pick swap "_ircl" aprop then then swap pop 1 - punt_loop ; : do_notify_loop ( s d1 d2 .. dN N -- ) dup 0 = if pop pop exit then over "_ircl" gprop me @ "_ircch" gprop box instr if dup 2 + pick fix_message rot swap notify else swap pop then 1 - do_notify_loop ; : do_notify ( s -- ) online punt_loop online do_notify_loop ; : format_user ( s -- ) rot truncate_8 " |" strcat " " swap strcat strcat swap truncate_16 "| " swap strcat " |" strcat swap strcat say ; : list_users_loop ( d1 d2 ... dN N -- ) dup 0 = if pop exit then over dup me @ dbcmp swap "U" flag? or if swap pop 1 - list_users_loop exit then over "_ircch" gprop me @ "_ircch" gprop strcmp not 3 pick "_ircl" gprop "" strcmp not and if "quiet" 3 pick name " | - |" format_user swap pop 1 - list_users_loop exit then over "_ircch" gprop me @ "_ircch" gprop strcmp not if over "_ircch" gprop 3 pick name " | |" format_user swap pop 1 - list_users_loop exit then over "_ircl" gprop me @ "_ircch" gprop box instr if over "_ircch" gprop 3 pick name " @ |" 5 pick "_ircch" gprop "_lock" strcat trigger @ swap getpropstr dup me @ intostr box instr not and if " X |" else " |" then strcat format_user swap pop 1 - list_users_loop exit then swap pop 1 - list_users_loop ; : list_users ( -- ) me @ "_ircch" gprop swap dup " " instr if dup " " instr strcut swap pop zot me @ "_ircch" aprop else pop then me @ "_ircch" gprop "List for channel '" swap strcat "'" strcat say me @ "+------------------+---+---+----------+" notify me @ "| User | @ | ? | Channel |" notify me @ "+------------------+---+---+----------+" notify online list_users_loop me @ "+------------------+---+---+----------+" notify me @ "_ircch" aprop ; : remove_listen ( s -- ) zot dup "*" strcmp not if me @ " LISTEN: You quell all channels." notify me @ "_ircl" gprop me @ "_quiet" aprop trigger @ me @ intostr "_ircl" strcat remove_prop exit then me @ "_ircl" gprop over box instr not if me @ " LISTEN: Not currently listening." notify exit then dup me @ "_ircl" gprop over box "" swap subst me @ "_ircl" aprop me @ "_ircch" gprop swap me @ "_ircch" aprop "(LISTEN) User has stopped monitoring this channel" do_notify me @ "_ircch" aprop " " strcat me @ name strcat ": (LISTEN) No longer monitoring this channel" strcat say ; : add_listen ( s -- ) zot me @ "_ircl" gprop over box instr if me @ " LISTEN: Already listening." notify exit then dup dup "*" stringcmp not swap "quiet" stringcmp not or if me @ " LISTEN: Channel is illegal." notify exit then dup "_lock" strcat trigger @ swap getpropstr dup "" strcmp swap me @ intostr box instr not and if me @ " LISTEN: Channel is locked." notify exit then dup me @ "_ircl" gprop over box strcat me @ "_ircl" aprop me @ "_ircch" gprop swap me @ "_ircch" aprop "(LISTEN) User is now monitoring this channel" do_notify me @ "_ircch" aprop trigger @ me @ intostr "_quiet" strcat remove_prop ; : do_listen ( s -- ) dup " " instr not if pop me @ "_ircl" gprop " LISTENING: " swap strcat say exit then dup " " instr strcut swap pop dup "!" 1 strncmp not if 1 strcut swap pop remove_listen else add_listen then pop ; : do_on ( -- ) me @ "_ircl" gprop "" stringcmp if " ON: You are not quiet." say exit then me @ "_quiet" gprop me @ "_ircl" aprop trigger @ me @ intostr "_quiet" strcat remove_prop " ON: You are now not quiet." say " ON: " me @ "_ircl" gprop strcat say ; : do_interactive ( -- ) me @ "i_itn" getpropstr "" stringcmp not if " INTERACTIVE: Mode on" say " INTERACTIVE: Use /interactive to exit" say me @ "i_itn" "yes" 0 addprop exit else me @ "i_itn" remove_prop " INTERACTIVE: Mode off" say then ; : do_channel ( s -- ) dup " " instr not if pop me @ " CHANNEL: You are on channel '" me @ "_ircch" gprop strcat "'." strcat notify exit then me @ "_ircl" gprop "" strcmp not if pop " CHANGE: Aborted, you are quiet." say exit then dup " " instr strcut swap pop zot dup me @ "_ircch" gprop strcmp not if pop " CHANGE: Channel is current." say exit then dup " " instr strcut swap pop zot dup dup "*" stringcmp not swap "quiet" stringcmp not or if pop " CHANGE: Channel is illegal." say exit then dup "_lock" strcat trigger @ swap getpropstr dup "" strcmp swap me @ intostr box instr not and if pop " CHANGE: Channel is locked." say exit then "(CHANGE) User has left this channel" do_notify dup me @ "_ircch" aprop me @ "_ircl" gprop over box instr not if me @ "_ircl" gprop over box strcat me @ "_ircl" aprop then pop "(CHANGE) User has joined this channel" do_notify ; : do_find ( s -- ) dup " " instr not if pop me @ " FIND: No player specified" notify exit then dup " " instr strcut swap pop .pmatch+ dup #-1 dbcmp if pop me @ " FIND: Player not found" notify exit then dup "_ircch" gprop "" strcmp not if pop me @ " FIND: Player not registered" notify exit then dup "_ircch" gprop " FIND: " 3 pick name strcat " is on channel " strcat swap strcat " and is " strcat swap dup awake? swap "U" flag? not and if "online" else "offline" then strcat say ; : do_format ( s -- ) dup " " instr not over " " instr 3 pick " " rinstr = or if me @ "_sayfmt" gprop dup "" strcmp not if pop " %n: %m" then " SAYFMT: '" swap strcat "'" strcat say me @ "_posefmt" gprop dup "" strcmp not if pop " %n %m" then " POSFMT: '" swap strcat "'" strcat say pop exit then dup " " instr 1 - strcut 1 strcut swap pop dup " " instr 1 - strcut 1 strcut swap pop over dup "say" stringcmp swap "pose" stringcmp and if pop pop " FORMAT: Invalid format." say exit then over "say" stringcmp not if dup "*default" stringcmp not if pop " %n: %m" then dup me @ "_sayfmt" aprop " SAYFMT: '" swap strcat "'" strcat say else dup "*default" stringcmp not if pop " %n %m" then dup me @ "_posefmt" aprop " POSFMT: '" swap strcat "'" strcat say then pop ; : do_lock ( -- ) me @ "_ircch" gprop "public" strcmp not if me @ " LOCK: Can't lock channel public" notify exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr "" strcmp if me @ " LOCK: Channel is already locked" notify exit then "(LOCK) User has locked this channel" do_notify me @ "_ircch" gprop "_lock" strcat trigger @ swap me @ intostr box 0 addprop ; : do_unlock ( -- ) me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr "" strcmp not if me @ " LOCK: Channel is not locked." notify exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr me @ intostr box dup strlen strncmp if me @ " LOCK: Channel is not locked to you" notify exit then "(UNLOCK) User has unlocked this channel" do_notify me @ "_ircch" gprop "_lock" strcat trigger @ swap remove_prop ; : do_add ( s -- ) dup " " instr not if me @ " ADD: No user specified" notify pop exit then dup " " instr strcut swap pop .pmatch+ dup #-1 dbcmp if me @ " ADD: Player not recognized" notify pop exit then dup "_ircch" gprop "" strcmp not if me @ " ADD: Player is not registered" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr "" strcmp not if me @ " ADD: Channel is not locked" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr me @ intostr box dup strlen strncmp if me @ " ADD: Channel not locked to you" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr over intostr box instr if me @ " ADD: User is already in lock list" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr swap intostr box strcat me @ " ADD: Player is added to lock list" notify me @ "_ircch" gprop "_lock" strcat trigger @ swap rot 0 addprop ; : do_remove ( s -- ) dup " " instr not if me @ " REMOVE: No user specified" notify pop exit then dup " " instr strcut swap pop .pmatch+ dup #-1 dbcmp if me @ " REMOVE: Player not recognized" notify pop exit then dup me @ dbcmp if me @ " REMOVE: Use %unlock to remove yourself" notify pop exit then dup "_ircch" gprop "" strcmp not if me @ " REMOVE: Player is not registered" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr "" strcmp not if me @ " REMOVE: Channel is not locked" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr me @ intostr box dup strlen strncmp if me @ " REMOVE: Channel not locked to you" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr over intostr box instr not if me @ " REMOVE: User is not in lock list" notify pop exit then me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr swap intostr box "" swap subst trigger @ me @ "_ircch" gprop "_lock" strcat rot 0 addprop me @ " REMOVE: Player removed from lock list" notify ; : who_loop ( s1 s2 ... sN N -- ) dup 0 = if pop exit then dup intostr "> " strcat dup strlen 3 = if " " swap strcat then " " swap strcat box " " strcat rot atoi dbref name truncate_16 " |" strcat strcat say 1 - who_loop ; : do_who ( -- ) me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr "" strcmp not if me @ " WHO: Channel is not locked" notify exit then me @ "+-----+------------------+" notify me @ "Lock list for '" me @ "_ircch" gprop strcat "'" strcat " " over strlen strcut swap pop strcat box say me @ "+-----+------------------+" notify me @ "_ircch" gprop "_lock" strcat trigger @ swap getpropstr 1 strcut swap pop dup strlen 1 - strcut pop "||" explode who_loop me @ "+-----+------------------+" notify ; : do_invite ( s -- ) dup " " instr not if me @ " INVITE: No player specified" notify pop exit then dup " " instr strcut swap pop .pmatch+ dup "_ircch" gprop "" strcmp not if me @ " INVITE: Player is not registered" notify pop exit then " INVITE: " me @ name strcat " invites you to channel " strcat me @ "_ircch" gprop strcat over swap notify " INVITE: Invitation sent to " swap name strcat say ; : do_prefix dup " " instr not if pop me @ "_prefix" gprop dup "" strcmp not if pop "/%-" then " PREFIXES: " swap strcat say exit then dup " " instr strcut swap pop dup "*default" stringcmp not if pop "/%-" then dup me @ "_prefix" aprop " PREFIXES: " swap strcat say ; : topic_add boxtop "%padd" boxsay boxtop "This function is used when a player wants to allow" boxsay "another player onto a locked channel." boxsay "Format: %padd " boxsay "A valid is any player in the database" boxsay "who is also registered with the ITN." boxsay "See also: remove, who" boxsay boxtop ; : topic_prefix boxtop "%pprefix" boxsay boxtop "This function is used when a player wishes to" boxsay "change the command prefixes he or she may use." boxsay "The default prefix list is '/%-', and it can" boxsay "be returned to automatically with:" boxsay "Format: %pprefix *default" boxsay "If the prefix command is issued without any" boxsay "argument it will show the current prefix list." boxsay "If it is given an argument it will change the" boxsay "prefix list to that argument. Note that each" boxsay "letter or symbol is a prefix. Prefixes may" boxsay "be only one character long." boxsay boxtop ; : topic_channel boxtop "%pchannel" boxsay boxtop "This function has several features. To see what" boxsay "channel you are on, use the following." boxsay "Format: %pchannel" boxsay "To change to a channel, use the following." boxsay "Format: %pchannel " boxsay "The argument may be any word or combi-" boxsay "of numbers, letters and characters up to eight" boxsay "characters long. The only invalid channels are" boxsay "'*' and any variant of 'quiet'." boxsay "See also: listen, invite, quiet, msg" boxsay boxtop ; : topic_find boxtop "%pfind or %pwhere" boxsay boxtop "This function allows you to find the current" boxsay "channel of any user who is registered to the" boxsay "ITN and whether or not that person is currently" boxsay "online or not." boxsay "Format: %pfind " boxsay "Format: %pwhere " boxsay "See also: channel, listen, invite, list, users" boxsay boxtop ; : topic_format boxtop "%pformat" boxsay boxtop "This function allows you to customize the look" boxsay "of the output and input you send/receive on the" boxsay "ITN. You can manipulate both the pose and say" boxsay "formats, leave them alone, or return them to" boxsay "defaults." boxsay "Format: %pformat say " boxsay "Format: %pformat pose " boxsay "The argument should include:" boxsay "%c = Name of the channel messages are heard on" boxsay "%m = The incoming or outgoing message itself" boxsay "%n = The name of the sender" boxsay "If is '*default' it will reset the one" boxsay "specified to its default setting." boxsay boxtop ; : topic_invite boxtop "%pinvite" boxsay boxtop "This function lets you inform a specific user" boxsay "of your current channel. It is especially use-" boxsay "ful if you are on a locked channel and would like" boxsay "the user to come there without informing everyone" boxsay "else of your whereabouts." boxsay "Format: %pinvite " boxsay "See also: lock, unlock, who, add, remove" boxsay boxtop ; : topic_list boxtop "%plist or %pusers" boxsay boxtop "This function lists the users who are on or who" boxsay "are listening to a particular channel, and also" boxsay "if they are on the channel but not listening." boxsay "Format: %plist " boxsay "Format: %pusers " boxsay "If is null, then it will show the proper" boxsay "user list for the current channel, otherwise it" boxsay "will show the user list for the channel equal to" boxsay ". Note that you do not show up on the list." boxsay "See also: channel, listen" boxsay boxtop ; : topic_listen boxtop "%plisten" boxsay boxtop "This function allows you to monitor channels" boxsay "without actually being on them. You can monitor" boxsay "as many channels as you like, except those which" boxsay "are locked." boxsay "Format: %plisten " boxsay "If is null, then it will show the list of" boxsay "channels you are currently listening to. If you" boxsay "specifiy an , it will then add that channel" boxsay "to be monitored, as long as it is not locked, or" boxsay "is locked and accesible by you. To remove a" boxsay "channel from the monitoring list, use:" boxsay "Format: %plisten !" boxsay "To not listen to any channels so that you more or" boxsay "less turn off ITN, use:" boxsay "Format: %plisten !*" boxsay "See also: quiet, lock, unlock, who, add, remove" boxsay boxtop ; : topic_lock boxtop "%plock" boxsay boxtop "This command allows you to lock a channel and" boxsay "thus make it accesible by only you people you" boxsay "wish to be on it. You can only lock a channel" boxsay "that you are on, although there is no limit to" boxsay "the number of channels you may lock." boxsay "Format: %plock" boxsay "See also: unlock, who, add, remove, channel" boxsay boxtop ; : topic_msg boxtop "%pmsg or %pm" boxsay boxtop "This command allows you to send a message to" boxsay "a channel that you are not currently on (although" boxsay "you may use it to send to the current channel" boxsay "also). If the channel is locked the message" boxsay "will not be sent." boxsay "Format: %pm " boxsay "Format: %pmsg " boxsay "See also: listen, channel" boxsay boxtop ; : topic_quiet boxtop "%pquiet" boxsay boxtop "This command allows you to turn off ITN by not" boxsay "monitoring any channels. It is the same as" boxsay "doing: '%plisten !*'." boxsay "Format: /quiet" boxsay "See also: listen" boxsay boxtop ; : topic_remove boxtop "%premove" boxsay boxtop "This command allows you to remove a player from" boxsay "the list of players allowed on a locked channel." boxsay "If that player is on the channel it will also" boxsay "automatically boot them off." boxsay "Format: %premove " boxsay "See also: lock, add, who, unlock" boxsay boxtop ; : topic_unlock boxtop "%punlock" boxsay boxtop "This command allows you to unlock the channel" boxsay "you are on if you are the person who locked it" boxsay "originally. It removes the lock list and makes" boxsay "the channel open to everyone again." boxsay "Format: %punlock" boxsay "See also: lock, add, who, remove" boxsay boxtop ; : topic_who boxtop "%pwho" boxsay boxtop "This command shows the list of people who are" boxsay "allowed to be on or listen to the current" boxsay "channel if it is locked. It takes no argument" boxsay "so must be invoked from a locked channel." boxsay "Format: %pwho" boxsay "See also: lock, unlock, add, remove" boxsay boxtop ; : topic_interactive boxtop "%pinteractive" boxsay boxtop "This toggles you in and out of interactive" boxsay "mode. If you are in interactive mode you can" boxsay "remain in ITN and perform all of the functions" boxsay "without typing in the ITN command. However," boxsay "note there are no escapes from the shell, and" boxsay "you must leave interactive mode to perform" boxsay "any other functions." boxsay "Format: %pinteractive" boxsay boxtop ; : topic_params boxtop "Parameters" boxsay boxtop "No help" boxsay boxtop ; : topic_help boxtop "%phelp" boxsay boxtop "The help command can be invoked without any" boxsay "argument to give you a list of help topics." boxsay "Format: %phelp" boxsay "To get detailed information on each of the" boxsay "commands or help topics:" boxsay "Format: %phelp " boxsay "The argument needs no prefix and" boxsay "only has to be long enough to make it unique" boxsay "from all the other topic names." boxsay boxtop ; : topic_version boxtop "Version" boxsay boxtop "Current version: 2.01-beta" boxsay boxtop ; : topic_credits boxtop "Credits" boxsay boxtop "Sjade : Author" boxsay "Mouse : Bug spotter" boxsay "Radagast : Bug spotter" boxsay "Chris : Prompted /prefix command" boxsay "Claudius : Prompted substituions fix" boxsay " and interactive mode" boxsay "Eighmi : Prompted /format command" boxsay "Vee : Prompted /format command" boxsay boxtop ; : topic_changes boxtop "Changes" boxsay boxtop "04/19/92: Added %pquiet" boxsay "04/19/92: Fixed %pmsg" boxsay "04/19/92: Added %pprefix" boxsay "04/19/92: Added %pformat" boxsay "04/19/92: Fixed %phelp" boxsay "04/22/92: Fixed %pusers" boxsay "04/22/92: Fixed %plisten" boxsay "04/27/92: Fixed substitutions" boxsay "04/27/92: Added %pinteractive" boxsay "04/27/92: Added %pon" boxsay "05/18/92: Fixed %pinteractive" boxsay "10/16/92: Added ? column in %pusers" boxsay "10/18/92: Fixed %pmsg" boxsay "10/18/92: Fixed posing" boxsay "10/18/92: Fixed %pquiet" boxsay "10/18/92: Fixed illegal channels" boxsay "10/29/92: Fixed illegal channels" boxsay "10/29/92: Went to version 2" boxsay boxtop ; : topic_on boxtop "%pon" boxsay boxtop "This command is used after you have used the" boxsay "'/listen !*' or '/quiet' commands. It puts" boxsay "you back on the ITN listening to all of the" boxsay "channels you were previously listening to," boxsay "before going quiet. The only drawback is it" boxsay "does not announce your arrival onto ITN." boxsay "Format: %pon" boxsay "See also: listen, quiet" boxsay boxtop ; : parse_help dup "a" 1 strncmp not if topic_add exit then dup "chann" 5 strncmp not if topic_channel exit then dup "fi" 2 strncmp not if topic_find exit then dup "fo" 2 strncmp not if topic_format exit then dup "int" 3 strncmp not if topic_interactive exit then dup "inv" 3 strncmp not if topic_invite exit then dup "list" strcmp not if topic_list exit then dup "liste" 5 strncmp not if topic_listen exit then dup "lo" 2 strncmp not if topic_lock exit then dup "m" 1 strncmp not if topic_msg exit then dup "o" 1 strncmp not if topic_on exit then dup "q" 1 strncmp not if topic_quiet exit then dup "r" 1 strncmp not if topic_remove exit then dup "un" 2 strncmp not if topic_unlock exit then dup "us" 2 strncmp not if topic_list exit then dup "whe" 3 strncmp not if topic_find exit then dup "who" 3 strncmp not if topic_who exit then dup "pa" 2 strncmp not if topic_params exit then dup "pr" 2 strncmp not if topic_prefix exit then dup "h" 1 strncmp not if topic_help exit then dup "v" 1 strncmp not if topic_version exit then dup "cr" 2 strncmp not if topic_credits exit then dup "chang" 5 strncmp not if topic_changes exit then " HELP: Topic does not exist." say ; : main ( s -- ) me @ "_ircch" gprop "" strcmp not if "public" me @ "_ircch" aprop "|public|" me @ "_ircl" aprop me @ " Welcome to MUF-ITN 2.01-beta" notify me @ " Use '/help' for help topics." notify then me @ "i_itn" getpropstr "" stringcmp if read then .sstrip me @ "_prefix" gprop dup "" strcmp not if pop "/%-" then swap dup "" strcmp not if pop dup 1 strcut pop "help" strcat then dup 1 strcut pop rot swap instr if 1 strcut swap pop dup "liste" 5 strncmp not if do_listen i? if main exit else exit then then dup dup "users" 5 strncmp not swap "list" 4 strncmp not or if list_users i? if main exit else exit then then dup "help" 4 strncmp not if dup " " instr if "" "help " subst parse_help pop else pop do_help_index then i? if main exit else exit then then dup "ch" 2 strncmp not if do_channel i? if main exit else exit then then dup "q" 1 strncmp not if pop "listen !*" do_listen me @ "i_itn" getpropstr if me @ " INTERACTIVE: Mode off." notify me @ "i_itn" remove_prop then i? if main exit else exit then then dup "on" 2 strncmp not if pop do_on i? if main exit else exit then then dup dup "find" 4 strncmp not swap "where" 5 strncmp not or if do_find i? if main exit else exit then then me @ "_quiet" gprop if pop me @ " You are quiet." notify i? if main exit else exit then then dup "lock" 4 strncmp not if pop do_lock i? if main exit else exit then then dup "unlock" 6 strncmp not if pop do_unlock i? if main exit else exit then then dup "add" 3 strncmp not if do_add i? if main exit else exit then then dup "for" 3 strncmp not if do_format i? if main exit else exit then then dup "rem" 3 strncmp not if do_remove i? if main exit else exit then then dup "who" 3 strncmp not if pop do_who i? if main exit else exit then then dup "inv" 3 strncmp not if do_invite i? if main exit else exit then then dup "int" 3 strncmp not if pop do_interactive i? if main exit else exit then then dup "pre" 3 strncmp not if do_prefix i? if main exit else exit then then dup dup "m" 1 strncmp not swap "msg" 3 strncmp not or if dup " " instr not if pop me @ " MSG: Invalid format." notify else dup " " instr strcut swap pop dup " " instr not if pop me @ " MSG: Invalid format." notify else dup " " instr 1 - strcut 1 strcut swap pop swap me @ "_ircch" gprop swap zot me @ "_ircch" aprop swap do_notify me @ "_ircch" aprop me @ " MSG: Command complete." notify then then i? if main exit else exit then then " Command '" swap strcat "' not recognized." strcat " Try '/help'." strcat say i? if main exit else exit then then me @ "_quiet" gprop if pop me @ " You are quiet." notify else do_notify then i? if main then ;