(New message)
Subject review (reverse sequence)
Posted by
Metsuro
USA (389 posts) bio
Date
Mon 17 Oct 2005 12:31 AM (UTC) [ quote
]
Message
Well ok... nevermind i think i fixed it... not sure will seen later tonight, but i forgot to place the extra ( after the if in the first line of it. heh.
Everything turns around in the end top
Posted by
Zeno
USA (2,867 posts) bio
Moderator
Date
Sun 16 Oct 2005 10:01 PM (UTC) [ quote
]
Message
If you show us the lines, I'm sure we'd be able to see what's wrong.
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org top
Posted by
Metsuro
USA (389 posts) bio
Date
Sun 16 Oct 2005 09:30 PM (UTC) [ quote
]
Message
well first i tired to just change it and it didn't work so i copy and pasted and didnt work again, donno really... but because its and else if and not just an if have anything to do with it?
Everything turns around in the end top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Sun 16 Oct 2005 09:27 PM (UTC) [ quote
]
Message
You sure you did exactly that? There is a bracket on a line on its own. Try pasting here what your code looks like with your change.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Metsuro
USA (389 posts) bio
Date
Sun 16 Oct 2005 09:07 PM (UTC) [ quote
]
Message
when putting this in smaugfuss 1.6 you get many many errors, why might it do this?
Everything turns around in the end top
Posted by
Nexela
USA (14 posts) bio
Date
Sat 01 Feb 2003 03:56 AM (UTC) [ quote
]
Message
Thanks for the help Nick worked like a charm the second time around.. maybe I wont ask questions when Im half alseep :P
wait! wait! I didnt want to format! top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 31 Jan 2003 10:17 PM (UTC) [ quote
] Amended on Fri 31 Jan 2003 10:21 PM (UTC) by Nick Gammon
Message
Whoops! Sorry, didn't notice it was a nested IF. Try this variation ...
if ( ((!d->character && d->idle > 360) /* 2 mins */
|| ( d->connected != CON_PLAYING && d->idle > 1200) /* 5 mins */
|| d->idle > 28800 ) /* 2 hrs */
/* allow imms to stay on indefinitely */
&& !(d->character && d->character->level >= LEVEL_IMMORTAL)
)
{
write_to_descriptor( d->descriptor,
"Idle timeout... disconnecting.\n\r", 0 );
d->outtop = 0;
close_socket( d, TRUE );
continue;
}
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Nexela
USA (14 posts) bio
Date
Fri 31 Jan 2003 05:37 AM (UTC) [ quote
]
Message
The first time I rebooted with this change it was a lil slower then usual but after that reboots and restarts are back up to there normal speed for me.
Didnt test the timeout yet though but I have a feeling it will work I'll be sure to let ya know sometime tommorow
wait! wait! I didnt want to format! top
Posted by
Ithildin
USA (262 posts) bio
Date
Fri 31 Jan 2003 05:19 AM (UTC) [ quote
]
Message
Hey, I tried to insert that into the code, and boy... it put a terrible horrible lag on the executable. i couldn't even log in. it would load my character after about a minute and a half then it wouldn't do anything else. any thoughts? and did it happen to the first person who wrote this subject?
Ithildin
i took that line back out and it ran fine top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 31 Jan 2003 04:51 AM (UTC) [ quote
]
Message
if ( (!d->character && d->idle > 360) /* 2 mins */
|| ( d->connected != CON_PLAYING && d->idle > 1200) /* 5 mins */
|| d->idle > 28800 ) /* 2 hrs */
if (d->character && d->character->level < LEVEL_IMMORTAL)
{
write_to_descriptor( d->descriptor,
"Idle timeout... disconnecting.\n\r", 0 );
d->outtop = 0;
close_socket( d, TRUE );
continue;
}
New line in bold.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Nexela
USA (14 posts) bio
Date
Fri 31 Jan 2003 03:40 AM (UTC) [ quote
]
Message
ok being fairly new to coding I gues Ill post my question here and let you guys do all the work *duck* errr I mean thanks for all help I get
ok Heres my dilema Running Smaug 1.4a Cygwin source and I want to stop the server from disconnecting Immortals I think I have narrowed it down to this bit of code in Comm.c
if ( (!d->character && d->idle > 360) /* 2 mins */
|| ( d->connected != CON_PLAYING && d->idle > 1200) /* 5 mins */
|| d->idle > 28800 ) /* 2 hrs */
{
write_to_descriptor( d->descriptor,
"Idle timeout... disconnecting.\n\r", 0 );
d->outtop = 0;
close_socket( d, TRUE );
continue;
}
how would rewrite that so It doesnt dissconnect Immortals?
wait! wait! I didnt want to format! top
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
2,928 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )