Using your example, that would make $3 be <networkname>) echo -s pwned and there'd be no $4, in which case the code (should) take that as a room name on the current network, so the bot would attempt to join that room...I'm not sure what would happen if you tried to join a room that doesn't have the correct configuration for a room name, specifically, not beginning with the # symbol.

Anyhow, getting back to the original topic, I've got the following dialog, but I was wondering, is there a way to limit the dialog so that the same network isn't listed over & over again? Sort of like how $addtok works, as in, if the network is already in the list, it won't be added again?

Here's the dialog I came up with
Code:
 dialog Connections {
  title "Connections"
  size -1 -1 190 60
  option dbu
  button "Cancel", 1, 5 20 20 10, cancel
  button "OK", 2, 5 35 20 10, ok
  button "Save", 3, 5 50 20 10, default
  text "Network", 4, 5 6 25 8
  combo 5, 35 5 60 50, edit drop
  text "Password", 6, 100 6 25 8
  edit "", 7, 125 5 50 10
}
on *:dialog:Connections:init:*:{
  did -a $dname 5 $network
}
on *:dialog:Connections:sclick:5:{
  if $hget(Networks,$+($did($dname,5).seltext,.,Password)) {
    did -ra $dname 7 $v1
  }
}
on *:dialog:Connections:sclick:2,3:{
  var %network = $iif($did($dname,5).seltext,$v1,$did($dname,5))
  var %password = $did($dname,7)
  .hadd -m Networks $+(%network,.,Password) %password
}
 


Also if you have any other suggestions, please make them.