mIRC Home    About    Download    Register    News    Help

Print Thread
#53997 12/10/03 06:50 PM
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
hi, i am trying to make my own hostserv for my IRC server, but i have a few problems.

on *:text:*:?:{
if ($me == Hostserv) {
if (Create == $$1) && ($$2 != $null) && ($$3 != $null) && ($$4 != $null) { .notice $nick you have created user $$2 | .notice $nick with password:  $+ $$3 | .notice $nick With Host:  $+ $$4
addhost $$2 $$3 $$4
}
}
alias savevhost {
hsave -o vhosts vhosts.conf
}
alias loadhost {
hmake -s vhosts 1000
hload vhosts vhosts.conf
}
alias addhost { hadd vhosts $1 $2 $3 }
i want to add the nickname, password, and the Vhost how will that be done ??? and how will i read the new Vhost ???

thx


TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
#53998 12/10/03 07:08 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Code:
if (Create == $$1) && ($$2 != $null) && ($$3 != $null) && ($$4 != $null)


can be shortened to

Code:
if (Create == $1) && ($4) 


(if $4 exists, then so do $2 and $3 !)
Also -- why the notices on three lines and not just on one?

To add to the hashtable, use

Code:
hadd tablename $2 $3 $4


Also, the alias loadhost you might wanna check if the table exists before creating it, or destroy it before creating it. Attempting to create a table that already exists causes an error.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard