mirror of
https://github.com/anope/anope.git
synced 2026-06-28 19:16:40 +02:00
Mark some stuff deprecated, move implementation from the interface into the user class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1206 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+3
-3
@@ -1019,9 +1019,9 @@ E void notice_server(char *source, Server * s, char *fmt, ...)
|
||||
E void notice_user(char *source, User *u, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void notice_list(const char *source, const char *dest, char **text);
|
||||
E void notice_lang(const char *source, User *dest, int message, ...);
|
||||
E void notice_help(const char *source, User *dest, int message, ...);
|
||||
E void notice_list(const char *source, const char *dest, char **text) MARK_DEPRECATED;
|
||||
E void notice_lang(const char *source, User *dest, int message, ...) MARK_DEPRECATED;
|
||||
E void notice_help(const char *source, User *dest, int message, ...) MARK_DEPRECATED;
|
||||
|
||||
|
||||
/**** servers.c ****/
|
||||
|
||||
+7
-13
@@ -55,12 +55,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Windows does not have:
|
||||
* unistd.h, grp.h,
|
||||
* netdb.h, netinet/in.h,
|
||||
* sys/socket.h, sys/time.h
|
||||
* Windows requires:
|
||||
* winsock.h
|
||||
/* Windows does not have: unistd.h, grp.h, netdb.h, netinet/in.h, sys/socket.h, sys/time.h
|
||||
* Windows requires: winsock.h
|
||||
* -- codemastr
|
||||
*/
|
||||
|
||||
@@ -164,13 +160,6 @@
|
||||
* prototypes. */
|
||||
extern int strcasecmp(const char *, const char *);
|
||||
extern int strncasecmp(const char *, const char *, size_t);
|
||||
# if 0 /* These break on some AIX boxes (4.3.1 reported). */
|
||||
extern int gettimeofday(struct timeval *, struct timezone *);
|
||||
extern int socket(int, int, int);
|
||||
extern int bind(int, struct sockaddr *, int);
|
||||
extern int connect(int, struct sockaddr *, int);
|
||||
extern int shutdown(int, int);
|
||||
# endif
|
||||
# undef FD_ZERO
|
||||
# define FD_ZERO(p) memset((p), 0, sizeof(*(p)))
|
||||
#endif /* _AIX */
|
||||
@@ -206,6 +195,11 @@ extern int shutdown(int, int);
|
||||
# undef int32
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#define MARK_DEPRECATED __attribute((deprecated))
|
||||
#else
|
||||
#define MARK_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* Miscellaneous definitions. */
|
||||
#include "defs.h"
|
||||
|
||||
@@ -90,5 +90,15 @@ class User
|
||||
/** Updates the realname of the user record.
|
||||
*/
|
||||
void SetRealname(const std::string &realname);
|
||||
|
||||
/**
|
||||
* Send a message (notice or privmsg, depending on settings) to a user
|
||||
* @param source Sender nick
|
||||
* @param fmt Format of the Message
|
||||
* @param ... any number of parameters
|
||||
* @return void
|
||||
*/
|
||||
void SendMessage(const char *source, const char *fmt, ...);
|
||||
void SendMessage(const char *source, const std::string &msg);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user