+jilles 2007/04/28 23:47:25 UTC (20070428-3434)
+ Log:
+ Merge old trunk r2767:
+ Copy channel name from command on lowerTS JOIN/SJOIN,
+ this makes the capitalization of the channel name
+ timestamped like modes are.
+
+
+ Changes: Modified:
+ +3 -0 trunk/modules/core/m_join.c (File Modified)
+ +3 -0 trunk/modules/core/m_sjoin.c (File Modified)
+
+
jilles 2007/04/26 23:01:16 UTC (20070426-3432)
Log:
Merge old trunk r2065,r2067:
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cache.c 254 2005-09-21 23:35:12Z nenolod $
+ * $Id: cache.c 3436 2007-05-02 19:56:40Z jilles $
*/
#include "stdinc.h"
struct cachefile *user_motd = NULL;
struct cachefile *oper_motd = NULL;
-struct cacheline *emptyline = NULL;
dlink_list links_cache_list;
char user_motd_changed[MAX_DATE_STRING];
cachefile_heap = BlockHeapCreate(sizeof(struct cachefile), CACHEFILE_HEAP_SIZE);
cacheline_heap = BlockHeapCreate(sizeof(struct cacheline), CACHELINE_HEAP_SIZE);
- /* allocate the emptyline */
- emptyline = BlockHeapAlloc(cacheline_heap);
- emptyline->data[0] = ' ';
- emptyline->data[1] = '\0';
user_motd_changed[0] = '\0';
user_motd = cache_file(MPATH, "ircd.motd", 0);
if((p = strchr(line, '\n')) != NULL)
*p = '\0';
- if(!EmptyString(line))
- {
- lineptr = BlockHeapAlloc(cacheline_heap);
- strlcpy(lineptr->data, line, sizeof(lineptr->data));
- dlinkAddTail(lineptr, &lineptr->linenode, &cacheptr->contents);
- }
+ lineptr = BlockHeapAlloc(cacheline_heap);
+ if(EmptyString(line))
+ strlcpy(lineptr->data, " ", sizeof(lineptr->data));
else
- dlinkAddTailAlloc(emptyline, &cacheptr->contents);
+ strlcpy(lineptr->data, line, sizeof(lineptr->data));
+ dlinkAddTail(lineptr, &lineptr->linenode, &cacheptr->contents);
}
fclose(in);
DLINK_FOREACH_SAFE(ptr, next_ptr, cacheptr->contents.head)
{
- if(ptr->data != emptyline)
- BlockHeapFree(cacheline_heap, ptr->data);
+ BlockHeapFree(cacheline_heap, ptr->data);
}
BlockHeapFree(cachefile_heap, cacheptr);