Jump to content

Save Roomlist


general

Recommended Posts

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

Link to comment
Share on other sites

Guest Travis

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

Link to comment
Share on other sites

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........

 

Link to comment
Share on other sites

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 by Orus
Link to comment
Share on other sites

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 ...

 

Link to comment
Share on other sites

Guest Travis

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 by Travis
Link to comment
Share on other sites

Guest X-Fusion

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...