Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
<c> motd (Staff Message of the Day)

 
Post new topic   Reply to topic Printable version
 View previous topic  <py> Subspace Casino Post :: Post <py> br (bounty rabbit)  View next topic  
Author Message
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Sun Sep 30, 2007 2:26 pm    Post subject: <c> motd (Staff Message of the Day) Reply to topic Reply with quote

Staff Message Of The Day.



Adds two commands:
?motd
?setmod

if you have access to ?motd, you also get the message whenever you join the zone.




motd.c
ASSS 1.4.4.

motd.c - 3.9 KB
File downloaded or viewed 49 time(s)

Screenshot

staffmotd.jpg - 20.71 KB
File downloaded or viewed 31 time(s)


Last edited by JoWie on Mon Oct 01, 2007 4:02 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sun Sep 30, 2007 6:52 pm    Post subject: Reply to topic Reply with quote

you seem to have two cfg's everywhere:

Quote:
// Interfaces
local Imodman *mm;
local Ichat *chat;
local Icapman *capman;
local Iconfig *cfg;
local Icmdman *cmd;
local Iconfig *cfg;
local Iplayerdata *pd;


Quote:
chat = mm->GetInterface(I_CHAT,ALLARENAS);
capman = mm->GetInterface(I_CAPMAN,ALLARENAS);
cfg = mm->GetInterface(I_CONFIG,ALLARENAS);
cmd = mm->GetInterface(I_CMDMAN, ALLARENAS);
cfg = mm->GetInterface(I_CONFIG, ALLARENAS);
pd = mm->GetInterface(I_PLAYERDATA, ALLARENAS);

if (!chat || !capman || !cfg || !cmd || !cfg || !pd) {
printf("<motd> Missing Interface\n");
return MM_FAIL;
} else {


which isn't too big of a deal; I'm not sure how you got it to compile with two variables with the same name though.

also, in MM_LOAD, if getting one of the interfaces fails, you return MM_FAIL without releasing the rest of the interfaces. This isn't a problem if the module is in modules.conf because the server won't start if any of the modules fail to load, however if the module is inserted with *insmod and fails to load, the reference count for the interfaces that did load will be incorrect and other modules will not be able to unload. Mostly only a problem if the server uses dynamic loading and unloading of modules... other than that looks good!
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Mon Oct 01, 2007 3:59 pm    Post subject: Reply to topic Reply with quote

ah thanks,

it is a bit odd GCC didn't show any warning or error about the variable.

anyways, I uploaded a new version
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 675 page(s) served in previous 5 minutes.

phpBB Created this page in 0.465369 seconds : 30 queries executed (79.6%): GZIP compression disabled