home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR10
/
IRC142.ZIP
/
IRC142.BAS
(
.txt
)
< prev
next >
Wrap
QuickBASIC Tokenized Source
|
1991-06-17
|
39KB
|
632 lines
ChngString
String
String.To.Change
ParseString
String.To.Parse
ModemInc
ClearLineE
String.To.Clear
Inpt0
DrawCursor
StatusLine
@ ModString
SetFlags
HelpSystem
Help/
Help.Topic
LoadConfig
Config{
Config.Fileo
ReadFile
Filenameg
ReadMode
JoinChannel$
Channel
LeaveChannel
ChannelNumberT
Channels
Server
Color?
Colors
debug
version
NoDial
servers-
variant
Author
Author.Nick
True.Com.Port`
ComPorto
BaudRate
PrefixF
Merit
Merit.Num*
ConnectToServer
ConnectToServer2
RealNameP
Read.StartZ
Query~
scroll
Record
topic
BackSpace0
Help.File.Path
Lines
TypeModeH
Dimmed
history?
START
Prefillo
StartPos
CursorPos
PARSE'
UpDate
PrintMeY
GetKey-
KeyInputEnd
VALIDa
ScrollHistoryZ
ConfigFile
CnfgVersionT
fullwho
Flags
ignore
OldNick
Operand
miscgarb
EnterCh
serve3
status9
Stat]
users
space
MsgTo
Variable
@ PrintTextS
Suffixc
Foreground
Background#
LPre>
NewLine
Bottom
THENPRINT
PrintTextxz
expandH
NoEcho
NextArg
Toggle
FNToggle
keynum
miscgarbSTATIC
funky
BeepMode
BeepModespace
$TITLE: 'IRC.EXE Version 1.42 (C) 1991 Eric Blade'
Makes a copy of the command line that we can parse things out of.
06-17-1991
MSDOS"
EricBlade"
IRC /C calls CONFIGUR.EXE
Configuring for IRC.EXE Version
configur
IRC /M sets Mono variable to one, for use with Monochrome monitors
IRC.EXE Version
Engaged in Monochrome Mode...
IRC /D skips the dialing/MichNet communications things so anyone with a
regular ASCII connection can use it.m
IRC.EXE Version
engaged in No-Dial Mode..."
Set the nickname. The Command line now overrides the environment variable
vice previous versions, when the env. variable overrode the command line.
NOTE: THIS WILL NOT WORK IF YOU ARE USING 4DOS Version 3.03
NICKNAME
NICKNAME
Opening COM"
: port..."
Here we need to do some Port renaming for QuickBASIC. We need to tell DOS
that Port 3 is accessed by using Port 1, and Port 4 is accessed by usingS
Port 2. This gets us around the COM1 and 2 only limitations of QuickBASIC.
Here we actually open the COM port. The HUGE Receive Buffer (RB) isB
required because some computers have fits at the original 6K buffer I used
(PS/2's especially. :> )m
,E,7,1,RB32767,RS,DS0"
Here, if NoDial is false, we send the Dialing prefix + Merit Number as read
out of the configuration file.e
Dialing Merit...
If MichNet doesn't answer, die.
Merit/MichNet did not answer."
Wait for CONNECT string
CONNECT"$
Read the string from CONNECT until the end of the linen
CONNECT"$
Connected to Merit/MichNet (
BUSY$
Merit/MichNet is busy.
If we get the traditional garbage at connection, then we send three returns
to get Merit to acknowledge our presence.
Which Host?"$
Send the Server + the port (6667)
6667"
*** No connection: Try again."
connect"$
cleared"$
If by the other ways mentioned above, the NickName still hasn't beenr
determined, ASK THE USER.
Enter Your Nickname (9 chars/NO spaces):
Here we are connected to the server, and send the text required to let
the server know who we are. After that, the MOTD starts, and things go.
:IRC:v
user ircexe 1 1
nick "
Here we have the entire big IRC Loop
Check for keypressg
If found, call Key Input routineo
IF NOT mono THEN COLOR Colors(1, 1), Colors(1, 2)
Parse Input'd string, if it really1
is a command beginning with "/"
Uh-oh, an Invalid "/" command!"
Invalid Command: "
Change Status Line
Cant send text to a channel if you aren't on any channels.n
*** You aren't on a channel, yet."d
privmsg
privmsg
IF y > 0 AND x > 0 AND scroll = 0 THEN
VIEW PRINT 1 TO 23
IF y < 23 THEN
LOCATE y, x
END IF
x = 1: y = 1
END IF
IF scroll THEN VIEW PRINT 1 TO 23: LOCATE y, 1
Process Modem Input
More Memory Needed: Terminating.d
Press any key to return to DOS..."
Device Timeout: Terminating.d
Press any key to return to DOS..."
Hardware Error: Termianting.d
Press any key to return to DOS..."
Warning: Printer is out of paper."d
File Not Foundd
Out of disk space. Shutting down RECORD file."d
Buffer Overflow, You are going to lose some text."d
privmsg msgserv tell "
has found an ERROR #"
in IRC.EXE version
Help file for '"
' not found.
Configuration file not found. Type IRC /C to configure."
ParseString
SHARED Flags$ ' Test off
/admin;
admin
/away";
away "
/beeps;
No Beeps (Mode 0).
Beeps Heard (Mode 1)."
Beeps Filtered (^G) (Mode 2)."
Beeps Filtered (^G) and Heard (Mode 3)."
*** Current Beep Mode: "
*** Beep Setting may only be a number, 0 through 3d
*** Beep Setting Out of Range (0-3).d
No Beeps (Mode 0).
Beeps Heard (Mode 1)."
Beeps Filtered (^G) (Mode 2)."
Beeps Filtered (^G) and Heard (Mode 3)."
*** New Beep Mode: "
/clear;
/cls;
/date";
/time";
time "
/echo";
*** Format:
<text..text...>
/fullwho;
/help";
/invite";
/inv;
*** Format:
<nickname> [channel]"
invite "
/info";
/ignore";
/join";
/channel;
*** Format:
<channel>
JOIN "
/key;
*** Format: /KEY <fkeynumber> <text>d
*** To denote a CR in a Macro, enter a carat (^)d
*** Invalid Key. (May only be a number, 1 through 10.)d
/kick";
*** Format:
<user> <channel>"
kick "
/kill";
*** Format:
<user>"
kill "
/links;
links
/list";
list "
/lusers";
lusers
/msg;
*** Format:
<user> <text..text...>"
privmsg
/motd";
motd "
/miscgarb";
/mode";
*** Format:
<channel> <mode change> [operands]"
mode "
/mailread";
voice msgserv read "
/maildelete";
/maildel;
voice msgserv delete "
/mail";
*** Format:
<user> <text..text...>"
voice msgserv tell "
/names;
names
/nick";
/ni";
*** Format:
<nickname>"
nick "
/nickpass";
voice nickserv@service.de passwd "
/noecho";
/part";
PART "
/query;
/quote;
/quo;
/quit";
/bye;
/exit";
/signoff;
/qu";
/record";
/rec;
You are already recording output!"d
Recording ended at "U
Recording started at "U
/read";
*** Format:
<file>"
/regnick;
voice nickserv@service.de del
voice nickserv@service.de add
/shell;
/exec";
COMSPEC"
PONG IRCEXE@MSDOS"
/scroll";
/summon";
*** Format: /summon <userid>[@system]"d
summon "
/stats;
stats"
/topic;
/top;
*** Format:
<topic>
topic
/type";
*** Format:
<file>"
/users;
users
/version;
*** You are using IRC.EXE Version
*** Written by "
version
/who;
-OPER"$
/whois;
/wi";
*** Format:
<user>"
whois
/whowas";
/ww";
*** Format:
<user>"
whowas "
/wallops;
wallops
/waitfor;
/wf";
*** Format:
[-]<user>
voice waitserv giveup
voice waitserv waitfor "
ModemIn
We may have just solved the majority of Line Garbage problems that
reformat your screen and
* everything up.
Remove LineFeeds, they act funny.
%Call";
cleared"$
Disconnected from Server: Terminating.d
Press any key to return to DOS..."
CARRIER"$
Carrier Lost: Terminating.d
Press any key to return to DOS..."
PING;
To make sure the server knows we are still there.
PONG IRC.EXE@MSDOS
NAMREPLY;
Reply to /NAMES command
Unknown"
Channel: "
Users:
NOTICE;
A notice from the current server
END OF$
/read ircstart.sys8
wallops";
Message to all Network Operators
msg";
Normal message to a channel
privmsg";
Private message to someone
waitserv
who";
names";
quit;
lusers;
names";
summon;
quote";
time;
away;
invite;
links";
topic";
whois";
help;
list;
motd;
users";
whowas;
channel";
admin";
PONG;
user;
nick;
kick;
mode;
version";
kill;
info;
stats";
%Parity";
PART;
JOIN;
voice";
Reply to /WHO - Don't ask what all this does.
Status
-OPER"
Host$
Messages beginning with a :
PART;
has left Channel
JOIN;
Channel change messages
Update status bar if the user running
IRC.EXE was the one changing.
has joined channel
NICK;
Nickname changes.
is now known as
If you are using /IGNORE on a person, and they are in
the current channel, and they change nicks, change the
IGNORE variable approp.
QUIT;
Sign off messages.
has signed off.
TOPIC";
Topic change messages
*** Topic Changed by "
to: "
INVITE;
Messages inviting user to a channel
has invited you to channel
NOTICE;
Notices from a certain person/serverc
serv$
PRIVMSG";
Private Messages
PRIVMSG"$
VERSION"
privmsg
is running Merit IRC Version
privmsg
is IGNORING you."
MSG";
Channel Messages
MODE;
MODE Change notices
*** Mode Change by "
481";
You are not the channel operator."
473";
You must be invited to that channel.
461";
No User Specified for /kill!
441";
You have not joined a channel!
433";
Change nick back to old nick if new nick is in usen
That nickname is already in use!
421";
412";
No Text to send!
411";
No Recipient given!"
404";
That channel does not allow private messages to it."
403";
Invalid Channel.
401";
The user is not logged on.
391";
366";
*** End of /NAMES List
365";
*** End of /LINKS list
341";
User inviting someone else to a channel.g
*** You have invited "
to Channel
332";
Channel Topic given when entering a channel
Variable used for 2.6 onlye
*** Channel ("
) Topic: "
324";
Show the current channel's mode
Channel ("
)'s mode:"
323";
*** End of /LIST
322";
Reply from a /LIST.
-*Private*-"
321";
/LIST header
CHANNEL # # of Users Topic Of Channel"
317";
*** Last command received at "
316";
is a channel operator.
315";
*** End of /WHO"
314";
Whowas reply.
was "
313";
is a network operator.
312";
312"$
*** Using Server "
311";
/WHOIS reply
311"$
) on channel "
301";
Away reply
Filter out Join,ModeChange,Leave,Quit, Etc garbagea
I want to put in a thing to allow multiple Query's.
Also, I would like to fix the Change-Channel while inputing problemss
but that may require re-working several routines.
Put to last line on screenk
** Execute only ON INITIAL CALL **X
** Dimension our Chat History buffer TO 50 lines **
** Set TypeMode to Insert(1), not Overstrike(0) **5
'RETURN
This funny looking character was
selected by Tom on the Amiga version.
I have NO idea how to type it in MSDOS.
-- EB
'BACKSPACE
'PAGE UP
'PG DN
'ALT-C
Channel Listing:d
'DELETE
'LEFT
'RIGHT
'DOWN
'HOME
'CLEAR
'MODE TOGGLE
'VALID CHARACTER
** INSERT **
** OVERSTRIKE **
** APPEND **
DrawCursor
StatusLine
MS-DOS IRC Version \ \ Compiled on \ \ \ \
N:\ \ C:\ \ Q:\ \ I:\ \ _*_* NO ECHO_! _*_* \ \ "
N:\ \ C:\ \ Q:\ \ I:\ \ R:\ \ \ \
ModString
Insert Server
Insert Queried user
Insert Channel name/#
Insert your nickname
"Target" of input. See docs.
SetFlags
Sets Flags$ variable
HelpSystem
This routine needs to be re-written very badly. I think it will be next
right after I make sure that the new stuff works properly.
Set Error routine to check for filesf
Marc Unangst requested that it doesn't clear screen anymore.
ParseString "/clear"
' Clear screen
If no topic is specified, grab the list of topics.h
topics
Check for screen paging.,
[Q]uit, or any other key to continue."d
Set error routine back to normal. This MUST
be done at the end of this subroutine, or
any error except file not found WILL crash IRC.EXE!
LoadConfig
irccnfg.sys"d
Your configuration is for version
. Please configure."
ReadFile
/TYPE
/READ
ERROR: Cannot nest /READ or /TYPE. File aborted.d
privmsg
privmsg
JoinChannel
Find a blank channel to stuff the entry intoo
if no blank entries, say we're on the max channel, and remove ourselves from
the newly joined channel.
You are on the maximum number of channels allowed.d
PART "
LeaveChannel
Find our entry in the Channels$() array
NextArg
Toggle
Set up view window, locate to the right line.
Figure out the length of the prefix (# of chars until first space - 1)
Do the formatting tricks
Handle recording to a file"
If we aren't echoing to screen, exit the routine, set y to the current line
Set the correct color
If we're scrolling, ignore the wrap stuff, just print it, and get out
We need to figure out how many lines this will take, and to get the current
cursor position
Now we figure out what line the text will end up at.
And now we start the text work.
We need to clean all the lines between here and 22.
Here we print the text, being careful not to scroll
Locate back to the top of the screen to put the cursor up.o
set the "cursor" color, print the cursor, clear the rest of the linec
Set the current cursor line, get out.
Now when the New Cursor Line is a bit out of range, we pop down to this one
LTP = Lines To Print before moving to Top of screen.w
Again, clear all the lines to 22.
Print the first part of the text, making sure not to scroll
Pop back up to the top to finish printing the textt
Set the New NewLine (ie, 24 - 22 = line 2)t
Clear the lines between 1 and the NewLine
Print the rest of the text
Set the new Cursor Line
Print the "cursor"