Well, the other script was giving me trouble if I tried multiplying it for several links, so I thought I'd just stop going the SDK way and make the script for myself, as no one will need it from me anyways. So the scripts is as such:
bind pub - "!xpro" spidey:xpro_link
proc spidey:xpro_link { nick host hand chan args } {
set params [split $args]
set action [lindex $params 0]
set sa [lindex $params 1]
putserv "NOTICE $nick :1. $action 2. $sa"
if { $action == "" } {
putserv "PRIVMSG $chan :http://xpro.zeeblo.com (Requested by $nick)"
} elseif { $action != "" && $sa == "" } {
putserv "NOTICE $nick :Not enough parameters."
} elseif { $action == "topic"} {
putserv "PRIVMSG $chan :http://xpro.zeeblo.com/index.php?topic=$sa (Requested by $nick)"
} elseif { $action == "forum"} {
putserv "PRIVMSG $chan :http://xpro.zeeblo.com/index.php?board=$sa (Requested by $nick)"
} elseif { $action == "user"} {
putserv "PRIVMSG $chan :http://xpro.zeeblo.com/index.php?action=profile;u=$sa (Requested by $nick)"
} elseif { $action == "action"} {
putserv "PRIVMSG $chan :http://xpro.zeeblo.com/index.php?$sa (Requested by $nick)"
}
return 0
}
putlog "xproDesigns Links 1.0 by Hen Asraf: Loaded"
When outputting the notice at start to debug what was going on with the arguments, I noticed the first argument begins with { and the second ends with } so it outputted "1. {foo 2. bar}". Is there a way to stop this from happening and return everything without the braces?
Why on earth would you replace "args" with multiple arguments ("action" and "sa")? The number of arguments in your proc-definition must match the number of arguments used when the binding triggers (with pub-bindings, this would be <nickname> <host> <handle> <channel> <text>).
The text ppl write in the channel will always use one argument with pub-bindings, it is up to you as a coder to gather the desired data from it...