// Parser.C -*- C++ -*-
// Copyright (c) 1997, 1998 Etienne BERNARD
-// Copyright (C) 2002,2003,2005 Clinton Ebadi
+// Copyright (C) 2002,2003,2005,2008 Clinton Ebadi
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
#include "config.h"
#endif
+#include <cstdlib>
#include <sys/types.h>
#include <netinet/in.h>
Person *from = 0;
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::RAW, line,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (line),
SCM_UNDEFINED));
#endif
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::INVITE,
nick + " " + channel,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
Utils::
str2scm
bool joinAndMode = false;
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::JOIN, n + " " + c,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (n),
Utils::
str2scm (c), SCM_UNDEFINED));
target + " " +
from->getNick () + " " +
channel + " " + reason,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm
(target),
Utils::
cnx->bot->botInterp->RunHooks (Hook::MODE,
from->getNick () + " " + ch +
" " + modes,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (from->
getNick
()),
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::NICKNAME,
on_orig + " " + nn,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm
(on_orig),
Utils::
if (Utils::channel_p (to))
cnx->bot->botInterp->RunHooks (Hook::PUBLIC_NOTICE,
nick + " " + to + " " + rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
Utils::
str2scm (to),
SCM_UNDEFINED));
else
cnx->bot->botInterp->RunHooks (Hook::NOTICE, nick + " " + rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
Utils::
str2scm (rest),
cnx->bot->botInterp->RunHooks (Hook::CTCP_REPLY,
nick + " " + command + " " +
rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
Utils::
str2scm
{
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::FLOOD, nick,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
SCM_UNDEFINED));
#endif
String channel = st.next_token ();
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::PART, n + " " + channel,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (n),
Utils::
str2scm
String n = from->getNick ();
#ifdef USESCRIPTS
cnx->bot->botInterp->RunHooks (Hook::SIGNOFF, n + " " + rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (n),
Utils::
str2scm (rest),
cnx->bot->botInterp->RunHooks (Hook::TOPIC,
from->getNick () + " " +
channel + " " + newTopic,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (from->
getNick
()),
cnx->bot->botInterp->RunHooks (Hook::CTCP,
nick + " " + to + " " +
command + " " + rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (nick),
Utils::
str2scm (to),
cnx->bot->botInterp->RunHooks (Hook::ACTION,
from->getNick () + " " + to +
" " + rest,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (from->
getNick
()),
cnx->bot->botInterp->RunHooks (Hook::PUBLIC,
from->getNick () + " " + to +
" " + parameters,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (from->
getNick
()),
cnx->bot->botInterp->RunHooks (Hook::MESSAGE,
from->getNick () + " " +
parameters,
- scm_listify (Utils::
+ scm_list_n (Utils::
str2scm (from->
getNick
()),
SCM scmFunc, int argsCount, String parameters)
{
String param;
- SCM args_list = scm_listify (SCM_UNDEFINED);
+ SCM args_list = scm_list_n (SCM_UNDEFINED);
if (needsChannelName)
{
- args_list = gh_append2 (args_list,
- scm_listify (Utils::
- str2scm (channel),
- SCM_UNDEFINED));
+ args_list = scm_append (scm_list_2 (args_list,
+ scm_list_n (Utils::
+ str2scm (channel),
+ SCM_UNDEFINED)));
argsCount--;
}
param = st.rest ();
else
param = st.next_token ();
- args_list = gh_append2 (args_list,
- scm_listify (Utils::str2scm (param),
- SCM_UNDEFINED));
+ args_list = scm_append (scm_list_2 (args_list,
+ scm_list_n (Utils::str2scm (param),
+ SCM_UNDEFINED)));
}
struct wrapper_data wd;