viewing paste Unknown #5641 | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
Index: conf/login_athena.conf
===================================================================
--- conf/login_athena.conf  (revision 17257)
+++ conf/login_athena.conf  (working copy)
@@ -38,7 +38,7 @@
 // Console Commands
 // Allow for console commands to be used on/off
 // This prevents usage of >& log.file
-console: off
+console: yes
 
 // Can you use _M/_F to make new accounts on the server?
 new_account: yes
Index: conf/map_athena.conf
===================================================================
--- conf/map_athena.conf    (revision 17257)
+++ conf/map_athena.conf    (working copy)
@@ -79,7 +79,7 @@
 // Console Commands
 // Allow for console commands to be used on/off
 // This prevents usage of >& log.file
-console: off
+console: on
 
 // Database autosave time
 // All characters are saved on this time in seconds (example:
Index: conf/char_athena.conf
===================================================================
--- conf/char_athena.conf   (revision 17257)
+++ conf/char_athena.conf   (working copy)
@@ -64,7 +64,7 @@
 // Console Commands
 // Allow for console commands to be used on/off
 // This prevents usage of >& log.file
-console: off
+console: on
 
 // Type of server.
 // No functional side effects at the moment.
Index: conf/msg_conf/map_msg.conf
===================================================================
--- conf/msg_conf/map_msg.conf  (revision 17257)
+++ conf/msg_conf/map_msg.conf  (working copy)
@@ -449,6 +449,7 @@
 462: This language is currently disabled.
 463: Message configuration has been reloaded.
 464: ---- Available languages:
+464: Available langage
 
 // Messages of others (not for GM commands)
 // ----------------------------------------
Index: src/common/cli.c
===================================================================
--- src/common/cli.c    (revision 17257)
+++ src/common/cli.c    (working copy)
@@ -2,7 +2,7 @@
 #include <string.h>
 #include <stdlib.h>
 #ifdef WIN32
-   #include <conio.h>
+   #include <winsock2.h>
 #else
    #include <sys/poll.h>
 #endif
@@ -157,19 +157,18 @@
 }
 
 int cli_hasevent(){
-#ifdef WIN32
-   return _kbhit();
-#else
    struct pollfd fds;
    fds.fd = 0; /* this is STDIN */
    fds.events = POLLIN;
+#ifndef WIN32
    return poll(&fds, 1, 0);
+#else
+   return WSAPoll(&fds, 1, 0);
 #endif
 }
 
 int parse_console_timer(int tid, unsigned int tick, int id, intptr_t data) {
    char buf[MAX_CONSOLE_IN]; //max cmd atm is 63+63+63+3+3
-
    memset(buf,0,MAX_CONSOLE_IN); //clear out buf
 
    if(cli_hasevent()){
@@ -177,7 +176,7 @@
            return -1;
        else if(strlen(buf)>MIN_CONSOLE_IN)
            parse_console(buf);
-   }
+       }
    return 0;
 }
 
Index: src/common/cli.h
===================================================================
--- src/common/cli.h    (revision 17257)
+++ src/common/cli.h    (working copy)
@@ -36,6 +36,7 @@
 int parse_console_timer(int tid, unsigned int tick, int id, intptr_t data);
 extern int parse_console(const char* buf); //particular for each serv
 
+
 #ifdef __cplusplus
 }
 #endif
Viewed 1154 times, submitted by lighta.