Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 17th, 2004, 8:46 PM   #1
goldenb0y
Newbie
 
Join Date: Oct 2004
Posts: 15
Rep Power: 0 goldenb0y is on a distinguished road
How do I set variables to command? I am having some trouble with little scripts.

*:JOIN:#techdiscussions.com:{
%asdf = $whois $nick
/echo %asdf
}
goldenb0y is offline   Reply With Quote
Old Oct 25th, 2004, 4:42 PM   #2
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 138
Rep Power: 5 bulio is on a distinguished road
Is it in mirc coding?
bulio is offline   Reply With Quote
Old Dec 4th, 2004, 5:00 PM   #3
Mal
Newbie
 
Mal's Avatar
 
Join Date: Dec 2004
Posts: 11
Rep Power: 0 Mal is on a distinguished road
Im not an irc user anymore, but what is it exactly you're trying to do and i can certainly help you out. if you're using nnscript that is, because i believe some of the commands/variables i used to use were nnscript ones.
__________________
Mal - "At the source of every error which is blamed on the computer, you will find at least two human errors, including the error of blaming it on the computer." :: "A good programmer is someone who looks both ways before crossing a one-way street."
Mal is offline   Reply With Quote
Old Jan 11th, 2005, 12:16 PM   #4
cloud-
Hobbyist Programmer
 
Join Date: Jan 2005
Posts: 110
Rep Power: 4 cloud- is on a distinguished road
im not sure if your aware but...
/whois is a command that the ircd deals with
so mirc can not gather the info like that >_<

so you would have to get the raw info first from the server
then set the variable unless the $whois is a custom alias you've made?

if yes then you need to add "on" to the start of the script
and it will work.
and you need to /set for a global variable
or /var for local

when you set a global you dont use "="
like /set %variable Value
but local use "="
like /var %variable = Value

on *:JOIN:#techdiscussions.com:{
set %asdf $whois $nick
echo %asdf
}

if not then
if you wanted $whois to get the adress you can use $address($nick,2)
or something

just like

on *:join:#techdiscussions.com: {
set %asdf $address($nick,2) $nick
echo -a %asdf
}

good luck
cloud- is offline   Reply With Quote
Old May 23rd, 2005, 12:38 AM   #5
Riddle
Programmer
 
Riddle's Avatar
 
Join Date: May 2005
Location: Nar Shaddaa
Posts: 42
Rep Power: 0 Riddle is on a distinguished road
Send a message via ICQ to Riddle Send a message via AIM to Riddle Send a message via MSN to Riddle
Like cloud- said, you'd have to gather the raw info from the server (using raw numerics). Here's an example, which "customizes" your whois:
raw 311:*:{
  echo -a  $+ $color(whois) $+ <whois>
  echo -a  $+ $color(whois) $+ Whois: $2
  echo -a  $+ $color(whois) $+ Host: $3 $+ @ $+ $4
  echo -a  $+ $color(whois) $+ Name: $6-
  halt
}
raw 319:*:echo -a  $+ $color(whois) $+ Channels: $3- | halt
raw 312:*:echo -a  $+ $color(whois) $+ Server: $3 * $4- | halt
raw 301:*:echo -a  $+ $color(whois) $+ Afk: $3- | halt
raw 313:*:echo -a  $+ $color(whois) $+ Oper: $2 is an oper. | halt
raw 318:*:echo -a  $+ $color(whois) $+ </whois> | halt
So that'll probably help some, do what you wish with it. ^_^

Last edited by Riddle; May 23rd, 2005 at 12:46 AM. Reason: Edited the script a bit.
Riddle is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:42 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC