| 
			
				|  | Server Help Community forums for Subgame, ASSS, and bots
 
 |  
 
	
	
		| Author | Message |  
		| JoWie Server Help Squatter
 
 
 Gender:
  Joined: Feb 25 2004
 Posts: 215
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sun Sep 30, 2007 2:26 pm     Post subject: <c> motd (Staff Message of the Day) |  |   |  |  
				| 
 |  
				| 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 60 time(s)
 
 Screenshot
 
  staffmotd.jpg - 20.71 KB File downloaded or viewed 43 time(s)
 
 
 Last edited by JoWie on Mon Oct 01, 2007 4:02 pm, edited 1 time in total
 |  |  
		| Back to top |  |  
		|  |  
		| Bak ?ls -s
 0 in
 
  
 Age:26
 Gender:
  Joined: Jun 11 2004
 Posts: 1826
 Location: USA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sun Sep 30, 2007 6:52 pm     Post subject: |  |   |  |  
				| 
 |  
				| 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 |  |  
		|  |  
		| JoWie Server Help Squatter
 
 
 Gender:
  Joined: Feb 25 2004
 Posts: 215
 Offline
 
 | 
			
			  | 
				
					|  Posted: Mon Oct 01, 2007 3:59 pm     Post subject: |  |   |  |  
				| 
 |  
				| 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 |  |  
		|  |  
		|  |  
  
	| 
 
 | 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
 
 |  
 Software by php BB © php BB Group
 Server Load: 52 page(s) served in previous 5 minutes.
 |