summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-03-05 17:23:22 -0500
committerAdam <Adam@anope.org>2011-03-05 17:23:22 -0500
commit6fe2d8af973dfb0c81f513e56488e39a4eea2fbf (patch)
tree432b93053ef56d1ff98b3193d5768a4ca16d3785 /src/misc.cpp
parent90e5d0feaa1646c28cfce45dbde1a914a6f1d62c (diff)
Removed nickrequests, instead have unconfirmed registrations. Also made ns_resetpass allow remote-id to get past things such as kill immed.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 9efacf314..0ad233402 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -69,43 +69,6 @@ int tolower(char c)
/*************************************************************************/
-/**
- * merge_args: Take an argument count and argument vector and merge them
- * into a single string in which each argument is separated by
- * a space.
- * @param int Number of Args
- * @param argv Array
- * @return string of the merged array
- */
-const char *merge_args(int argc, const char **argv)
-{
- int i;
- static char s[4096];
- char *t;
-
- t = s;
- for (i = 0; i < argc; ++i)
- t += snprintf(t, sizeof(s) - (t - s), "%s%s", *argv++, i < argc - 1 ? " " : "");
- return s;
-}
-
-/*
- * XXX: temporary "safe" version to avoid casting, it's still ugly.
- */
-const char *merge_args(int argc, char **argv)
-{
- int i;
- static char s[4096];
- char *t;
-
- t = s;
- for (i = 0; i < argc; ++i)
- t += snprintf(t, sizeof(s) - (t - s), "%s%s", *argv++, i < argc - 1 ? " " : "");
- return s;
-}
-
-/*************************************************************************/
-
NumberList::NumberList(const Anope::string &list, bool descending) : is_valid(true), desc(descending)
{
Anope::string error;
@@ -839,12 +802,12 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case
* @param ... any number of parameters
* @return a Anope::string
*/
-Anope::string Anope::printf(const char *fmt, ...)
+Anope::string Anope::printf(const Anope::string &fmt, ...)
{
va_list args;
char buf[1024];
- va_start(args, fmt);
- vsnprintf(buf, sizeof(buf), fmt, args);
+ va_start(args, fmt.c_str());
+ vsnprintf(buf, sizeof(buf), fmt.c_str(), args);
va_end(args);
return buf;
}