git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@635
e03df62e-2008-0410-955e-
edbf42e46eb7
/** Class packet is deprecated.
* This declaration is preserved here to maintain documentation only.
*/
/** Class packet is deprecated.
* This declaration is preserved here to maintain documentation only.
*/
+class packet : public classbase
class DLLFactoryBase : public DLLManager
{
public:
class DLLFactoryBase : public DLLManager
{
public:
- DLLFactoryBase(
- const char *fname,
- const char *func_name=0
- );
-
+ DLLFactoryBase(const char *fname, const char *func_name = 0);
virtual ~DLLFactoryBase();
virtual ~DLLFactoryBase();
void * (*factory_func)(void);
};
void * (*factory_func)(void);
};
// is deleted, because the DLL will get unloaded as well.
//
// is deleted, because the DLL will get unloaded as well.
//
-template <class T>
-class DLLFactory : public DLLFactoryBase
+template <class T> class DLLFactory : public DLLFactoryBase
- DLLFactory(
- const char *fname,
- const char *func_name=0
- ) : DLLFactoryBase( fname, func_name )
+ DLLFactory(const char *fname, const char *func_name=0) : DLLFactoryBase(fname,func_name)
- if( factory_func )
- factory = (T *)factory_func();
- else
- factory = 0;
+ if (factory_func)
+ factory = (T*)factory_func();
+ else
+ factory = 0;
-DLLManager::DLLManager( const char *fname )
+DLLManager::DLLManager(const char *fname)
{
// Try to open the library now and get any error message.
{
// Try to open the library now and get any error message.
-bool DLLManager::GetSymbol(
- void **v,
- const char *sym_name
- )
+bool DLLManager::GetSymbol(void **v, const char *sym_name)
{
// try extract a symbol from the library
// get any error message is there is any
{
// try extract a symbol from the library
// get any error message is there is any
-DLLFactoryBase::DLLFactoryBase(
- const char *fname,
- const char *factory
- ) : DLLManager(fname)
+DLLFactoryBase::DLLFactoryBase(const char *fname, const char *factory) : DLLManager(fname)
{
// try get the factory function if there is no error yet
{
// try get the factory function if there is no error yet
#include <errno.h>
#include <deque>
#include <errno.h>
#include <errno.h>
#include <deque>
#include <errno.h>
+#include <unistd.h>
+#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
#include "connection.h"
#include "users.h"
#include "servers.h"
{
if (((command[x] < '0') || (command[x]> '9')) && (command[x] != '-'))
{
{
if (((command[x] < '0') || (command[x]> '9')) && (command[x] != '-'))
{
- if (strchr("@!\"$%^&*(){}[]_-=+;:'#~,.<>/?\\|`",command[x]))
+ if (!strchr("@!\"$%^&*(){}[]_-=+;:'#~,.<>/?\\|`",command[x]))
{
kill_link(user,"Protocol violation (3)");
return;
{
kill_link(user,"Protocol violation (3)");
return;
/* main loop, this never returns */
for (;;)
{
/* main loop, this never returns */
for (;;)
{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ sched_yield();
+#endif
fd_set sfd;
timeval tval;
fd_set sfd;
timeval tval;
//if (selectResult2 > 0)
for (user_hash::iterator count2a = xcount; count2a != endingiter; count2a++)
{
//if (selectResult2 > 0)
for (user_hash::iterator count2a = xcount; count2a != endingiter; count2a++)
{
+
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ sched_yield();
+#endif
+
result = EAGAIN;
if ((count2a->second->fd != -1) && (FD_ISSET (count2a->second->fd, &sfd)))
{
result = EAGAIN;
if ((count2a->second->fd != -1) && (FD_ISSET (count2a->second->fd, &sfd)))
{
// class type for holding an extended mode character - internal to core
// class type for holding an extended mode character - internal to core
+class ExtMode : public classbase