Skip to content
General IRCX

Save Roomlist

A TG007 community discussion started by general.

Discussion 14 posts
Page 1 of 1
Open
Topic #8851 · 14 published posts · 3,891 views

once i downloaded a script for scn chat which had option to save roomlist in a .ini or .txt file and then another option jo join all rooms which are saved in file by clicking "JOIN ALL" button. but i lost that script and codes as well..........latters i edit another codes as following

menu channel {
-=[ AutoJoin ]=-
  .$iif($readini(rooms.ini,Rooms,#),Remove,Add) Room: $iif($readini(rooms.ini,Rooms,#),remini,writeini -n) rooms.ini Rooms # $iif(!$readini(rooms.ini,Rooms,#),$true)
  View Rooms
  ..$iif($ini(rooms.ini,Rooms,1),1. $ini(rooms.ini,Rooms,1)):join $ini(rooms.ini,Rooms,1)
  ..$iif($ini(rooms.ini,Rooms,2),2. $ini(rooms.ini,Rooms,2)):join $ini(rooms.ini,Rooms,2)
  ..$iif($ini(rooms.ini,Rooms,3),3. $ini(rooms.ini,Rooms,3)):join $ini(rooms.ini,Rooms,3)
  ..$iif($ini(rooms.ini,Rooms,4),4. $ini(rooms.ini,Rooms,4)):join $ini(rooms.ini,Rooms,4)
  ..$iif($ini(rooms.ini,Rooms,5),5. $ini(rooms.ini,Rooms,5)):join $ini(rooms.ini,Rooms,5)
  ..$iif($ini(rooms.ini,Rooms,6),6. $ini(rooms.ini,Rooms,6)):join $ini(rooms.ini,Rooms,6)
  ..$iif($ini(rooms.ini,Rooms,7),7. $ini(rooms.ini,Rooms,7)):join $ini(rooms.ini,Rooms,7)
  ..$iif($ini(rooms.ini,Rooms,8),8. $ini(rooms.ini,Rooms,8)):join $ini(rooms.ini,Rooms,8)
}

though limit can be increased ....but this is manual procedure and i have to do it manually....

i want to do now.... on type /list room names should also be saved in .ini or .txt file...and

on admin type !join all.... all the rooms must be joined which are saved in .inf or .txt file...

if it is possible do tell me how...?

thanx

I won't show you how to join every room in the room list, but I will point you in the direction to save room list info to an ini file.

 

This invloves Raw 321,322 and 323.

 

321 begins channel list.

 

raw 322 gives you the room information

 

raw 323 end of room list.

 

So on Raw 322 you need to get the room name and any other information you want to save and write it to the ini file.

 

On VSIXc, for instance, $2 == room name, $3 is room count and $4- is the topic.

 

raw 322:*:/writeini rooms.ini rooms $2 $3 $4-

 

this should write it as

 

[rooms]

ChannelName=Count Topic

I won't show you how to join every room in the room list, but I will point you in the direction to save room list info to an ini file.
thanx for pointing me in the direction to save room list....now i wud make it work that how to join all room saved in the list .....i can already join 12 room on start up....but the main problem was to save roomlist ....

 

well there is one more thing i need to help with and that is.....

on level5:TEXT:!who*:#:{ privmsg $chan Waiting For person in (F) $2 (F) <:o)
  .enable *****:P
  who ****:P
  .timer2 1 4  privmsg $chan No Matches Found :-s
  .timer 1 4 .disable #who 
} 
#who end 
#who off
raw 352:*:{ if (. isin $7) { timer2 off 
  /amsg $6 Found in: $2 Status: Owner }
  elseif (@ isin $7) { timer2 off 
  /amsg $6 Found in: $2 Status: Host } 
  elseif (+ isin $7) { timer2 off 
  /amsg  $6 Found in: $2 Current Status: Voice } 
  else { timer2 off 
  /amsg $6 Found in: $2 Status: Participant } 
} 
#who end

this command show all the users in a room.......but the problem is ...if the number of users are more than 40 it makes script disconnected from the room....

if it can possible that it show only number of user ..do not show full detail....

i want the following info should be shown only ...rather than full detai..

1. Number of owners in room

2. Number of hosts in room

3. Total Users in the room....

 

Thanx........

 

hello,

you can do something like that.

;; using //checkmode #
alias checkmode {
  var %r $nick($1,0)
  var %i 1
  while (%i <= %r) {
    if ($left($nick($1,%i).pnick,1) == $chr(64)) {  inc -u3 %host }
    if ($left($nick($1,%i).pnick,1) == $chr(46)) {  inc -u3 %owner }

    inc %i
  }
  echo -a host %host - owner %owner - TOTAL %r
}

use it in a text event.

that should work

Edited Aug 25, 2007 5:28 PM by Orus

Thanx for replying Orus...

The codes u paste i think will work for the same room in which script is being run...

but the codes i posted above will show user detail of other room ...dosent matter script is in that room or not...

but roommust be exist and active .......so i do not need to join each room and see how many user are there in the room.. i can see other rooms detail while sitting in my room by typing a coomand...

but codes im using do not count total owner , total host and then total users....it show each person name which disconenct script if number of user are more than 40...

anyhow ...i wud try with this ...

 

Why was this posted in 'Your Site.' From now on, please post questions related to IRC in the IRC section of the forum. :)

All you want to do is count the owners and hosts? Have you looked at the .pnick property? I personally wouldn't use a who chan just to count the owners and hosts.

 

First of all:

 

$nick($chan,0,.) will return the number of owners in the room.

 

$nick($chan,0,@) will return the number of hosts. So will $nick($chan,0,o).

 

 

Look up $nick in the help file.

 

This code will count and list the owners and hosts.

 

var %c = $chan, %nk = $nick(%c,0), %o, %h | while (%nk) {
if ($nick(%c,%nk,.)) %o = $addtok(%o,$nick(%c,%nk),32) 
if ($nick(%c,%nk,@)) %h = $addtok(%h,$nick(%c,%nk),32)
dec %nk | if (!%nk) {
echo -a $numtok(%o,32) Owners. %o
echo -a $numtok(%h,32) Hosts. %h
}
}

Edited Aug 26, 2007 4:21 AM by Travis

I think he grabs codes from other scripts or bots and tries to disect them, and ultimately it ends up with him taking the whole code and not doing what he wants it to do.

That's how I started.

i think we all started that way. I did. But the better ones actually move on from there, and learn how to write them.

I think he grabs codes from other scripts or bots and tries to disect them

if im good in coding then why i wud ask for help?

well Fusion ....i told so many time,im neither professional nor expert in scripting or in coding......but i always try to learn...... as u said i grabs code from other scripts and bots ...its true, but i do not use that code as it is.....i try to make something new from existing codes.......

anyway .......thanx all u guys for helping me with "stupid" things lolz....i have made it working ..

Thanx again

 

 

Lemme ask onemore thing :$.........can we see user Ip or cab put IP ban via script?

Er ...

I never said it was a bad thing, because that's how almost everyone starts out. I was merely stating it. And unless your server allows it, or your a server operator, then no, you can't view IP's, but, you can ban IP's if you know the IP you want to ban ..

Lemme ask onemore thing :$.........can we see user Ip or cab put IP ban via script?

 

If you want to be able to ban people's IP addresses, go to apply for an operator position and hope that your application will be accepted.

 

Ok.......

I know IPs of users ..........i though if it is possible anyway thanx ;)