Instead of typing "who 1",can you compile it to "who" so when you type "who" you can see everybody whos on the mud?
Who
Posted by Chris on Sun 15 Jul 2001 12:19 AM — 20 posts, 86,486 views.
Yes, that can be done. I suggest you look in the do_who function.
Uh,still kind of new at this.
Wheres the do_who function?
Wheres the do_who function?
Ok, here's what he means by all this "function" talk. What he's saying, basically, is that you'll have to edit the source code (found in the src directory), which is written in the C programming language. Each .c file contains different parts of the source code, which contains functions such as "do_who" and "nanny" etc. You would then need to recompile the source code. I use cygwin, which takes quite a bit of hard disk space and a little getting used to, but it's free. I suggest you read through all the previous compiling the server posts (many of which are made by me), which ask the same questions, then are answered by Nick or whomever else. :) If you don't know C, I'd suggest you find an online tutorial or take a class or whatever, and learn your way through the source code as you go.
For example, I too wanted to eliminate the "who 1" junk. So, in the file act_info.c, I found the do_who function, and near the beginning was the following ifcheck:
if ( ch && argument[0] == '\0' )
{
send_to_pager_color(
"\n\r&GYou must specify at least one argument.\n\rUse 'who 1' to view the entire who list.\n\r", ch);
return;
}
That basically says "If the person doesn't type anything after 'who', then tell the person this, then return (exit) from the function."
I hope that helps =)
For example, I too wanted to eliminate the "who 1" junk. So, in the file act_info.c, I found the do_who function, and near the beginning was the following ifcheck:
if ( ch && argument[0] == '\0' )
{
send_to_pager_color(
"\n\r&GYou must specify at least one argument.\n\rUse 'who 1' to view the entire who list.\n\r", ch);
return;
}
That basically says "If the person doesn't type anything after 'who', then tell the person this, then return (exit) from the function."
I hope that helps =)
In the act_info.c it stands:
* Now find matching chars.
*/
nMatch = 0;
buf[0] = '\0';
if ( ch )
set_pager_color( AT_GREEN, ch );
else
{
if ( fShowHomepage )
whoout = fopen( WEBWHO_FILE, "w" );
else
whoout = fopen( WHO_FILE, "w" );
if ( !whoout )
{
bug( "do_who: cannot open who file!" );
return;
}
}
What do i change here??
* Now find matching chars.
*/
nMatch = 0;
buf[0] = '\0';
if ( ch )
set_pager_color( AT_GREEN, ch );
else
{
if ( fShowHomepage )
whoout = fopen( WEBWHO_FILE, "w" );
else
whoout = fopen( WHO_FILE, "w" );
if ( !whoout )
{
bug( "do_who: cannot open who file!" );
return;
}
}
What do i change here??
As it turns out the lines of code Kris mentioned are surrounded by a #define, so you can make that change by simply removing one line from the file mud.h, namely:
Then you would delete the file act_info.o and do a "make".
#define REQWHOARG
Then you would delete the file act_info.o and do a "make".
A make?
act_info.o??
Hmmm - I am planning to write a web page to explain some of these terms shortly. Best wait for that.
I have now done an extensive web page which describes using 'make', deleting object files, and in particular gives an example of changing SMAUG to make the 'who' command behave differently. See How to make changes, including compiling
I've followed instructions on how to get rid of the "who 1" issue, as presented in Gammon's informative website. I downloaded Cygwin and all, edited the mud.h file to remove the REQWHOARG, and then made the file.
At that point, I get a new smaug.exe file in the src directory, which, when run, says there is no cygwin1.dll file and therefore it is unrunnable.
I have two questions:
1. I was unable to find an act_info.o object file which I was supposed to delete, as part of the directions, and skipped this step. Any idea if this wrong, or why there's no act_info.o file?
2. What is this cygwin1.dll file, and where do I find it and place it for the compiled smaug.exe to run?
At that point, I get a new smaug.exe file in the src directory, which, when run, says there is no cygwin1.dll file and therefore it is unrunnable.
I have two questions:
1. I was unable to find an act_info.o object file which I was supposed to delete, as part of the directions, and skipped this step. Any idea if this wrong, or why there's no act_info.o file?
2. What is this cygwin1.dll file, and where do I find it and place it for the compiled smaug.exe to run?
1. That means you simply hadn't compiled the source yet. It's not a problem.
2. Cygwin.dll should be in c:/cygwin/bin. There are two things you can do: add that directory to your path, or more easily, copy it to the same directory as smaug.exe. A third thing you can do is run smaug.exe from inside Cygwin; that should also work.
2. Cygwin.dll should be in c:/cygwin/bin. There are two things you can do: add that directory to your path, or more easily, copy it to the same directory as smaug.exe. A third thing you can do is run smaug.exe from inside Cygwin; that should also work.
Can't remember off hand where it is, but I don't think you need to move it if you try to run the mud from inside of the cygwin command prompt.
As to why you had no act_info.o, you either had not compiled yet or it is in the /o directory. if you check after you have compiled it, you should find the .o file
As to why you had no act_info.o, you either had not compiled yet or it is in the /o directory. if you check after you have compiled it, you should find the .o file
You were right on the o directory. Silly, I must have just overlooked it. I recompiled and the edited act_info was included.
So now, the smaug.exe and the cygwin issue. I'm going to see if I can fix this via the path route. I'll be back to comment.
So now, the smaug.exe and the cygwin issue. I'm going to see if I can fix this via the path route. I'll be back to comment.
Alright, I did two things:
1. copied and pasted the cygwin1.dll file to the directory where the newly recompiled smaug.exe is stored
2. added the c:/cygwin/bin directory to the path
RESULTS
1.Now, when you click the icon in windows, it just flashes on and off.
2. In the cygwin bash, it doesn't recognize any smaug.exe command to run.
3. At the command prompt, it gives me the same message as before:
"This application has failed to start because cygwin1.dll was not found."
I'm stuck.
PS - Keep in mind that I'm running a "protosmaug" copy of smaug in its own directory for testing, while I have my regular MUD safely in its own C:\smaug directory. At this point, the normal one runs just fine, with the exception of from Cygwin, which doesn't run executables for some reason.
1. copied and pasted the cygwin1.dll file to the directory where the newly recompiled smaug.exe is stored
2. added the c:/cygwin/bin directory to the path
RESULTS
1.Now, when you click the icon in windows, it just flashes on and off.
2. In the cygwin bash, it doesn't recognize any smaug.exe command to run.
3. At the command prompt, it gives me the same message as before:
"This application has failed to start because cygwin1.dll was not found."
I'm stuck.
PS - Keep in mind that I'm running a "protosmaug" copy of smaug in its own directory for testing, while I have my regular MUD safely in its own C:\smaug directory. At this point, the normal one runs just fine, with the exception of from Cygwin, which doesn't run executables for some reason.
You need to run SMAUG from inside the area directory. Typically you do this by using the startup script in src. Or, you can go to the shell, then go to your area directory, and type "../smaug" to start the game.
Another thing to keep in mind is that in Cygwin you sometimes have to type "./smaug" instead of just "smaug" if you want to run an executable in the current directory. This depends on whether or not '.' is in the path.
Another thing to keep in mind is that in Cygwin you sometimes have to type "./smaug" instead of just "smaug" if you want to run an executable in the current directory. This depends on whether or not '.' is in the path.
Thank you very much. Your advice works well.
Interestingly enough, though, I've decided to go with smaugFUSS instead of standard smaug. I figured the bug fixes were worth it, and having set it up, I realized that the who list already has the fix I was looking for.
However, I did finally get everything running on the original version about ten minutes ago, so thanks very much for your help. :)
Interestingly enough, though, I've decided to go with smaugFUSS instead of standard smaug. I figured the bug fixes were worth it, and having set it up, I realized that the who list already has the fix I was looking for.
However, I did finally get everything running on the original version about ten minutes ago, so thanks very much for your help. :)
Glad to be of help. :)
Going with SMAUGFuss is a very good idea, especially because of the bugfixes. You also have the advantage of a more maintained code base; SMAUG hasn't been updated in, well, a very long time. :)
It's also good that you got everything set up; the experience is very valuable and will certainly do you no harm in your future adventures as a MUD wizard. Good luck!
Going with SMAUGFuss is a very good idea, especially because of the bugfixes. You also have the advantage of a more maintained code base; SMAUG hasn't been updated in, well, a very long time. :)
It's also good that you got everything set up; the experience is very valuable and will certainly do you no harm in your future adventures as a MUD wizard. Good luck!
Thanks. :) You'll be hearing from me often.
Also, it's my experience as an early programmer that many people just don't want to help or share their knowledge. To see many of you on these forums be so helpful really makes my day.
Also, it's my experience as an early programmer that many people just don't want to help or share their knowledge. To see many of you on these forums be so helpful really makes my day.
Well, most people aren't willing to teach programming but should commonly help with problems or ideas, although that isn't always the case.