IceChat Forums

As a very long time mIRC user I was looking for another IRC client to do scripting again because mIRC has his limits to. After making IceChat look almost like mIRC I started to find out how the scripting was working.Looking for help files or similar options I found it somewhat disappointing.

Take your Basic Clone Scanner. It seems for me a good script to start with.

Sub ONJOIN(Nickname,Host,Channel,ServerNumber)'current checks just for #icechat channel, remove if line and last end if for all channelsif Channel = "#icechat" then 'get the total nicknames in a channel, and only scan when greater then 1 nick TotalNicks=GetIdentifier("$nick(" & Channel & ",0)",ServerNumber) if TotalNicks > 1 then 'drop ident for host Host = mid(Host,instr(Host,"@")+1) for i = 1 to TotalNicks GetHost = GetIdentifier("$nick(" & Channel & "," & i & ").mask") 'drop the ~ident, and and just use host GetHost = mid(GetHost,instr(GetHost,"@")+1) if GetHost = Host then if Nickname <> GetIdentifier("$nick(" & Channel & "," & i & ")") then SendCommand "/echo -a ->> Found a clone in " & Channel & " - " & Nickname & " = " & GetIdentifier("$nick(" & Channel & "," & i & ")") ,ServerNumber PlaySound "clone.wav" end if end if next End ifEnd if

End SubFirst I want to change the /echo command to write in the channel where the clones are. Not in –a or –s channel.Using the form search with /echo I could not find the way to do so. Only the –a or –s was given.After try it by /msg , I found the way. It takes me a lot of time so to find out.SendCommand "/echo " & Channel & " ->> Clones:" & Nickname & ", " & GetIdentifier("$nick(" & Channel & "," & i & ")") ,ServerNumber

and those I found on the form,GetIdentifier("$currentchannel",CurrentServerNumber)ttime = GetIdentifier("$time",ServerNumber)tdate = GetIdentifier("$date",ServerNumber)tserver = GetIdentifier("$network",ServerNumber)ect.

This let me think that is if a very important commando.Where can I find the full explanation on it and for the other commands.

By testing the clone script I also found a error in a channel that I visit on my favourite server.The var TotalNicks became $null. It takes me time again to find how this could be solved.if TotalNicks = "$null" then TotalNicks = 0

The next change I like to make is printing in one line all the clones a nick has in a channel.Furthermore it give in IceChat in the console window an error when I give in the /helpop command.It gives no reaction while this is expected.

***** UnrealIRCd Help System ***** - Server Commands Help. Specify your Question after the /HELPOP command. You will find all of the server commands and options available for use. If you need extra assistance please visit the server's help channel or ask an available IRCop. - /HELPOP USERCMDS - To get the list of User Commands /HELPOP OPERCMDS - To get the list of Oper Commands /HELPOP SVSCMDS - Commands sent via U:Lined Server (Services) /HELPOP UMODES - To get the list of User Modes /HELPOP SNOMASKS - To get a list of Snomasks /HELPOP CHMODES - To get the list of Channel Modes /HELPOP OFLAGS - To see the list of O:line Flags -If I gives a full command then the text that I not in a channel appear.Then there are tokens that giving some problems.Take the €. This is done by Right Alt + 5. In the active channel is showing correctly but it is not sending to the members of that channel.They sees nothing. If you receiving in IceChat the € then it is showing like â‚¬.

Hopefully I am not having to must difficulty to explore IceChat and can make scripts that I can show-off here. :)

If you have some specific questions about scripting, you can always ask in the #icechat channel on quakenet or right here on the forums.

Keep in mind, however, that if you are asking someone to write you an entire script, it might take a long time and you might not find very many who are willing to spend their time writing a script for you (there aren't that many who make scripts for icechat to begin with)

It is not my intention to let someone else write a script for me. Mostly I try to figure it out in exiting scripts how others do things.

The tip from Snerf where to look for the GetIdentifier command is what me helped further. It replaced $identifiers in mIRC like Time and Date, Nick and Address, if I understand it well.My challenges is now to test the different types of the GetIdentifier command that I can find and see what these do.

Converting from mIRC to IceChat VBSCript is quite different, the syntax is radically different.For Op, you want to use the ONOP routine.For the syntax of the routines/functions, in the Script editor, in the Scripts ta, select the "Script Events" menu item, and then choose IceChat 5 style, and select "On Op" or w/e you want. This helps that part out.The same for VBScript Functions, gives you a list of a lot of the functions, like GetIdentifier().

Hope that helps out a bit, if not, please ask here, can help you out as you need.

In my effort to overcome the $null results for the TotalNicks in the clones script above I want to used the $numtok command.After some hour's of trying I like to now if it is possible to do so. Here is the part for that.

That Split() function can gives me in deed the TotalNicks. Sadly the channel where I needed for has more safety build in.The GetIdentifier("$nick(" & Channel & "," & 1 & ")") gives me not the 1e nick on the list from that channel but this: $nick(<#channel>,1).

In mIRC I have in the past put a script in that works well with clones. This is working with a temporary file.The big challenges are to translate this kind of scripting ($ialchan($address($nick($chan,%clone.count1),2),$chan,0) in to IceChat's.

After using the search, found about: Dim Host, Redim Host(0), Redim Preserve Host(i) and a lot off trying with extra SendCommand I think to give up.Now I have a list but it seems that the instr() function is not working with that list.

To overcome the $null problem you don't want to wait on a onjoin() in that channel with have clones.Sometime you can wait a long time and therefore I make that test script. First you test it on the others channels that working well with the clonescanner.ice and in favor of the what smaller ones.

Already had I try the Host(i) = Getidentifier("$nick(" & Channel & "," & NickArray(i) & ").host") method but I get strange results. Those results came back after Snerf give me that solution. Luckily a had now all those extra SendCommand() putting in. There I found out that I had forgotten to put the # before the channel name. :oops: Normally the channel comes with the onjoin() command so that mistake shall not make later on.

Now could I leave out all those extra thing around the Host array, Dim, Redim, Redim Preserve.But maybe others like to used them for some reason.

With the next post I hope to can show you the code for a other clone script. For now I am to tired.