/** Class packet is deprecated.
* This declaration is preserved here to maintain documentation only.
*/
-class packet
+class packet : public classbase
{
};
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();
-
void * (*factory_func)(void);
};
// is deleted, because the DLL will get unloaded as well.
//
-template <class T>
-class DLLFactory : public DLLFactoryBase
+template <class T> class DLLFactory : public DLLFactoryBase
{
public:
- 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;
}
~DLLFactory()
-DLLManager::DLLManager( const char *fname )
+DLLManager::DLLManager(const char *fname)
{
// 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
}
-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
#include <errno.h>
#include <deque>
#include <errno.h>
+#include <unistd.h>
+#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
{
if (((command[x] < '0') || (command[x]> '9')) && (command[x] != '-'))
{
- if (strchr("@!\"$%^&*(){}[]_-=+;:'#~,.<>/?\\|`",command[x]))
+ if (!strchr("@!\"$%^&*(){}[]_-=+;:'#~,.<>/?\\|`",command[x]))
{
kill_link(user,"Protocol violation (3)");
return;
/* main loop, this never returns */
for (;;)
{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ sched_yield();
+#endif
fd_set sfd;
timeval tval;
//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)))
{
// class type for holding an extended mode character - internal to core
-class ExtMode
+class ExtMode : public classbase
{
public:
char modechar;