diff --git a/.cproject b/.cproject
index 894cb40..547ff9b 100644
--- a/.cproject
+++ b/.cproject
@@ -3,7 +3,7 @@
-
+
@@ -52,12 +52,13 @@
-
+
+
diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs
index 022af47..4f86f71 100644
--- a/.settings/org.eclipse.cdt.core.prefs
+++ b/.settings/org.eclipse.cdt.core.prefs
@@ -1,3 +1,4 @@
-#Fri Nov 30 08:38:05 EST 2007
+#Mon Jan 14 21:30:55 EST 2008
eclipse.preferences.version=1
+indexer/indexerId=org.eclipse.cdt.core.domsourceindexer
indexerId=org.eclipse.cdt.core.domsourceindexer
diff --git a/botthread.c b/botthread.c
index 294ec9f..b8feac9 100644
--- a/botthread.c
+++ b/botthread.c
@@ -202,6 +202,17 @@
tuveSendAllInChan(chan,0x0,output);
}
break;
+ case 'S':
+ tmpChan->modes[CHAN_SCHEDULED] = dM;
+ sprintf(output,"MSG:TUveD:%s:%s Sets Mode %cScheduled",chan,userConnection->userInfo.username,dMS[dM]);
+ tuveSendAllInChan(chan,0x0,output);
+ sprintf(output,"MODE:%s:S:%i",tmpChan->channel,dM);
+ tuveSendAllInChan(chan,0x0,output);
+ if (dM == 1)
+ tmpChan->nextUser = userConnection;
+ else
+ tmpChan->nextUser = tmpChan->users;
+ break;
default:
sSendData(userConnection,"MSG:TUveD:STATUS:Invalid Channel Mode");
break;
@@ -376,6 +387,8 @@
/* Set point to starting user */
findUser:
+ if (tmpChans->modes[CHAN_SCHEDULE] == 0x1)
+ goto gotUser;
if (tmpChans->modes[CHAN_QUEUE] == 0x0) /* If Channel Has Queues Disabled Jump Right To Random */
goto getRandom;
diff --git a/main.c b/main.c
index 51d5ad9..43e196c 100644
--- a/main.c
+++ b/main.c
@@ -1,8 +1,10 @@
-/*
- Tuved Server
+/*****************************************************************************************
+ Copyright (c) 2002-2004, 2005, 2007 Ubix Technology Group
+ All rights reserved.
- $Id$
-*/
+ $Id$
+
+*****************************************************************************************/
#include
#include
@@ -23,14 +25,14 @@
void usage();
int main(int argc,char **argv) {
- fd_set readset;
- int ch;
- int readSocks = 0x0;
- int doFork = 0x1;
- int rc = 0x0;
- int t = 0x0;
- time_t seconds = 0;
- struct timeval timeout = {30,0};
+ fd_set readset;
+ int ch;
+ int readSocks = 0x0;
+ int doFork = 0x1;
+ int rc = 0x0;
+ int t = 0x0;
+ time_t seconds = 0;
+ struct timeval timeout = {30,0};
/* Get our start time */
startTime = time(NULL);
@@ -66,11 +68,12 @@
/* Fork into background unless specified not to do so */
if (doFork == 1)
if (fork() != 0x0)
- exit(1);
+ exit(0x1);
writeLog(0,"Podz Daemon Starting: %i\n",startTime);
- dbInit();
+ if (dbInit() == 0x1)
+ exit(0x1);
srandom(time(NULL));
@@ -79,8 +82,6 @@
pthread_t threads[NUM_THREADS];
rc = pthread_create(&threads[t], NULL, tuveCMD_Thread, (void *)t);
-
-
sStartListener();
while (1) {
diff --git a/tuved.h b/tuved.h
index e69f3c2..5cda4d9 100644
--- a/tuved.h
+++ b/tuved.h
@@ -30,7 +30,7 @@
#define MYSQL_PASSWORD "5558585"
#define MYSQL_DB_NAME "tuve"
#define VIDE_PAD_TIME 2 // Time Added To Video End To Ensure All Are In Sync
-#define MIN_VER 2.1 // Current client version
+#define MIN_VER 2.6 // Current client version
/* User Defs */
#define USER_MODES 2 // Count Of User Modes
@@ -41,7 +41,7 @@
#define CHAN_LIVE_LENGTH 128
/* Cannel Modes */
-#define CHAN_MODES 7 // Count Of Channel Modes
+#define CHAN_MODES 8 // Count Of Channel Modes
#define CHAN_RANDOM 0 // Random Videos
#define CHAN_QUEUE 1 // Users Queues
#define CHAN_TIME 2 // Video Time Limit
@@ -49,6 +49,7 @@
#define CHAN_CLASS 4 // Video Classs
#define CHAN_LIVE 5 // Channel Is In Live Stream Mode
#define CHAN_EXCLUSIVE 6 // Channel Is In Exclusive Mode
+#define CHAN_SCHEDULED 7 // Channel Is In Scheduled Mode
typedef struct tuveUserList {
struct tuveUserList *prev;
@@ -87,16 +88,16 @@
} tuveUserChans_t;
typedef struct tuveUser {
- short ident;
- short pfailed;
- short status;
- short queue;
+ short ident;
+ short pfailed;
+ short status;
+ short queue;
long long uid;
- time_t pong;
- time_t idle;
- char modes[USER_MODES];
- char username[MAX_USER_LEN];
- char awayMsg[MAX_USER_AWAYMSG];
+ time_t pong;
+ time_t idle;
+ char modes[USER_MODES];
+ char username[MAX_USER_LEN];
+ char awayMsg[MAX_USER_AWAYMSG];
tuveUserChans_t *chans;
} tuveUser_t;